Closed nsoranzo closed 5 years ago
Good catch! The 1.3.2 version should now write empty col_graphs
and row_graphs
groups if there are no ColGraphs
or RowGraphs
present in the LoomExperiment object.
> u <- matrix(rpois(20000, 5), ncol=100)
> v <- log2(u + 1)
> scle <- SingleCellLoomExperiment(assays=list(counts=u, logcounts=v))
> export(scle, 'test.loom')
> rhdf5::h5ls('test.loom')
group name otype dclass dim
0 / col_attrs H5I_GROUP
1 /col_attrs colnames H5I_DATASET STRING 100
2 /col_attrs reducedDims H5I_GROUP
3 / col_graphs H5I_GROUP
4 / layers H5I_GROUP
5 /layers logcounts H5I_DATASET FLOAT 100 x 200
6 / matrix H5I_DATASET INTEGER 100 x 200
7 / row_attrs H5I_GROUP
8 /row_attrs rownames H5I_DATASET STRING 200
9 / row_graphs H5I_GROUP
And thanks for this one too!
When exporting an object, the
col_graphs
androw_graphs
attributes are not always added:https://github.com/Bioconductor/LoomExperiment/blob/master/R/export-method.R#L248-L252
while the Loom file format specification says they must be present: http://linnarssonlab.org/loompy/format/index.html?highlight=h5py#row-and-column-sparse-graphs