jbisanz / qiime2R

Import qiime2 artifacts to R
MIT License
156 stars 53 forks source link

Fix import to phyloseq #34

Closed akiledal closed 3 years ago

akiledal commented 3 years ago

I've been having an issue (I think since an upgrade to R versions > 4.0) where qza_to_phyloseq(features = "table.qza", taxonomy = "silva_132_taxonomy.qza") returns this error:

Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘prune_samples’ for signature ‘"array", "phyloseq"’

It seems to be an error with phyloseq, possibly related to changes in how matrices are handled in newer versions of R. Simply converting the imported matrix to dataframe before passing it to phyloseq::otu_table() seems to fix the issue.

BisanzLab commented 3 years ago

Thanks for this fix!