waldronlab / MultiAssayExperiment

Bioconductor package for management of multi-assay data
https://waldronlab.io/MultiAssayExperiment/
69 stars 32 forks source link

Remove warning message #137

Closed LiNk-NY closed 8 years ago

LiNk-NY commented 8 years ago

Remove warning message when only ExperimentList argument is provided to the MultiAssayExperiment constructor since it's behaving as documented

lwaldron commented 8 years ago

I think this warning also doesn't need to be returned when both ExperimentList and pData arguments are provided. Another warning would be appropriate if there are some ExperimentList columns that can't be mapped to pData rows (but IIRC this already happens).

> library(MultiAssayExperiment)
> mat = matrix(1:4, ncol=2, dimnames=list(c("a", "b"), c("c", "d")))
> pdat = data.frame(x=1:2, row.names = colnames(mat))
> MultiAssayExperiment(ExperimentList=list(A=mat), pData=pdat)
A MultiAssayExperiment object of 1 listed
 experiment with a user-defined name and respective class. 
 Containing an ExperimentList class object of length 1: 
 [1] A: matrix with 2 rows and 2 columns 
To access: 
 experiments() - to obtain the ExperimentList instance 
 pData() - for the primary/phenotype DataFrame 
 sampleMap() - for the sample availability DataFrame 
 metadata() - for the metadata object of ANY class 
See also: subsetByAssay(), subsetByRow(), subsetByColumn()
Warning message:
In MultiAssayExperiment(ExperimentList = list(A = mat), pData = pdat) :
  sampleMap not provided, trying to generate sampleMap...
> 
## from session_info():
##  MultiAssayExperiment   * 0.101.37 2016-07-14 Github (vjcitn/MultiAssayExperiment@f60de4b)