countReadsInGranges: countReadsInGranges counts reads in aligned BAM files for...

Description Usage Arguments Value Examples

View source: R/countReadsInGranges.R

Description

countReadsInGranges counts reads in aligned BAM files for regions stored in GRanges by using Rsubread::Featurecounts.

Usage

1
2
3
4
5
6
countReadsInGranges(
  GRangesObject,
  snakePipesDirectoryString,
  feature,
  nthreads
)

Arguments

GRangesObject

GRanges object for which featyres should be counted

snakePipesDirectoryString

The full path to a snakePipes directory with filtered BAM files

feature

of ChIPs - the name of ChIP to find the correct files in snakePipes BAM files.

nthreads

number of threads

Value

the output of Rsubread::featureCounts() function (seee ?FeatureCounts 'Value')

Examples

1
2
3
4
5
6
# count reads for bam files that start with "CEBPa" in the file name
gr = head(ATAC_peaks)
snakedir = "/scratch/adrija/02_MLL/data/chip-seq/DNA-mapping/filtered_bam"
countReadsInGranges(gr, snakedir, "CEBPA",36)
# count features for all .bam files in the directory
countReadsInGranges(gr, snakedir, "",36)

AdrijaK/omicsWrappers documentation built on July 22, 2020, 2:11 p.m.