getRegionCounts {CSSQ} | R Documentation |
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.
getRegionCounts( regionBed, sampleInfo, sampleDir = ".", backgroundSubtract = TRUE, ... )
regionBed |
A bed file containing the list of regions that are being analyzed. |
sampleInfo |
Object from |
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 |
RangedSummarizedExperiment-class
containing the regions,
sample information and counts for all samples.
getBgSubVal
which this function calls.
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)