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/
582 stars 187 forks source link

tax_glom, invalid archetype provided #1598

Open chuynh96 opened 2 years ago

chuynh96 commented 2 years ago

Hello, I'm trying to make a composition plot that is proportional, but for some reason I keep getting an error for tax_glom. Earlier today I ran this code on a different dataset and didn't have issues, so I want to know what I need to do to be able to plot. Thank you!

Making a percentage bar plot

ps.rel = transform_sample_counts(ps, function(x) x/sum(x)*100)

agglomerate taxa

glom <- tax_glom(ps.rel, taxrank = 'Genus', NArm = FALSE)

Error in merge_taxa.indices.internal(x, eqtaxa, archetype) : invalid archetype provided.

ycl6 commented 2 years ago

Hi @chuynh96

Based on #1110, it seems your OTU table contains NA

jspychalla commented 10 months ago

My OTU table contains NaN after normalization. Is there a way to filter out the NaNs from the phyloseq object? tax_glom yields the same error for me.