waldronlab / MultiAssayExperiment

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

constructor errors with single-row pData #149

Closed lwaldron closed 8 years ago

lwaldron commented 8 years ago

OK this is a corner case, but you never know:

> library(MultiAssayExperiment)
> mat = matrix(1:6, ncol=3, dimnames=list(c("a", "b"), c("d", "e", "f")))
> pdat = data.frame(x=1:3, row.names = colnames(mat))
> MultiAssayExperiment(ExperimentList=list(A=mat), pData=pdat[1, , drop=FALSE])
Error in if (dim(object)[1] > 0 && is.null(rownames(object))) { : 
  missing value where TRUE/FALSE needed
In addition: Warning messages:
1: In MultiAssayExperiment(ExperimentList = list(A = mat), pData = pdat[1,  :
  sampleMap not provided, trying to generate sampleMap...
2: In .generateMap(pData, ExperimentList) : Data from rows:
 NA - e
 NA - f
dropped due to missing phenotype data
## from session_info():
##  MultiAssayExperiment   * 0.101.37 2016-07-14 Github (vjcitn/MultiAssayExperiment@f60de4b)