adonis test - empty rows and missing values with method="bray" #485
Unanswered
adrianacravo
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Obviously you have empty rows in your data. With "empty" I mean rows which have no species but are all zeros. You should remove them. I don't know where you get the function There is no way to calculate a Bray-Curtis dissimilarity between two non-existent communities, but you get |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
I'm stuck at a problem with the adonis function and have no idea how to move forward, after trying some possibilities.
First, I have a phyloseq object, which is an object with an abundance component (abundance of OTUs across samples), a metadata file and the taxonomy file for the OTUs.
I'm trying to run an adonis test to see if the abundance of OTUs differs among the species id and the load of a pathogen.
That's how my object looks like:
phyloseq-class experiment-level object
otu_table() OTU Table: [ 123 taxa and 551 samples ]
sample_data() Sample Data: [ 551 samples by 27 sample variables ]
tax_table() Taxonomy Table: [ 123 taxa by 7 taxonomic ranks ]
So, to perform the permanova, I did:
comp_16S <- transform(pruned16Sabund, "compositional")
#transformed my data to compositionalabund_16S <- abundances(comp_16S)
#extracted the abundance of my OTUsmeta_16S <- meta(comp_16S)
#the table where species id and pathogen load areHowever, when I run
adonis_spp16S <- adonis(t(abund_16S) ~ species, data = meta_16S, permutations=9999, method = "bray"
, I get the error message:Warning messages:
1: In vegdist(lhs, method = method, ...) :
you have empty rows: their dissimilarities may be meaningless in method “bray”
2: In vegdist(lhs, method = method, ...) : missing values in results
I've already tried to increase the abundance threshold from 0.0005 to 0.001, in case the low abundant OTUs were causing the problem and still got the same issue. I also tried to remove rows or columns that were empty, but no empty rows/ columns were found
comp_16Srem <- remove_empty(abund_16S, which = "rows", quiet = FALSE)
#no empty rows to removecomp_16Srem <- remove_empty(abund_16S, which = "cols", quiet = FALSE)
#no empty columns to removeJust in case, I also transformed my character into factor:
meta_16S$species <- as.factor(meta_16S$species)
, but nothing changed.I've done adonis test with my phyloseq objects many times and never had this issue. It is normal to have many zeros in an abundance table for microorganisms, so I don't know how to fix this at the moment. Does someone know a way out?
As a background info, that's my filtering step where I select the threshold of abundance that will be considered for my data:
min = 0.001
for16S = taxa_sums(prunedSet16S)
#original phyloseq object used for the filteringkeep16S = (forl16S / sum(forl16S)) > min
pruned16Sabund = prune_taxa(keep16S, prunedSet16S)
Any help is appreciated! Thanks a lot,
Adriana
Beta Was this translation helpful? Give feedback.
All reactions