gmteunisse / fantaxtic

Fantaxtic - Nested Bar Plots for Phyloseq Data
26 stars 3 forks source link

Most abundant genera across a complete phyloseq object #26

Closed slambrechts closed 4 months ago

slambrechts commented 11 months ago

Hi,

I'm trying to use fantaxtic to get the top 10 most abundant genera across a complete phyloseq object and list the relative abundances of these top genera. I was trying to do this like so:

top <- top_taxa(physeq, 
                tax_level = "Genus", 
                n_taxa = 10)

But I get:

Error in dimnames(x) <- dn : 
  length of 'dimnames' [1] not equal to array extent

Maybe this has something to do with the fact that I classified my OTUs using Lotus2, and therefore there are "?" in my tax table?

gmteunisse commented 11 months ago

Question marks should definitely be replaced with NA values. Another thing to check is that the tax_table has the correct order (col_1=kingdom, …, col_n=species). If that doesn’t solve it, could you post a reproducible example with data?


From: Sam Lambrechts @.> Sent: Tuesday, December 12, 2023 11:21:12 AM To: gmteunisse/fantaxtic @.> Cc: Subscribed @.***> Subject: [gmteunisse/fantaxtic] Most abundant genera across a complete phyloseq object (Issue #26)

Hi,

I'm trying to use fantaxtic to get the top 10 most abundant genera across a complete phyloseq object and list the relative abundances of these top genera. I was trying to do this like so:

top <- top_taxa(physeq, tax_level = "Genus", n_taxa = 10)

But I get:

Error in dimnames(x) <- dn : length of 'dimnames' [1] not equal to array extent

Maybe this has something to do with the fact that I classified my OTUs using Lotus2, and therefore there are "?" in my tax table?

— Reply to this email directly, view it on GitHubhttps://github.com/gmteunisse/fantaxtic/issues/26, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHBWS3WDTKLBDIDFWAAZRPTYJAVZRAVCNFSM6AAAAABARGWBUWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGAZTONBTGUZTSNI. You are receiving this because you are subscribed to this thread.Message ID: @.***>

slambrechts commented 11 months ago

Thank you for the info

col_1 is listed as Domain instead of kingdom at the moment

I will first replace question marks with NA values

gmteunisse commented 11 months ago

Has your issue been resolved?

slambrechts commented 11 months ago

Hi, no the problem remained after the modifications, so I ended up using something else

gmteunisse commented 11 months ago

I'm sad to hear that. Could you post a reproducible example? It would be nice if I can see what the problem is and fix it.