vegan – Distance Matrix input from Qiime2 to R

I am trying to input a distance matrix from qiime2 to R. (Illumina Miseq Data.) Upstream processing up to the generation of distance matrices was performed as described on the qiime2 doc “moving pictures”
When I try to import the .tsv file of the bray_curtis_distance into R, I get the following error message:

imported_dist_matrix<-as.dist(dist_bray_df)
Warning messages:
1: In storage.mode(m) <- “numeric” : NAs introduced by coercion
2: In as.dist.default(dist_bray_df) : non-square matrix
imported_dist_matrix<-as.dist(dist_bray)
Warning messages:
1: In storage.mode(m) <- “numeric” : NAs introduced by coercion
2: In as.dist.default(dist_bray) : non-square matrix

I don’t know why my distance matrix has turned non-square which seems to tamper with the as.dist-function.

print(dist_bray)
A tibble: 130 × 131
…1 1-12-…¹ 1-12-…² 1-12-…³ 1-8-3…⁴ 1-8-3…⁵ 1-8-3…⁶ 2-21-…⁷ 2-21-…⁸ 2-21-…⁹ 3-15-…˟ 3-15-…˟

1 1-12-43-… 0 0.462 0.552 0.716 0.996 0.918 0.755 0.649 0.671 0.664 0.712

I just want to save the distance matrix from qiime2 into the as.dist-format in R so I can use metaMDS and so on on it.

Thank you very much in advance!

Read more here: Source link