read_sv_as_rs: Read Structural Variation Data as RS object

View source: R/get_sv.R

read_sv_as_rsR Documentation

Read Structural Variation Data as RS object

Description

Read Structural Variation Data as RS object

Usage

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)
## Not run: 
tally_rs <- sig_tally(rs)

## End(Not run)

sigminer documentation built on May 29, 2024, 3:11 a.m.