Read Structural Variation Data as RS object — read_sv_as_rs (original) (raw)
Read Structural Variation Data as RS object
Arguments
a data.frame
or a file with the following columns: "sample", "chr1", "start1", "end1", "chr2", "start2", "end2", "strand1", "strand2", "svclass". NOTE: If column "svclass" already exists in input, "strand1" and "strand2" are optional. If "svclass" is not provided, read_sv_as_rs()
will compute it by "strand1","strand2"(strand1/strand2),"chr1" and "chr2":
- translocation, if mates are on different chromosomes.
- inversion (+/-) and (-/+), if mates on the same chromosome.
- deletion (+/+), if mates on the same chromosome.
- tandem-duplication (-/-), if mates on the same chromosome.
Examples
sv <- readRDS(system.file("extdata", "toy_sv.rds", package = "sigminer", mustWork = TRUE))
rs <- read_sv_as_rs(sv)
#> succesfully read RS!
# svclass is optional
rs2 <- read_sv_as_rs(sv[, setdiff(colnames(sv), "svclass")])
#> succesfully read RS!
identical(rs, rs2)
#> [1] TRUE
if (FALSE) { # \dontrun{
tally_rs <- sig_tally(rs)
} # }