getRegionCounts: Quantify region level count data

Description Usage Arguments Value See Also Examples

View source: R/getRegionCounts.R

Description

The input is the set of regions and the sample information. It will calculate the number of reads falling in each region for each sample. Returns a RangedSummarizedExperiment-class object with regions, sample informationa and counts for all samples.

Usage

1
2
3
4
5
6
7
getRegionCounts(
  regionBed,
  sampleInfo,
  sampleDir = ".",
  backgroundSubtract = TRUE,
  ...
)

Arguments

regionBed

A bed file containing the list of regions that are being analyzed.

sampleInfo

Object from preprocessData containing sample information.

sampleDir

Location of the input sample files in 'sampleInfo' file. (default: ".")

backgroundSubtract

Logical indicating if background correction should be performed. (default: TRUE)

...

Additional arguments passed on to getBgSubVal.

Value

RangedSummarizedExperiment-class containing the regions, sample information and counts for all samples.

See Also

getBgSubVal which this function calls.

Examples

1
2
3
4
5
6
7
8
9
sampleInfo <- read.table(system.file("extdata", "sample_info.txt", 
package="CSSQ",mustWork = TRUE),sep="\t",header=TRUE)
countData <- getRegionCounts(system.file("extdata", "chr19_regions.bed", 
package="CSSQ"),sampleInfo,
sampleDir = system.file("extdata", package="CSSQ"))
countData
head(assays(countData)$countData)
colData(countData)
rowRanges(countData)

CSSQ documentation built on Nov. 8, 2020, 6:47 p.m.