Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clashing transpose method with Matrix #1764

Open
BertvanderVeen opened this issue Jul 8, 2024 · 0 comments
Open

Clashing transpose method with Matrix #1764

BertvanderVeen opened this issue Jul 8, 2024 · 0 comments

Comments

@BertvanderVeen
Copy link

BertvanderVeen commented Jul 8, 2024

phyloseq's export of the base R transpose method seems to do something weird that clashes with the transpose method of the Matrix package. In essence, if you load phyloseq, and try to transpose a sparse matrix with the transpose function from the Matrix package, it crashes R. As a consequence, Example:

library(phyloseq)
t(matrix(0)) # fine
Matrix::t(as(matrix(0),"TsparseMatrix")) # also crashes

My feeling is that this has to do with the way that phyloseq exports its transpose functionality; at present this is non-specific, whereas it would be great if it could -only- export it for phyloseq objects instead (i.e., define transpose.phyloseq instead). It would be great if this could be fixed, because presently it greatly frustrates any workflows that incorporate both phyloseq and sparse matrices of some kind..

I'm can submit a PR if that is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant