-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using intersectRows when different names are used for the same entity #228
Comments
Hi Lluís, @llrs |
I tried building another object ( MultiAssayExperiment(list("intestinal" = SE_i, "stools" = SE_s))
## A MultiAssayExperiment object of 2 listed
## experiments with user-defined names and respective classes.
## Containing an ExperimentList class object of length 2:
## [1] intestinal: SummarizedExperiment with 532 rows and 178 columns
## [2] stools: SummarizedExperiment with 568 rows and 152 columns
## Features:
## experiments() - obtain the ExperimentList instance
## colData() - the primary/phenotype DataFrame
## sampleMap() - the sample availability DataFrame
## `$`, `[`, `[[` - extract colData columns, subset, or experiment
## *Format() - convert into a long or wide DataFrame
## assays() - convert ExperimentList to a SimpleList of matrices
colData(mae)
## DataFrame with 330 rows and 0 columns But then my problem is how to encode the colData, see this question in the support site. It might be for another enhancement but using each |
@LiNk-NY I wonder if the enhancement should be more general than
This could be used for subsetting by |
I think Martin @mtmorgan would say, you want to define a method for a class rather than a function. (Martin, feel free to chime in) |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
It's been a while but are there some updates? I'm commenting to prevent the bot closing the issue |
Hi Lluís, @llrs What you describe seems to require a row map structure where subsets can be done If you are working with a consistent number of samples ('colnames') and rows, Best regards, |
Just discussed this with @LiNk-NY. This should provide a workable solution with minimal change:
Other helper functions |
I have one dataset of 16 S sequencing of intestinal biopsies and another one from the stools which end up into different OTUs. I can find to which taxa does each OTU belong to and in the phylogenetic analysis they are usually merged into a single object (phyloseq, metagenomeSeq) extending the rowData (I assume), or could be stored in rowData because the names of the OTUs (I have OTU_1, OTU_2, ...) aren't really meaningful. What is meaningful is the taxonomy I have in a matrix that is in those objects (phylo-class, MRexperiment-class).
See example output:
When I build one of MAE object with them and I use
intersectRows
I end up with those with the same name but different taxonomic classification.Instead the OTU_1073 from intestinal assay and the OTU_1037 from the stools assay are the same species.
Could
intersectRows
use the rowData (or fvarLabels) of each experiment if available to reorder(?) and select the rows of the experiment?Also if I have metagenomics and RNA-seq assays in the same object, I would like to tell
intersectRows
which experiments to subset by row. I could be interested in just one Phylum and relate it to the other assays on the experiment.The package looks great, thanks for the effort!
The text was updated successfully, but these errors were encountered: