View source: R/addMetricAndArrangeRSE.R
addMetricAndArrangeRSE | R Documentation |
Perform an inner join between a rangedSummarizedExperiment object and a data.frame. Sort the resulting rangedSummarizedExperiment based on a metric column.
addMetricAndArrangeRSE(
rse,
order,
rse_key = "name",
order_key = "name",
order_value = "exp",
shuffle_tie = TRUE
)
rse |
a rangedSummarizedExperiment object. |
order |
a data.frame with at least two columns: keys and values. |
rse_key |
name of the gr metadata column containing unique names for
each genomic region in |
order_key |
name of the |
order_value |
name of the |
shuffle_tie |
a boolean Value (TRUE / FALSE). When TRUE, shuffle the GRanges before sorting, mixing the ties. |
This utility function allow the addition of a metric column to
genomic regions of interest. One of its common use case is to add
gene expression values on a set of transcription start sites.
The resulting GRanges object will only contain regions presents in both
rse
and order
.
a rangedSummarizedExperiment sorted in descending order.
data("stackepi")
ramdomOrder <- data.frame(
gene_id = SummarizedExperiment::rowRanges(stackepi)$gene_id,
value = rnorm(length(stackepi))
)
addMetricAndArrangeRSE(stackepi,
ramdomOrder, rse_key = "gene_id",
order_key = "gene_id", order_value = "value")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.