Open chrstraub opened 7 months ago
Hi! that is strange, and probably a bug in comp_barplot.
To investigate, can we simplify the problem a little?
Are you able to use comp_barplot on this dataset with any other settings? e.g. with no unnecessary customisation arguments:
p2 %>% comp_barplot(tax_level = "Family")
Try with a different rank? your dataset has unusually few distinct taxa, so one hypothesis I have is maybe you are running into a bug because of this. Are they perhaps all ASVs in the same Family? Try Genus, if you have that, and/or maybe change n_taxa from the default 8 to 2, or even 1
p2 %>% comp_barplot(tax_level = "Genus", n_taxa = 2)
Another possibility is that a dependency update has broken something 😬
can you copy paste the output of sessionInfo() ? Run all your code up to the line before the error, then run sessionInfo()
Hi David,
ah yes - I thought I had tried that, but changing the taxonomic level worked. Yes, there is only two different genera in this subset of samples and changing the level from "Family" to "Genus" worked.
Maybe you could build in an error message for a case like that, as that would be helpful for troubleshooting.
Thanks for your help, Christina
Hi,
I have a problem plotting relative abundance for some of my samples. This is my phyloseq object, which definitely has an OTU table:
when I run:
any idea why this is not working? There are highly abundant OTU in this dataset - e.g
but that shouldn't be a problem, right?
The dataset I am presenting above - is one sample type of two in the overall dataset. If I plot both sample types together using the same command as above, it works. If I plot only the other sample type (soil) it works. But if I try the one above, it doesn't and I can't quite pinpoint why.
Thanks!