Re: [Bioc-devel] Empty DataFrame Causes SummarizedExperiment Constructor Error

2023-05-20 Thread Hervé Pagès
On 5/17/23 23:59, Robert Castelo wrote: not sure whether this is relevant, but I observed that while an empty base R 'data.frame()' constructor gives zero-length character vectors for row and column names, the empty 'DataFrame()' constructor gives also a zero-length character vector for

Re: [Bioc-devel] Empty DataFrame Causes SummarizedExperiment Constructor Error

2023-05-18 Thread Robert Castelo
FWIW, it seems to me that the constructor expects the integrity between the assay data and the column data. giving the correct row names, there's no error: SummarizedExperiment(assays = list(counts = countsMini), colData = DataFrame(row.names=colnames(countsMini))) class:

Re: [Bioc-devel] Empty DataFrame Causes SummarizedExperiment Constructor Error

2023-05-17 Thread Hervé Pagès
Not sure why the colData default is DataFrame(). Seems like this has been the default since the birth of the SummarizedExperiment class back in 2010 (FWIW the class was born in the GenomicRanges package). Anyways, it should probably be NULL, like for rowData. Can you please open an issue on

[Bioc-devel] Empty DataFrame Causes SummarizedExperiment Constructor Error

2023-05-12 Thread Dario Strbenac via Bioc-devel
Good day, The default value of colData is DataFrame(). Not specifying an informative colData is fine. countsMini <- matrix(rpois(100, 100), ncol = 10) colnames(countsMini) <- paste("Cell", 1:10) rownames(countsMini) <- paste("Gene", 1:10) SummarizedExperiment(assays = list(counts = countsMini))