# Is Sample Metadata Necessary in QIIME 2?

**URL:** https://forum.qiime2.org/t/is-sample-metadata-necessary-in-qiime-2/1216
**Category:** User Support
**Tags:** metadata
**Created:** [September 12, 2017, 6:54pm UTC](https://forum.qiime2.org/t/is-sample-metadata-necessary-in-qiime-2/1216 "2017-09-12T18:54:42Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Lisa\_Crummett](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lisa_crummett/32/4280_2.png) [@Lisa\_Crummett](https://forum.qiime2.org/u/Lisa_Crummett)
#### Post date: [September 12, 2017, 6:54pm UTC](https://forum.qiime2.org/t/is-sample-metadata-necessary-in-qiime-2/1216/1 "2017-09-12T18:54:42Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [September 12, 2017, 8:02pm UTC](https://forum.qiime2.org/t/is-sample-metadata-necessary-in-qiime-2/1216/3 "2017-09-12T20:02:56Z")

</div>

Hi @Lisa_Crummett!

> [@Lisa\_Crummett](#):
>
> I was able to successfully complete the Data2 denoise

Yay!

> [@Lisa\_Crummett](#):
>
> . 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

The [manifest format](https://docs.qiime2.org/2017.8/tutorials/importing/#fastq-manifest-formats) is something different than [metadata](https://docs.qiime2.org/2017.8/tutorials/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.

> [@Lisa\_Crummett](#):
>
> I got the following error:

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](http://keemei.qiime.org/), a tool we have created to help with setting up those files. I would also highly recommend going through the [Metadata tutorial](https://docs.qiime2.org/2017.8/tutorials/metadata/) when you get a chance.

Hope that helps!

---

<div class="post-metadata">

### Author: ![Lisa\_Crummett](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lisa_crummett/32/4280_2.png) [@Lisa\_Crummett](https://forum.qiime2.org/u/Lisa_Crummett)
#### Post date: [September 12, 2017, 9:02pm UTC](https://forum.qiime2.org/t/is-sample-metadata-necessary-in-qiime-2/1216/5 "2017-09-12T21:02:00Z")

</div>

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...

---

<div class="post-metadata">

### Author: ![Lisa\_Crummett](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lisa_crummett/32/4280_2.png) [@Lisa\_Crummett](https://forum.qiime2.org/u/Lisa_Crummett)
#### Post date: [September 12, 2017, 9:07pm UTC](https://forum.qiime2.org/t/is-sample-metadata-necessary-in-qiime-2/1216/6 "2017-09-12T21:07:05Z")

</div>

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

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [September 12, 2017, 9:14pm UTC](https://forum.qiime2.org/t/is-sample-metadata-necessary-in-qiime-2/1216/8 "2017-09-12T21:14:34Z")

</div>

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:

 ![05 PM](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/1X/a9612e89ff483d0bcebc880de8655f35057fd13d.png)

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](https://docs.qiime2.org/2017.8/tutorials/metadata/#metadata-from-a-text-file) 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!

---

<div class="post-metadata">

### Author: ![Lisa\_Crummett](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lisa_crummett/32/4280_2.png) [@Lisa\_Crummett](https://forum.qiime2.org/u/Lisa_Crummett)
#### Post date: [September 12, 2017, 11:21pm UTC](https://forum.qiime2.org/t/is-sample-metadata-necessary-in-qiime-2/1216/10 "2017-09-12T23:21:38Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Lisa\_Crummett](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lisa_crummett/32/4280_2.png) [@Lisa\_Crummett](https://forum.qiime2.org/u/Lisa_Crummett)
#### Post date: [September 13, 2017, 12:06am UTC](https://forum.qiime2.org/t/is-sample-metadata-necessary-in-qiime-2/1216/11 "2017-09-13T00:06:25Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [September 13, 2017, 12:26pm UTC](https://forum.qiime2.org/t/is-sample-metadata-necessary-in-qiime-2/1216/12 "2017-09-13T12:26:46Z")

</div>

> [@Lisa\_Crummett](#):
>
> The scree capture that you attached is not familiar to me.

Please see the link to keemei I provided [above](https://forum.qiime2.org/t/is-sample-metadata-necessary-in-qiime-2/1216/3) --- it is a Google Sheets add-on!

> [@Lisa\_Crummett](#):
>
> Can the metadata file be .csv or does it have to be a .tsv file?

Metadata must be TSV (for now).

> [@Lisa\_Crummett](#):
>
> Yay, it worked!

Woohoo!!

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [September 19, 2017, 3:24pm UTC](https://forum.qiime2.org/t/is-sample-metadata-necessary-in-qiime-2/1216/13 "2017-09-19T15:24:56Z")

</div>

An off-topic reply has been split into a new topic: [Feature Table / Metadata Index Mismatch](https://forum.qiime2.org/t/feature-table-metadata-index-mismatch/1278)

Please keep replies on-topic in the future.

---

<div class="post-metadata">

### Author: ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)
#### Post date: [October 20, 2017, 9:25pm UTC](https://forum.qiime2.org/t/is-sample-metadata-necessary-in-qiime-2/1216/14 "2017-10-20T21:25:03Z")

</div>

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