getCountsByID: get counts for large single cell data

Description Usage Arguments Value Methods (by class) Author(s) Examples

Description

If bulk, use the standard getCounts function in chromVAR. Otherwise, if you have a barcoded sample and a particular sam tag that distinguishes cells, this function should be much faster. Assumes that duplicate reads are already removed and other artifacts (e.g. proper pairing) are also already handled upstream.

Usage

1
2
3
4
5
getCountsByID(bamfile, peaks, barcodeTag, mapqFilter)

## S4 method for signature 'character,GenomicRanges,character,numeric'
getCountsByID(bamfile,
  peaks, barcodeTag, mapqFilter = 0)

Arguments

bamfile

Valid string for filepath to bam file

peaks

A GRanges object of accessibility peaks. Use chromVAR::getPeaks to import a bed file for this.

barcodeTag

The two-letter sam tag associated with the barcoding of the different cells

mapqFilter

Minimum mapping quality metric necessary for read to be used in counts matrix.

Value

A summarized Experiment roughly equivalent to what chromVAR::getCoutns would provide

Methods (by class)

Author(s)

Caleb Lareau

Examples

1
2
3
4
5
bamfile <-paste0(system.file('raw',package='chromVARxx'),'/chr1.barcode.small.bam')
peakfile <- paste0(system.file('raw',package='chromVARxx'),'/chr1.peaks.small.bed')
peaks <- suppressWarnings(chromVAR::getPeaks(peakfile))
barcodeTag <- "CB"
SE <- getCountsByID(bamfile, peaks, barcodeTag, mapqFilter =0 )

caleblareau/chromVARxx documentation built on May 14, 2019, 11:15 a.m.