Extract the assay information from a SummarizedExperiment-class-object, transpose it, and and return it as a tidy data frame that contains assay measurements, feature names, and sample IDs

SE2Tidy(summExperiment, whichAssay = 1)

Arguments

summExperiment

A SummarizedExperiment-class object

whichAssay

Because SummarizedExperiment objects can store multiple related assays, which assay will be paired with a given pathway collection to create an Omics*-class data container? Defaults to 1, for the first assay in the object.

Value

The transposition of the assay in summExperiment to tidy form

Details

This function is designed to extract and transpose a "tall" assay data frames (where genes or proteins are the rows and patient or tumour samples are the columns) from a SummarizedExperiment object. This function also transposes the row (feature) names to column names and the column (sample) names to row names via the TransposeAssay function.

Examples

# THIS REQUIRES THE SummarizedExperiment PACKAGE. library(SummarizedExperiment)
#> Loading required package: GenomicRanges
#> Loading required package: stats4
#> Loading required package: BiocGenerics
#> Loading required package: parallel
#> #> Attaching package: 'BiocGenerics'
#> The following objects are masked from 'package:parallel': #> #> clusterApply, clusterApplyLB, clusterCall, clusterEvalQ, #> clusterExport, clusterMap, parApply, parCapply, parLapply, #> parLapplyLB, parRapply, parSapply, parSapplyLB
#> The following objects are masked from 'package:stats': #> #> IQR, mad, sd, var, xtabs
#> The following objects are masked from 'package:base': #> #> anyDuplicated, append, as.data.frame, basename, cbind, colnames, #> dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep, #> grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget, #> order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank, #> rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply, #> union, unique, unsplit, which, which.max, which.min
#> Loading required package: S4Vectors
#> #> Attaching package: 'S4Vectors'
#> The following object is masked from 'package:base': #> #> expand.grid
#> Loading required package: IRanges
#> #> Attaching package: 'IRanges'
#> The following object is masked from 'package:grDevices': #> #> windows
#> Loading required package: GenomeInfoDb
#> Loading required package: Biobase
#> Welcome to Bioconductor #> #> Vignettes contain introductory material; view with #> 'browseVignettes()'. To cite Bioconductor, see #> 'citation("Biobase")', and for packages 'citation("pkgname")'.
#> Loading required package: DelayedArray
#> Loading required package: matrixStats
#> #> Attaching package: 'matrixStats'
#> The following objects are masked from 'package:Biobase': #> #> anyMissing, rowMedians
#> Loading required package: BiocParallel
#> #> Attaching package: 'DelayedArray'
#> The following objects are masked from 'package:matrixStats': #> #> colMaxs, colMins, colRanges, rowMaxs, rowMins, rowRanges
#> The following objects are masked from 'package:base': #> #> aperm, apply, rowsum
data(airway, package = "airway") airway_df <- SE2Tidy(airway)