'Select certain rows from a MultiAssayExperiment
I had a MultiAssayExperiment:
> ucs
A MultiAssayExperiment object of 4 listed
experiments with user-defined names and respective classes.
Containing an ExperimentList class object of length 4:
[1] UCS_miRNASeqGene-20160128: SummarizedExperiment with 1046 rows and 56 columns
[2] UCS_Mutation-20160128: RaggedExperiment with 11339 rows and 57 columns
[3] UCS_RNASeq2GeneNorm-20160128: SummarizedExperiment with 20501 rows and 57 columns
[4] UCS_Methylation-20160128: SummarizedExperiment with 485577 rows and 57 columns
Functionality:
experiments() - obtain the ExperimentList instance
colData() - the primary/phenotype DataFrame
sampleMap() - the sample coordination DataFrame
`$`, `[`, `[[` - extract colData columns, subset, or experiment
*Format() - convert into a long or wide DataFrame
assays() - convert ExperimentList to a SimpleList of matrices
exportClass() - save all data to files
where:
> ucs$years_to_birth
[1] 65 63 69 68 61 62 71 67 65 69 54 62 62 65 59 83 81 84 51 77 65
[22] 87 72 69 71 82 73 68 66 88 76 75 77 70 65 61 69 68 72 61 60 62
[43] 80 75 80 67 90 83 77 59 61 59 89 63 74 67 55
I would like to select all the colums and experiments from UCS but just for those which years_to_birth are <60 or >83
how can I do it?
I had it like this:
a<- ucs[ucs$years_to_birth <60, ]
b<- ucs[ucs$years_to_birth >= 83, ]
but I have no idea how to merge it into one multiassayexperiment. Because cbind didn't work propertly here
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|