Problem with OTU Table

Hi everyone! I’m Carolina Alventosa Díaz and I’m a master student and it’s my 1st time working with phyloseq and vegan package (but i had work with R many times before).

I’m working with the bowel content from rats and send my DNA extraction for 16S rRNA gene amplicon data for do a Taxonomic classification (With Qiime2). So I have done this and now I need to do the ANOSIM test and NMDS plot.

The problem is that I read that I need to do a OTU table for combinate the table.qza and taxonomy.qza and I manage for create that table, but when I put in R for do the ANOSIM test or NMDS plot, the console sends me an error:

Error in vegdist(x, method = distance) : input data must be numeric

And I see the OTU table and I saw . instead , in the numbers, so I swapped all of them and change the type of data from text to numeric, but when I try to run again the command, the same error appears.

So I let you an image from my table (In Excel and in R) and if someone know how to solve this or give me a path to do a OTU table without problems, I will be very grateful.

Commands in qiime2 to create the OTU table:

qiime taxa collapse \
  --i-table table.qza \
  --i-taxonomy taxono.qza \
  --p-level 6 \
  --output-dir taxtable/

qiime tools export \
  --input-path collapsed_table.qza \
  --output-path exported-feature-table

biom convert -i feature-table.biom -o table-biom.tsv --to-tsv

(I transformed after the .tsv into a .csv via excel from google drive)

Commands in R for the ANOSIM test:

pc = read.csv("C:\\Users\\dicar\\Desktop\\Máster Microbiología Sanitaria\\TFM\\Secuenciacion\\t\\exported-feature-t\\table-biom2.csv", header= TRUE)

#make community matrix - extract columns with abundance information, turn data frame into matrix
com = pc[2:ncol(pc),2:ncol(pc)]
m_com = as.matrix(com)

ano = anosim(m_com, pc$Type, distance = "bray", permutations = 9999)

(I had used the “com = pc[2:ncol(pc),2:ncol(pc)]” command to take only the numeric values from the table)