combineHapState: combineHapState

View source: R/combineHapState.R

combineHapStateR Documentation

combineHapState

Description

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.

Usage

combineHapState(rse1, rse2, groupName = c("Sample1", "Sample2"))

Arguments

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

Value

A 'RangedSummarizedExperiment' that contains the cells and SNPs in both 'rse'

Author(s)

Ruqian Lyu

Examples

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)


ruqianl/comapr documentation built on Oct. 27, 2023, 5:12 a.m.