metadata file path error

Hi,

I'm trying to run a qiime2 diversity analysis on my samples. This is the command I am using:

qiime diversity core-metrics-phylogenetic --i-phylogeny /MacintoshHD/Users/aditikumar/Downloads/qiime2aditi/rooted-tree.qza --i-table /MacintoshHD/Users/aditikumar/Downloads/table-dada2-baseline.qza --p-sampling-depth 5244 --m-metadata-file /MacintoshHD/Users/aditikumar/Downloads/qiime2aditi/samplemetadata3.txt --output-dir /MacintoshHD/Users/aditikumar/Downloads/Outputs/core-metricsbaseline2

This is the error that keeps appearing:

There was an issue with loading the file /MacintoshHD/Users/aditikumar/Downloads/qiime2aditi/samplemetadata3.txt.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): /MacintoshHD/Users/aditikumar/Downloads/qiime2aditi/samplemetadata3.txt.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.org

Find details on QIIME 2 metadata requirements here: Metadata in QIIME 2 — QIIME 2 2022.2.0 documentation

I am using terminal on my mac. I have asked a colleague to run the same command using the same metadata file on his computer (PC) and it ran fine so I don't think the file is the problem. I have triple checked my file path and my colleague (who is much more experienced) also has gone through this with me and can't understand why the command isn't working on my computer. I read somewhere that problems can occur when using a mac?

Can you see a problem? I have tried everything! I've also ensured everything is case sensitive just in case that's the problem.

Thanks in advance
Aditi

Hello!
Somehow extention .txt was repeated in your command. Could you check it there is a typo in the file name when you are running it?

Hi Sorry that was me playing around as my file is saved as samplemetadata3.txt so thought I would try adding a double.txt to see if that made a difference.

This is the command I've used (again with the same error):

qiime diversity core-metrics-phylogenetic --i-phylogeny /MacintoshHD/Users/aditikumar/Downloads/qiime2aditi/rooted-tree.qza --i-table /MacintoshHD/Users/aditikumar/Downloads/qiime2aditi/table-dada2-baseline.qza --p-sampling-depth 5244 --m-metadata-file /MacintoshHD/Users/aditikumar/Downloads/qiime2aditi/samplemetadata3.txt --output-dir /MacintoshHD/Users/aditikumar/Downloads/Outputs/core-metricsbaseline2

To avoid some hidden errors in the path, could you try to run:

cd /MacintoshHD/Users/aditikumar/Downloads/qiime2aditi
qiime diversity core-metrics-phylogenetic \
  --i-phylogeny rooted-tree.qza \
  --i-table table-dada2-baseline.qza \
  --p-sampling-depth 5244 \
  --m-metadata-file samplemetadata3.txt \
  --output-dir ../Outputs/core-metricsbaseline2

Or

cd /Users/aditikumar/Downloads/qiime2aditi
qiime diversity core-metrics-phylogenetic \
  --i-phylogeny rooted-tree.qza \
  --i-table table-dada2-baseline.qza \
  --p-sampling-depth 5244 \
  --m-metadata-file samplemetadata3.txt \
  --output-dir ../Outputs/core-metricsbaseline2

If still error, please, ls the content of the directory with metadata file.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.