Bioconductor / LoomExperiment

A package to read, write, and manipulate loom files using LoomExperiments. Uses the loom file format from the Linnarson Lab. https://linnarssonlab.org/loompy/
https://www.bioconductor.org/packages/LoomExperiment
6 stars 5 forks source link

First assay name doesn't survive round trip #6

Closed nsoranzo closed 5 years ago

nsoranzo commented 5 years ago
> library(SingleCellExperiment)
> library(LoomExperiment)
> u <- matrix(rpois(20000, 5), ncol=100)
> v <- log2(u + 1)
> scle <- SingleCellLoomExperiment(assays=list(counts=u, logcounts=v))
> export(scle, 'test.loom')
> imported_scle <- import('test.loom', type='SingleCellLoomExperiment')
> assays(scle)
List of length 2
names(2): counts logcounts
> assays(imported_scle)
List of length 2
names(2): matrix logcounts

After re-importing the exported SingleCellLoomExperiment object, the first element of assays is always named matrix instead of the original name.

Thanks for developing LoomExperiment!

dvantwisk commented 5 years ago

Got it. I'm making modifications to LoomExperiment now and will look into the issue.

nsoranzo commented 5 years ago

Cool, thanks!

dvantwisk commented 5 years ago

Apologize that this change took so long. The 1.3.1 version will now preserve the matrix name:

> u <- matrix(rpois(20000, 5), ncol=100)
> v <- log2(u + 1)
> scle <- SingleCellLoomExperiment(assays=list(counts=u, logcounts=v))
> export(scle, 'test.loom')
> imported_scle <- import('test.loom', type='SingleCellLoomExperiment')
> assays(scle)
List of length 2
names(2): counts logcounts
> assays(imported_scle)
List of length 2
names(2): counts logcounts
nsoranzo commented 5 years ago

Fantastic, thanks @dvantwisk !