Newbie Metadata File Error

Hello! I am new to the world of qiime2 and receiving a metadata error message in my terminal. I am using MacOS with a newly updated qiime2, version qiime2-2023.2

I am trying to run the command:
qiime feature-table filter-samples
--i-table table_natural_na.qza
--m-metadata-file manumapping_corrected_19.txt
--p-where "[Especie] IN ('attas', 'attabis', 'attalae', 'attacap', 'lab')" \
--o-filtered-table table_species_Alex1.qza

My exact error message is:

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

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

I am 100% positive that I have the correct file name and that I am in the correct directory (as I saw in other forum posts with the same error message). I know that the file is present also because it shows up when I run ls command. I can open the file as a text (tab space) and excel is perfectly fine so I know the file also does not have issues. I also ran Keemei which reported no issues for qiime2 metadata. I have no idea what I am doing wrong or how the path couldn't exist otherwise, does anyone have any advice on how to fix this? Thank you!

1 Like

Hello @axia,

Welcome to the forums :qiime2:

Mysterious! Because you know the file path is correct, I wonder if the Qiime2 command is messed up in a subtle way.

I noticed that the command you ran has one line ending in a backslash:

qiime feature-table filter-samples
--i-table table_natural_na.qza
--m-metadata-file manumapping_corrected_19.txt
--p-where "[Especie] IN ('example')" \ <------- this backslash
--o-filtered-table table_species_Alex1.qza

Linux command usually are on a single line
qiime info
To continue a command onto a second line, you add a \ backslash \

qiime \
  info # This should work
qiime
  info # This will not

Try this command:

qiime feature-table filter-samples \
--i-table table_natural_na.qza \
--m-metadata-file manumapping_corrected_19.txt \
--p-where "[Especie] IN ('attas', 'attabis', 'attalae', 'attacap', 'lab')" \
--o-filtered-table table_species_Alex1.qza # the final line has no backslash
1 Like

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