R/asRangedSummarizedExperiment.R
asRangedSummarizedExperiment.RdCreates a SummarizedExperiment::RangedSummarizedExperiment from a
qseaSet, for use with the wider Bioconductor ecosystem. The conversion is
one-way and not guaranteed to be lossless: the qseaSet remains the primary
object in mesa.
asRangedSummarizedExperiment(qs, assays = "counts")A RangedSummarizedExperiment with windows as rows and samples as
columns.
The slots map as follows:
windows -> rowRanges
counts, NRPM, beta -> assays (counts, nrpm, beta)
CNV -> assays$cnv, expanded from the CNV bins to every window
sample table, including the per-sample library information added by
addLibraryInformation() (which is called if it has not been already),
and the per-sample enrichment parameters (columns enrichment.<name>)
-> colData
parameters, the CpG-density enrichment model (factors, density, n)
and the original CNV bins -> metadata()
se <- asRangedSummarizedExperiment(exampleTumourNormal)
#> Generating table of counts values for 819 regions across 10 samples.
se
#> class: RangedSummarizedExperiment
#> dim: 819 10
#> metadata(3): parameters enrichment cnvBins
#> assays(1): counts
#> rownames(819): 7:25002001-25002300 7:25005001-25005300 ...
#> 7:27987301-27987600 7:27987601-27987900
#> rowData names(1): CpG_density
#> colnames(10): Colon1_N Colon1_T ... Lung3_N Lung3_T
#> colData names(58): sample_name group ... enrichment.b enrichment.c
se <- asRangedSummarizedExperiment(
exampleTumourNormal,
assays = c("counts", "nrpm", "beta", "cnv")
)
#> Generating table of counts values for 819 regions across 10 samples.
#> Generating table of nrpm values for 819 regions across 10 samples.
#> Generating table of beta values for 819 regions across 10 samples.
SummarizedExperiment::assayNames(se)
#> [1] "counts" "nrpm" "beta" "cnv"