Closed csoneson closed 3 years ago
Any thoughts on where raw
should go in the SingleCellExperiment? It doesn't necessarily have the same dimensions as X
or layers
so it can't always be stored as an assay. Maybe altExp
is a better fit?
That would make sense to me - I think the idea of the two (altExp
and raw
) is also similar, right? An additional "object" of more or less the same type stuck inside the main object :)
👍🏻 Need to double check exactly what can be in raw
but in theory I think that will work.
As long as it has the same number of columns, you can stick it in an altExp
.
The other option would be to store it as a seed in a subsetted DelayedArray, so you can easily get the raw matrix via seed()
.
This should be working now in devel, you will just need to set raw = TRUE
in readH5AD()
or AnnData2SCE()
. If you test it and run into any issues let us know.
Thank you! I'll give it a try and let you know if I run into problems.
(As discussed briefly in the Bioc slack). It would be cool if it was possible to include e.g.
adata.raw.X
as an assay in theSingleCellExperiment
(e.g., when theX
matrix in the retrievedAnnData
object contains normalized values, but you still want thatcounts
assay). It looks like theraw
slot is not a validAnnData
object in itself, so it can't be provided directly toAnnData2SCE()
:However, accessing the matrix directly works