Open lgatto opened 1 month ago
The NaArray
is work in progress.
A comment on the above from Hervé:
You seem to have quite a few NaN's too. You'll improve sparsity, and hence reduce memory footprint, if you replace them with
NA
's.
For a full dataset without any NaNs:
> x <- getWithColData(leduc2022_plexDIA(), 47)
see ?scpdata and browseVignettes('scpdata') for documentation
loading from cache
Warning message:
'experiments' dropped; see 'drops()'
> object.size(assay(x))
3283096 bytes
> object.size(NaArray(assay(x)))
1571688 bytes
Yeeees finally !!! I had lost hope for sparse NA matrices since I read this thread: https://stackoverflow.com/questions/1274171/creating-and-accessing-a-sparse-matrix-with-na-default-entries.
How would you see this implemented? For SCP, it makes sense to always store the assay data as sparse arrays,hence this could be integrated into readSCP()
.
I would however hold the implementation until the functionality for NaArray
has matured. For instance, I see that matrix algebra is not yet available.
The testing/benchmarking will be part of @leopoldguyot thesis work.
The example below speaks for itself:
Ping @cvanderaa