Description Usage Arguments Details Value Author(s) Examples
For a set of UCSC style intervals, produce a new set of intervals that are subsets of those intervals. Strand must be provided, because intervals are strand-less, but the logic to subset an interval depends very much on the strand.
1 | ucsc.pos.subset(intervals, start, stop, strand)
|
intervals |
vector of UCSC style intevals, eg "chr1:100-300" |
start |
vector of numerics defining the starting base within each interval (1-based) |
stop |
vector of numerics defining the ending base within each interval (1-based). NB stop can be longer than the original interval. |
strand |
either a charcter vector of "+"/"-", or 0,1, or -1,1 |
eg: subset chr1:1000-1100 (+) to the interval that starts at 2-7 -> chr1:1001-1006 eg: subset chr1:1000-1100 (-) to the interval that starts at 2-7 -> chr1:1094-1099
a vector of UCSC style intervals, adjusted as detailed above
Mark Cowley, 2009-01-08
1 2 3 4 5 | ucsc.pos.subset("chr1:1000-1100", 1,11, "+")
# [1] "chr1:1000-1010"
ucsc.pos.subset("chr1:1000-1100", 1,11, "-")
# [1] "chr1:1090-1100"
# (you can use > 1 entry too.)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.