Phyloseq metadata error, qiime2R

Greetings,
My phyloseq object is working fine, with one exception, i’m trying to make ordination plots using this script (https://rstudio-pubs-static.s3.amazonaws.com/268156_d3ea37937f4f4469839ab6fa2c483842.html#heat_maps)
and when i try to plot my data, i got an error due to the fact that my sample metadata file is included in phy object without the header, and I need the header to tell what groups I want to consider, for example in my PCoA plot under weighted unifrac distance matrix. (i’m using the same sample metadata file that i had used in qiime2 analysis, might the header not be considered due to this symbol # in the first cell?)
Is there an easy way to tell R that i want to include the header of the sample metadata, or some reason why it is being excluded??

Hi Sara,

I thought I had fixed this issue. Can you try to update to the newest version of qiime2R by reinstalling using install_github. If the problem still persists, you can always read in your separate artifacts one by one, and then build the phyloseq object. Specifically, use metadata<-read.table("yourmetadata.tsv", sep="\t", comment.char="", header=T) where comment.char="" will cause the # to be ignored and included in the header.

Jordan

1 Like