Is Sample Metadata Necessary in QIIME 2?

Hello,
After allocating more RAM to my virtualbox on my PC, I was able to successfully complete the Data2 denoise command, albeit I let it run for 6 days. I now have table.qza and a rep-seqs.qza file. I am following the Moving Pictuers tutorial with my own data and now I need to perform the feature table summarize and feature table tabulate commands. I do not have a metadata and I thought that I didn’t need to create one as I imported a manifest file and sample data file in my first step. Do I still need to create a metadata file? I tried using the following command:
qiime feature-table summarize
–i-table table.qza
–o-visualization table.qzv
–m-sample-metadata-file rep-seqs.qza

and I got the following error:
Plugin error from feature-table:

“None of [Index([‘A6’, ‘MidEastSd’, ‘E12’, ‘Day0’, ‘C12’, ‘F12’,
‘SLopezSd’, ‘A18’,\n ‘SJChannel’, ‘C18’, ‘A12’, ‘Rosario’,
‘F18’, ‘NLopezSd’, ‘F14’,\n ‘MthEastSd’, ‘C10’, ‘E6’, ‘Upright’,
‘C14’, ‘F10’, ‘Roche’, ‘E18’, ‘F6’,\n ‘B18’, ‘SJDF’, ‘B10’,
‘D18’, ‘E14’, ‘D14’, ‘D6’, ‘A10’, ‘E10’, ‘B8’,\n ‘C8’, ‘A16’,
‘DeadMans’, ‘C16’, ‘D16’, ‘OATap’, ‘B14’, ‘D10’, ‘B16’,\n
’NJDF’, ‘C6’, ‘F16’, ‘E2’, ‘D8’, ‘C20’, ‘F2’, ‘F20’, ‘B6’, ‘F4’,
‘E20’,\n ‘Gig’, ‘C2’, ‘F8’, ‘A14’, ‘E4’, ‘Mitchell’, ‘D2’, ‘B2’,
‘Hood’, ‘B12’,\n ‘A20’, ‘C4’, ‘CattlePt’, ‘B20’, ‘A4’, ‘B4’,
‘D12’, ‘E16’, ‘A8’,\n ‘Fidalgo’, ‘D4’, ‘D20’, ‘A2’, ‘E8’],\n
dtype=‘object’)] are in the [index]”

Please advise.

1 Like

Hi @Lisa_Crummett!

Yay!

The manifest format is something different than metadata in QIIME 2. Your manifest file was responsible for telling QIIME 2 about your data, so that it knew how to import it. The sample metadata file is about telling QIIME 2 about various study-specific metadata (treatment vs control, timepoints, environmental measurements, etc.) Some actions in QIIME 2 require metadata, while some don't, it depends on what the action is intending to do. feature-table summarize is an example of a visualizer that optionally accepts metadata.

The reason you got this error is because you provided a file that is viewable as metadata (rep-seqs.qza), but this data is oriented along the feature axis, while the summarize command is looking for metadata oriented along the sample axis. This error is specifically QIIME 2 complaining about not being able to find your sample IDs in your rep-seqs.qza file, which makes sense, because that file contains representative sequences, which is feature data.

Moving forward, you can rerun the command sans --m-sample-metadata-file, but I would recommend creating a sample metadata file, if it makes sense for your study. You can check out keemei, a tool we have created to help with setting up those files. I would also highly recommend going through the Metadata tutorial when you get a chance.

Hope that helps!

2 Likes

Thank you so much, this does clarify things for me. I did have a look at the Keemei instructions and it says that the second column in your metadata file should be the barcode sequence and the third column should be the linker-primer sequence. I am confused because each of my samples is associated with two indeces (Index 1 and 2). I performed general 16S paired end Ilumina sequencing. So what does “the barcode sequence” and the “linker-primer sequence” correspond to in the Keemei instructions? Shouldn’t there be two barcode sequences? I’m sorry if I am missing something that should be obvious…

By the way, my data is already demultiplexed so maybe I don’t need the “barcode sequence” and “linker-primer sequence” columns?

Hi @Lisa_Crummett, sorry about the Linker Primer Sequence and Barcode confusion --- keemei was originally written for QIIME 1, which had those requirements. You can use keemei to validate QIIME 2 metadata files by selecting the following option:

QIIME 2 metadata files don't have the same kinds of column-specific requirements as QIIME 1 did - please take a look at this section of the Metadata tutorial for a complete list of the requirements for QIIME 2 metadata text files.

The TLDR here is you don't need the barcode or linker primer sequence columns, you are free to add whatever metadata makes the most sense to you! Thanks!

Thanks. The scree capture that you attached is not familiar to me. When I am running Qiime2 in virtualbox, I dont’ have a tool bar like that with “Tools, Add-ons” where I can select “Keemei” and then “validate with Qiime2”. I may just try running the command with my new metadata file. Can the metadata file be .csv or does it have to be a .tsv file?

Yay, it worked! I am able to look at my visualization files after running the commands for summarizing and tabulating my metadata. It’s really cool!

Please see the link to keemei I provided above --- it is a Google Sheets add-on!

Metadata must be TSV (for now).

Woohoo!!

An off-topic reply has been split into a new topic: Feature Table / Metadata Index Mismatch

Please keep replies on-topic in the future.

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