Hello! This is my first time posting in the forum. I am relatively new to QIIME2, and I am coming in on the back end of a project to finish up the analysis. I currently trying to run an alpha-rarefaction plot, but I keep getting this error message:
There was an issue with loading the file Sznite_Metadata_rbcL.txt as metadata:
Metadata file path doesn't exist, or the path points to something other than a file. Please check that the path exists, has read permissions, and points to a regular file (not a directory): Sznite_Metadata_rbcL.txt. There may be more errors present in the metadata file. To get a full report, sample/feature metadata files can be validated with Keemei: https://keemei.qiime2.orgFind details on QIIME 2 metadata requirements here: Metadata in QIIME 2 — QIIME 2 2020.2.0 documentation
This is the command I am running:
qiime diversity alpha-rarefaction \
-i-table table-rbcL.qza
--i-phylogeny rooted-tree-rbcL.qza
--p-max-depth 4000
--m-metadata-file Sznite_Metadata_rbcL.txt
--o-visualization alpha-rarefaction.qzv
This metadata file was previously used in Qiime2-2019.4 but I am currently using 2020.2. Will formatting make a difference here?
Great! Im glad its in your directory. (Seriously, this happens to me so often). If you run head on that metadata file (you dont have to post the results), does it look the way you expect?
Hi @amcrowell - any chance you made the same kind of mistake when running the QIIME 2 command, above? The error message you reported is saying the same thing - there is no file by that name at the location you specified.
Hello, I ran the command with the correct file name and I get the following error message:
There was an issue with loading the file Szinte_Metadata_rbcL.txt as metadata:
Found directive '#q2:types\tcategorical\tcategorical\tnumeric\tnumeric\tnumeric\tcategorical\tcategorical\tcategorical\tcategorical\tcategorical' while searching for header. Directives may only appear immediately after the header.
There may be more errors present in the metadata file. To get a full report, sample/feature metadata files can be validated with Keemei: https://keemei.qiime2.org
Woot! That is a new error message, and in the right direction. Looks like QIIME 2 found your metadata file (yay!), now it is having a hard time actually reading the file, because it appears to be invalid. According to the message, you appear to be missing a header line. Take a look at this doc and make sure that your metadata file is formatted correctly.:
Hmmm, why do you have quotes (") at the start and end of every line? Those shouldn't be there and are almost certainly going to throw off QIIME 2 (because they are invalid).