reorder_assays: Re-order the elements of the 'assays' slot of a...

Description Usage Arguments Details Value Author(s) Examples

View source: R/reorder_assays.R

Description

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.

Usage

1
2
3
4
  reorder_assays(
    se,
    order = c("counts", "abundance", "length")
  )

Arguments

se

A SummarizedExperiment object with 3 assays as would be downloaded from the FieldEffectCrc package. An abundance (i.e. TPM) matrix is the first element after initial download.

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 SummarizedExperiment objects.

Details

Meant to facilitate alternative uses of the SummarizedExperiment objects as explained in the FieldEffectCrc package vignette.

browseVignettes("FieldEffectCrc")

Value

A SummarizedExperiment object.

Author(s)

Chris Dampier

Examples

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)

BarcUVa-Seq/FieldEffectCrc documentation built on Sept. 23, 2020, 2:53 a.m.