gmteunisse / fantaxtic

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

Relative abundance option in get_top_taxa does not turn off #2

Closed tiagobrc closed 5 years ago

tiagobrc commented 5 years ago

Hi,

Great package!! I checked the code, and it seems to be related with the fantaxtic_barplot. It turns the table into relative abundance regardless of what the get_top_taxa does. Is it anything I can do? Did I do something wrong?

Thanks!

T

gmteunisse commented 5 years ago

Hi Tiago,

Thanks for using the package! I have been out of this field for a while, so excuse my late response.

Could you give me a bit more detail of what you are trying to achieve or what goes wrong, perhaps with some example code?

I'm also thinking that it might be my documentation that is not clear: fantaxtic_barplot was only intended to display relative abundances. I implemented it like this, because - in my experience - sequencing depth per sample can easily differ by a factor 10, making the results after plotting very hard to interpret. Would you be helped if you could plot the raw counts?

tiagobrc commented 5 years ago

Hi Thanks for helping! Thanks for implementing this package, it is easier to plot relative abundances than phyloseq itself.

in get_top_taxa, we have the option: relative = TRUE. I thought would be possible to turn this off by using relative = FALSE.

But it does not happen. It seems that fantaxtic plot always converts it to relative regardless of relative = TRUE/FALSE.

The reason to plot relative is only practical since I can just use phyloseq/ggplot2 for that. But sometimes it is useful for examining the raw data.

Thanks!!

gmteunisse commented 5 years ago

Hi Tiago,

The relative = TRUE option in get_top_taxa only help with the selection of your top taxa, but is not transferred through to the fantaxtic_bar function. There are (at least) two ways of defining the "most abundant taxa", namely the raw number of reads per taxon, or the relative number of reads per taxon, which I think is more useful. If you take the raw number of reads, the "most abundant taxa" get heavily influenced by samples with more reads, leading to skewed results.

I could add a similar variable to fantaxtic_bar, but I think the results will become hard to interpret due to large intersample reads variation. Let me know what you think.

On Thu, Feb 7, 2019 at 12:26 PM Tiago Bruno Rezende de Castro < notifications@github.com> wrote:

Hi Thanks for helping! Thanks for implementing this package, it is easier to plot relative abundances than phyloseq itself.

in get_top_taxa, we have the option: relative = TRUE. I thought would be possible to turn this off by using relative = FALSE.

But it does not happen. It seems that fantaxtic plot always converts it to relative regardless of relative = TRUE/FALSE.

Thanks!!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gmteunisse/Fantaxtic/issues/2#issuecomment-461255442, or mute the thread https://github.com/notifications/unsubscribe-auth/AcNpbtXTXhIRS0fj3a2ch0bvf1yJg825ks5vK4C7gaJpZM4aTgow .

tiagobrc commented 5 years ago

Thanks for the clarification. after your explanation, I think it is not necessary to plot the raw data indeed.

Thanks!!