countSignal | R Documentation |
A simple function to count the number of sites carrying an arbitrary signal, which are inside given genomic regions.
countSignal(signal, gr, maxDist = NULL, ignore.strand = TRUE, verbose = FALSE)
signal |
A GRange object carrying the sites of interest. |
gr |
A GRange object carrying the regions of interest. |
ignore.strand |
When set to TRUE, the strand information is ignored in the overlap calculations. |
verbose |
Logical. Default is TRUE. If TRUE, then the progress of the computational tasks is given. |
Given a GRanges object 'signal' carrying an arbitrary signal on each range, this function counts the number of sites inside the the given genomic regions 'gr'.
A GRanges object with the genomic regions that carry signals and the number of sites on them.
Robersy Sanchez. https://genomaths.com
getGRegionsStat
library(GenomicRanges)
some.signal <- makeGRangesFromDataFrame(data.frame(chr = 'chr1',
start = 1:15,
end = 1:15,
strand = '*'))
some.regions <- makeGRangesFromDataFrame(data.frame(chr = 'chr1',
start = c(2, 8),
end = c(7, 14),
strand = '*'))
countSignal(signal = some.signal, gr = some.regions)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.