Read Structural Variation Data as RS object
read_sv_as_rs(input)
Arguments
input |
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.
|
Value
a list
Examples
sv <- readRDS(system.file("extdata", "toy_sv.rds", package = "sigminer", mustWork = TRUE))
rs <- read_sv_as_rs(sv)
# svclass is optional
rs2 <- read_sv_as_rs(sv[, setdiff(colnames(sv), "svclass")])
identical(rs, rs2)
# \donttest{
tally_rs <- sig_tally(rs)
# }