getCellAlleleCount: Get alternative allele count for positions of interest for...

Description Usage Arguments Value Examples

Description

Get alternative allele count for positions of interest for multiple cells from one bam

Usage

1
2
getCellAlleleCount(gr, bamFile, indexFile, cellBarcodes, verbose = FALSE,
  n.cores = 1)

Arguments

gr

GenomicRanges object for positions of interest

bamFile

bam file containing all cells indexed by barcode (such as 10X)

indexFile

bai index file

cellBarcodes

vector of valid cell barcodes annotated as CB in the bam

verbose

Boolean of whether or not to print progress and info

n.cores

Number of cores; Can parallelize across cells

Value

refCount reference allele count information for each position of interest altCount alternative allele count information for each position of interest

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
## Get putative hets from ExAC
load(system.file("ExAC", "ExAC_chr1.RData", package = "HoneyBADGER"))
head(snps)
cov <- getCoverage(snps, bamFile, indexFile, verbose=TRUE)
## for the sites with coverage, get all cells
vi <- cov>0
snps.cov <- snps[vi,]
barcodes <- c('AAACATACAAAACG-1', 'AAACATACAAAAGC-1', 'AAACATACAAACAG-1')
mats.chr1 <- getCellAlleleCount(snps.cov, bamFile, indexFile, barcodes, verbose=TRUE, n.cores=10)

## End(Not run)

JEFworks/HoneyBADGER documentation built on July 24, 2021, 3:01 p.m.