I’m new to Qiime2 and working with a small practice dataset to get a handle on the basics. When I try to generate core diversity metrics, I get an error that the metadata file path doesn’t exist. The metadata file is in the correct format, validated with Keemei, located in the working directory, and has read permissions. It’s a very simple txt file with sample IDs and two categorical variables. All the files are located locally on the computer (macOS Tahoe) in the working directory, and I’m running qiime2-amplicon-2024.10.
There was an issue with loading the file 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):
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
Can you run stat practice1_mapping.txt and post the output here? And can you confirm that qiime metadata tabulate does work and qiime diversity core-metrics-phylogenetic does not work back-to-back in the same terminal and post a screenshot of that here? There may be a problem with the file's permissions, but I would expect that to cause all commands to fail. Very unusual for one command to succeed and the other to explode.
I am baffled... Is there any chance you can update to a newer version of QIIME 2 and try that? If not, or if that doesn't work, can you DM me your metadata file? I am entirely unable to replicate this in the latest version of QIIME 2 or in 2024.10. There may be something very obvious I'm missing, or there could be something particular to that file.
Something unusual I'm only just noticing about this. The error says
There was an issue with loading the file as metadata:
It appears to have a few spaces or maybe a tab where the filename ought to be. This error is happening before the Action is invoked at all it's happening while we are pre-processing the input. In other words, both core-metrics-phylogenetic and metadata tabulate are running the code that's causing the error so both ought to raise the error. I still can't make it happen, even with your file.
When I run core-metrics-phylogenetic with your metadata file, I get an expected error that none of my sample identifiers match, which means I am past where your error is being produced. For it to tell me that, it actually has to read the metadata file, which is failing for you.
I guess can you post the table and the tree you're using? That really shouldn't matter for this error, but I'm still at a loss as to what is happening here.
Can you move all the files for core-metrics into a new dir and try again?
To @Oddant1's point, if I put the wrong metadata name the error tells me what metadata is missing. Here is says There was an issue with loading the file practice1_mapping_file1.txt as metadata: This makes me think this is a weird formating issue.
Have you tried re-writing the command by hand and re-running?