Description Usage Arguments Value Author(s) See Also Examples
View source: R/roi_functions.R
A convenience function to subset regions of interest by the amount of signal they contain, according to their quantile (i.e. their signal ranks).
1 2 3 4 5 6 7 8 9 10 |
regions.gr |
A GRanges object containing regions of interest. |
dataset.gr |
A GRanges object in which signal is contained in metadata (typically in the "score" field). |
quantiles |
A value pair giving the lower quantile and upper quantile of
regions to keep. Regions with signal quantiles below the lower quantile are
removed, and likewise for regions with signal quantiles above the upper
quantile. Quantiles must be in range |
field |
The metadata field of |
order.by.rank |
If |
density |
A logical indicating whether signal counts should be
normalized to the width (chromosomal length) of ranges in
|
keep.signal |
Logical indicating if signal counts should be kept. If set
to |
expand_ranges |
Logical indicating if ranges in |
A GRanges object of length length(regions.gr) * (upper_quantile
- lower_quantile)
.
Mike DeBerardine
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | data("PROseq") # load included PROseq data
data("txs_dm6_chr4") # load included transcripts
txs_dm6_chr4
#--------------------------------------------------#
# get the top 50% of transcripts by signal
#--------------------------------------------------#
subsetRegionsBySignal(txs_dm6_chr4, PROseq)
#--------------------------------------------------#
# get the middle 50% of transcripts by signal
#--------------------------------------------------#
subsetRegionsBySignal(txs_dm6_chr4, PROseq, quantiles = c(0.25, 0.75))
#--------------------------------------------------#
# get the top 10% of transcripts by signal, and sort them by highest signal
#--------------------------------------------------#
subsetRegionsBySignal(txs_dm6_chr4, PROseq, quantiles = c(0.9, 1),
order.by.rank = TRUE)
#--------------------------------------------------#
# remove the most extreme 10% of regions, and keep scores
#--------------------------------------------------#
subsetRegionsBySignal(txs_dm6_chr4, PROseq, quantiles = c(0.05, 0.95),
keep.signal = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.