Closed saifsikdar closed 5 years ago
Your final line needs to be changed to
adonis(ps_allvend_ctrl_bray ~ vendor, data = sampledf)
The left-hand side of the formula passed to adonis
function needs to be a distance matrix of the samples (rows) in sampledf
.
Hi @joey711
Thanks again for your previous help. Now, I am trying to do PERMANOVA using the "adonis" function to see if ASVs clustered separately for 3 different vendors (CR, JAX and TAC) has statistical significance. I tried multiple ways using phyloseq object, but I always get an error massage as mentioned at end of the code. Can you please help me to identify the problem here? Thank you!
my phyloseq object (ps_allvend_ctrl) output: phyloseq-class experiment-level object otu_table() OTU Table: [ 2097 taxa and 15 samples ] sample_data() Sample Data: [ 15 samples by 11 sample variables ] tax_table() Taxonomy Table: [ 2097 taxa by 7 taxonomic ranks ] phy_tree() Phylogenetic Tree: [ 2097 tips and 2095 internal nodes ]
code I used for coordination and PERMANOVA
calculating bray curtis distance matrix
making a data frame from the sample_data
running adonis test
Output adonis(ps_allvend_ctrl ~ vendor, data = sampledf) Error in rowSums(x, na.rm = TRUE) : 'x' must be an array of at least two dimensions
---attachment contains the sanpshot of my sample_data