Skip to content
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

sampleMap(mae)$assay required to be factor #206

Closed
lwaldron opened this issue Jun 15, 2017 · 2 comments
Closed

sampleMap(mae)$assay required to be factor #206

lwaldron opened this issue Jun 15, 2017 · 2 comments
Assignees
Labels

Comments

@lwaldron
Copy link
Member

Previously, sampleMap(mae)$assay was a character but now it must be a factor, otherwise any subsetting removes all data. See the attached example.

> load("~/Downloads/miniconquerMAE.rda")
> mae <- updateObject(mae)
> mae[, 1:10, ]
harmonizing input:
  removing 36 sampleMap rows not in names(experiments)
  removing 18 colData rownames not in sampleMap 'primary'
A MultiAssayExperiment object of 0 listed
 experiments with no user-defined names and respective classes. 
 Containing an ExperimentList class object of length 0:  
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
> mae@sampleMap$assay <- factor(mae@sampleMap$assay)
> mae[, 1:10, ]
harmonizing input:
  removing 16 sampleMap rows with 'colname' not in colnames of experiments
  removing 8 colData rownames not in sampleMap 'primary'
A MultiAssayExperiment object of 2 listed
 experiments with user-defined names and respective classes. 
 Containing an ExperimentList class object of length 2: 
 [1] gene: RangedSummarizedExperiment with 10 rows and 10 columns 
 [2] tx: RangedSummarizedExperiment with 10 rows and 10 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
> 

miniconquerMAE.rda.zip

@lwaldron
Copy link
Member Author

If the assay column is required to be a factor then this needs a validity check, and updateObject() should include this correction.

BTW, this came up with Charlotte Soneson's nice page of MultiAssayExperiments containing gene and transcript-level RangedSummarizedExperiments for matched single-cell RNA-seq: http://imlspenticton.uzh.ch:3838/conquer/

@LiNk-NY
Copy link
Collaborator

LiNk-NY commented Jun 16, 2017

Thanks for reporting this. Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants