Description Usage Arguments Details Value Author(s) Examples
View source: R/reorder_assays.R
Simple helper function to switch the order of assays in a
SummarizedExperiment
object with 3 assays as would be downloaded from
the FieldEffectCrc
package. This function also rounds the counts assay
to integer values. Useful for creating a DESeqDataSet
directly from a
downloaded SummarizedExperiment
object with the DESeqDataSet()
function.
1 2 3 4 | reorder_assays(
se,
order = c("counts", "abundance", "length")
)
|
se |
A |
order |
A character vector of length 3 with strings arranged in the order
of assays desired in the output. Default setting simply switches the order
of counts and abundance to make counts the first element, as is commonly
expected of |
Meant to facilitate alternative uses of the SummarizedExperiment
objects as explained in the FieldEffectCrc
package vignette.
browseVignettes("FieldEffectCrc")
A SummarizedExperiment
object.
Chris Dampier
1 2 3 4 5 6 7 | ## move counts to the first assay slot
hub <- ExperimentHub::ExperimentHub()
r <- AnnotationHub::query(hub, c("FieldEffectCrc"))
se <- r[["EH3526"]]
se <- reorder_assays(se)
se
dds <- DESeq2::DESeqDataSet(se, design = ~ sampType)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.