# How to use comment directive in metadata exactly？

**URL:** https://forum.qiime2.org/t/how-to-use-comment-directive-in-metadata-exactly/24893
**Category:** User Support
**Created:** [November 30, 2022, 3:21am UTC](https://forum.qiime2.org/t/how-to-use-comment-directive-in-metadata-exactly/24893 "2022-11-30T03:21:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jjj33](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jjj33/32/14539_2.png) [@jjj33](https://forum.qiime2.org/u/jjj33)
#### Post date: [November 30, 2022, 3:21am UTC](https://forum.qiime2.org/t/how-to-use-comment-directive-in-metadata-exactly/24893/1 "2022-11-30T03:21:40Z")

</div>

Hi everyone:  
I was doing beta diversity analysis while encountering this error:  
**(1/1) Invalid value for '--m-metadata-file': Metadata column is of type 'numeric', but expected Categorical.**  
So I searched on the Forum and find a suggestion to use a _comment directive_ #q2:types in my metadata file. However, there is no specific demonstration in QIIME 2 doc.  
Can anyone give a concrete tutorial or example of how to add comment directive in a metadata file? Thanks a lot!

---

<div class="post-metadata">

### Author: ![timanix](https://forum.qiime2.org/user_avatar/forum.qiime2.org/timanix/32/17879_2.png) [@timanix](https://forum.qiime2.org/u/timanix)
#### Post date: [November 30, 2022, 7:55am UTC](https://forum.qiime2.org/t/how-to-use-comment-directive-in-metadata-exactly/24893/2 "2022-11-30T07:55:43Z")

</div>

Hello!  
Here is a [metadata](https://data.qiime2.org/2022.8/tutorials/moving-pictures/sample_metadata.tsv) from "Moving Pictures" tutorial as an example of metadata with #q2:types.  
Another way to achieve the same goal is to add characters to the levels. For example: Trt1, Trt2 and Trt3.

---

<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: [December 31, 2022, 1:56pm UTC](https://forum.qiime2.org/t/how-to-use-comment-directive-in-metadata-exactly/24893/3 "2022-12-31T13:56:22Z")

</div>

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