Description Usage Arguments Value See Also Examples
This function quantifies each each region for a sample and performs background correction and normalization as instructed. Returns a vector of count information for the input regions.
1 2 3 4 5 6 7 8 9 10 |
analysisInfo |
A
|
sampleIndex |
Index of the sample to process. |
normalizeReadDepth |
Logical indicating if count data should be normalized for library sequencing depth. When TRUE (default), counts will be normalized for sequencing depth for each library. When FALSE, no such normalization will be performed and raw counts will be used. (default: TRUE) |
normalizeLength |
Logical indicating if count data should be normalized to the length of the regions. When TRUE, count data will be normalized for the length of the region being analyzed. When FALSE (default), no such normalization will be performed. (default: FALSE) |
backgroundSubtract |
Logical indicating if background correction should be performed. When TRUE (default), background subtraction will be performed after length and depth normalization if applicable. When FALSE, no background subtraction will be performed. (default: TRUE) |
countMode |
Count method passed on to
summarizeOverlaps from GenomicAlignments package.
( |
ignore.strand |
A logical indicating if strand should be considered when matching. (default: TRUE) Passed on to summarizeOverlaps from GenomicAlignments package. |
inter.feature |
A logical indicating if the 'r countMode' should be aware of overlapping features. When TRUE, reads mapping to multiple features are dropped (i.e., not counted). When FALSE (default), these reads are retained and a count is assigned to each feature they map to. Passed on to summarizeOverlaps from GenomicAlignments package. (default: FALSE) |
A vector containing the counts for all the regions.
getRegionCounts
which calls this function
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | regionBed <- read.table(system.file("extdata", "chr19_regions.bed",
package="CSSQ",mustWork = TRUE))
sampleInfo <- read.table(system.file("extdata", "sample_info.txt",
package="CSSQ",mustWork = TRUE),sep="\t",header=TRUE)
sampleInfo[,3] <- sapply(sampleInfo[,3],
function(x) system.file("extdata", x, package="CSSQ"))
sampleInfo[,5] <- sapply(sampleInfo[,5],
function(x) system.file("extdata", x, package="CSSQ"))
regionRange <- GRanges(seqnames=regionBed$V1,
ranges=IRanges(start=regionBed$V2,end=regionBed$V3))
analysisInfo <- SummarizedExperiment(rowRanges=regionRange,
colData=sampleInfo)
NormbgSubCounts <- data.frame(sapply(c(1:nrow(colData(analysisInfo))),
function(x) getBgSubVal(analysisInfo,sampleIndex = x,backgroundSubtract=TRUE,
normalizeReadDepth=TRUE,normalizeLength=FALSE,countMode="Union",
ignore.strand=TRUE,inter.feature=FALSE)))
NormbgSubCounts
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.