View source: R/combineHapState.R
combineHapState | R Documentation |
combine two 'RangedSummarizedExperiment' objects, each contains the haplotype state for a list of SNPs across a set of cells. The combined result will have cells from two individuals and merged list of SNPs from the two.
combineHapState(rse1, rse2, groupName = c("Sample1", "Sample2"))
rse1, |
the first 'RangedSummarizedExperiment' |
rse2, |
the second 'RangedSummarizedExperiment' |
groupName, |
a character vector of length 2 that contains the first and the second group's names |
A 'RangedSummarizedExperiment' that contains the cells and SNPs in both 'rse'
Ruqian Lyu
BiocParallel::register(BiocParallel::SnowParam(workers = 1))
demo_path <- paste0(system.file("extdata",package = "comapr"),"/")
s1_rse_state <- readHapState("s1",chroms=c("chr1"),
path=demo_path,barcodeFile=NULL,minSNP = 0,
minlogllRatio = 50,
bpDist = 100,maxRawCO=10,
minCellSNP = 1)
s2_rse_state <- readHapState("s2",chroms=c("chr1"),
path=demo_path,
barcodeFile=paste0(demo_path,"s2_barcodes.txt"),
minSNP = 0,
minlogllRatio = 50,
bpDist = 100,maxRawCO=10,
minCellSNP = 1)
sb <- combineHapState(s1_rse_state,s2_rse_state)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.