Error in Aldex2 for differential abundance in Qiime2

I having issues running the following code
qiime aldex2 aldex2 --i-table samples_10000_frequency_filtered.qza --m-metadata-file metadata.txt --m-metadata-column subject --output-dir gut-test

(1/1) Invalid value for “–m-metadata-file”: There was an issue with

retrieving column ‘subject’ from the metadata:

It could be because of the format of metadata file. I would like to know if there is anyway in QIIME2, I can get differential abundance from taxonomic file or Aldex2. What format does Aldex2 requires?

1 Like

Hello @Ishanmanandhar,

Welcome to the forums! :qiime2:

This looks like a metadata formatting issue. Hopefully we can fix this pretty easily.

Would you be willing to post the first few lines of your metadata file? I'm especially interested in the subject column.


1 Like

Another good option @Ishanmanandhar is to run:

qiime tools inspect-metadata

on your metadata file - this will give you a listing of all the columns identified (among other things).

1 Like

Thank you for your response.

The metadata I have is from American gut project. This file perfectly worked for other steps in Qiime2.

1 Like

@Ishanmanandhar could you check to make sure that there is a subject column in the metadata file? I’m looking through an old copy of the American Gut Project metadata right now, and I don’t see any column named subject (although there are similarly-named columns, e.g. host_subject_id).


Like you said, I don’t see Subject column in the metadata file but there are some column names host_taxid, host_common_name. Does Subject column refers to disease and non- disease condition. In my case ibd and control.

1 Like

Hi @Ishanmanandhar,

So, the thing you specify for --m-metadata-column needs to be a column in your metadata file. The “meaning” of subject, or of any other metadata column name, is dependent on your specific metadata file. In the case of the Moving Pictures tutorial data that the q2-aldex2 tutorial uses, subject refers to the individual who provided a sample (subject-1 or subject-2).

The --m-metadata-column for q2-aldex2 defines “the different groups you will be testing”. If you’re going to use q2-aldex2 to look at differentially abundant features between – in your case – IBD and “control” samples – you will need to figure out what metadata column indicates whether a sample is “IBD” or “control” (or something else? you may want to filter the table first, depending on the question you’re asking), and then use this column as --m-metadata-column when you run q2-aldex2. You’ll need to figure this out regardless of what differential abundance method you use, including ANCOM, Songbird, gneiss, etc.


Thank you for you time and response. I really appreciate your help. I will try to imply your suggestions and I think you pretty much solved my problem but I will keep updating about my progress about this.


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