I am trying to do analyses with QIIME2 artifacts by importing them into R with the qza_to_phyloseq command included with the QIIME2R package. I have two sets of genetic data from the same samples, 16s and 18s sequences. When importing the 16s artifacts, it imports it as a Large Phyloseq object, but when importing 18s artifacts they're imported into a Formal class phyloseq. In both cases I am importing table.qza, taxonomy.qza, rooted-tree.qza and metadata.tsv into the Phyloseq object.
I suspect this discrepancy is the cause of the some problems I have trying to run some analyses in R with 18s data. Lefser, for example, won't work with 18s at the phylum level, instead printing the error: Error: object has no 'class' attribute. Could anyone explain to me why this discrepancy is happening and how can I avoid it?
I'm afraid most of us aren't familiar enough to catch off-hand what is happening.
Would you be able to provide some str() outputs of the two objects? Maybe the difference will make this more obvious.
Some things that phyloseq does which can cause an issue if you don't know, is it will take the intersection of all of your fields, so in the event of a mismatch you end up in a slightly confusing situation, especially if you are used to our "left-join" semantics with QIIME 2 metadata or taxonomy.
I'm hoping to see something like that from the str() results.
Otherwise, there's a funky bit of code you could run which will convice R to make something likea traceback: