joey711 / phyloseq

phyloseq is a set of classes, wrappers, and tools (in R) to make it easier to import, store, and analyze phylogenetic sequencing data; and to reproducibly share that data and analysis with others. See the phyloseq front page:
http://joey711.github.io/phyloseq/
579 stars 188 forks source link

Allow otu_table to be *sparse* #549

Open mafed opened 8 years ago

mafed commented 8 years ago

As often abundance data matrices are full of zeroes, it could be useful to allow otu_table(physeq).@Data slot to accept also sparse matrices, I'm thinking to dgCMatrix-class. Is it feasible? Would it change phyloseq structure?

joey711 commented 8 years ago

It would be a low-level change to the phyloseq class definition, but Matrix package is very mature, so I suspect that most things would still work if "otu_table" class inherited from "Matrix" rather than "matrix".

I haven't tested, but I'm very curious. I think this is a nice feature request. Will leave open for now...

PingWang7 commented 2 weeks ago

May I ask if this suggestion has been optimized in subsequent versions?