getRegionCounts {CSSQ}R Documentation

Quantify region level count data

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

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

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)

[Package CSSQ version 1.4.1 Index]