# Evaluating and controlling data quality with q2-quality-control

**URL:** <https://forum.qiime2.org/t/evaluating-and-controlling-data-quality-with-q2-quality-control/21276>\
**Category:** Technical Support\
**Created:** [November 8, 2021, 7:07am UTC](https://forum.qiime2.org/t/evaluating-and-controlling-data-quality-with-q2-quality-control/21276 "2021-11-08T07:07:11Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Imee19](https://forum.qiime2.org/user_avatar/forum.qiime2.org/imee19/32/6330_2.png) [@Imee19](https://forum.qiime2.org/u/Imee19)\
**Post date:** [November 8, 2021, 7:07am UTC](https://forum.qiime2.org/t/evaluating-and-controlling-data-quality-with-q2-quality-control/21276/1 "2021-11-08T07:07:11Z")

</div>

I have several questions regarding, [Evaluating and controlling data quality with q2-quality-control — QIIME 2 2021.8.0 documentation](https://docs.qiime2.org/2021.8/tutorials/quality-control/)  
I got my barplot of my Zymo mock communities and so I want to evaluate the data quality of my mock and be able to use it to evaluate my sample set with this known microbial composition.  
Although,I was able to run the tutorial but running my mock data set was a different story.

I got confused with the two inputs : query and reference sequence.

- What is the query sequence, is this the output, representative sequences?
- How about the reference sequence, at what step is this generated?

[mockb1barplot.qzv](https://forum.qiime2.org/uploads/short-url/xCVtHS0GB43marQY7Xtoknq58Vh.qzv) (326.8 KB)

---

<div class="post-metadata">

**Author:** ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)\
**Post date:** [November 9, 2021, 5:50am UTC](https://forum.qiime2.org/t/evaluating-and-controlling-data-quality-with-q2-quality-control/21276/2 "2021-11-09T05:50:09Z")

</div>

Hi @Imee19 ,  
This tutorial might be a little clearer, since it shows how to integrate this plugin in a full analysis:

> [@Fungal ITS analysis tutorial](https://forum.qiime2.org/t/fungal-its-analysis-tutorial/7351):
>
> Fungal ITS analysis, mock communities, and more fun NOTE: This tutorial was written in a QIIME 2 2018.11 environment. It is not guaranteed to work with earlier or later versions of QIIME 2. This tutorial was compiled as a working exercise for a [QIIME 2 workshop](https://workshops.qiime2.org/microbiome-bioinformatics-qiime-2-2018-12-12/) in December 2018, and does not represent the only possible fungal ITS workflow with QIIME 2, or even a benchmarked protocol recommendation. See other tutorials, e.g., the [q2-itsxpress tutorial](https://forum.qiime2.org/t/q2-itsxpress-a-tutorial-on-a-qiime-2-plugin-to-trim-its-sequences/5780) for other fungal ITS analysis options in QII…

> [@Imee19](#):
>
> What is the query sequence, is this the output, representative sequences?

the query sequences can be anything you want, but yes this would typically be your representative sequences for your ASVs/OTUs. The query sequences are the input that you want to compare against the reference.

> [@Imee19](#):
>
> How about the reference sequence, at what step is this generated?

The reference is usually one or more known sequences that you are comparing against. E.g., the `exclude-seqs` aligns a set of query sequences against the reference sequences to separate hits/misses into different outputs. So you could align against a full reference database (e.g., SILVA 16S sequences) or just a subset of representative sequences to remove non-target DNA (e.g., host genes or others that do not align to the reference).

Good luck!

---

<div class="post-metadata">

**Author:** ![Imee19](https://forum.qiime2.org/user_avatar/forum.qiime2.org/imee19/32/6330_2.png) [@Imee19](https://forum.qiime2.org/u/Imee19)\
**Post date:** [November 9, 2021, 10:13am UTC](https://forum.qiime2.org/t/evaluating-and-controlling-data-quality-with-q2-quality-control/21276/3 "2021-11-09T10:13:15Z")

</div>

Hi Nick,  
I actually did use the representative sequences under query and classification.qza which was trained with Greengenes. I also tried every possible input I can use for these two and every time , it outputs as an error.

 ![Slide1](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/8/8cdf400032304b64feb8c46a422babcc67c6a9f0.jpeg)  
I also did the tutorial link you sent me but at the very end I got an error. I thought it must my input expected.tsv file. My mock community is from Zymo, so I just typed in the microbial communities present but did not add any relative abundance, is the percent 16S the relative abundance. I think this should be easy to run if the inputs are in correct format.

---

<div class="post-metadata">

**Author:** ![Imee19](https://forum.qiime2.org/user_avatar/forum.qiime2.org/imee19/32/6330_2.png) [@Imee19](https://forum.qiime2.org/u/Imee19)\
**Post date:** [November 10, 2021, 1:11am UTC](https://forum.qiime2.org/t/evaluating-and-controlling-data-quality-with-q2-quality-control/21276/4 "2021-11-10T01:11:00Z")

</div>

Also I tried again, the other tutorial, even followed the format of the expected.tsv supplied

Convert to biom and import

```auto
biom convert \
  -i expected-taxonomy-mod.tsv \
  -o expected-taxonomy.biom \
  --table-type="OTU table" \
  --to-json
qiime tools import \
 --type FeatureTable[RelativeFrequency] \
 --input-path expected-taxonomy.biom \
 --input-format BIOMV100Format \
 --output-path expected-taxonomy.qza

```

but I got an error in my bio convert step..

[Screen Shot 2021-11-10 at 12.03.09 pm|690x431](https://forum.qiime2.org/uploads/short-url/k3tpv1RdAuKTSoI33d9wK8eZKYN.png) [MockExpected.tsv](https://forum.qiime2.org/uploads/short-url/k4ZZf77i3ZdetBCGaqKr4fkfB6J.tsv) (879 Bytes)

---

<div class="post-metadata">

**Author:** ![Imee19](https://forum.qiime2.org/user_avatar/forum.qiime2.org/imee19/32/6330_2.png) [@Imee19](https://forum.qiime2.org/u/Imee19)\
**Post date:** [November 10, 2021, 2:00am UTC](https://forum.qiime2.org/t/evaluating-and-controlling-data-quality-with-q2-quality-control/21276/5 "2021-11-10T02:00:59Z")

</div>

As a follow up on the second issue encountered, I was able to get passed the previous issue on the tsv file,I added an extra underscore and it worked but at the final step I got an error again.  
I used the input files: taxonomy:classification.qza,table dada\_table\_final.

 ![Screen Shot 2021-11-10 at 12.03.09 pm](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/8/8c9005995453ee11911156d5acee07cfd07704e9.png)

Thank you!

---

<div class="post-metadata">

**Author:** ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)\
**Post date:** [November 11, 2021, 6:44am UTC](https://forum.qiime2.org/t/evaluating-and-controlling-data-quality-with-q2-quality-control/21276/6 "2021-11-11T06:44:50Z")

</div>

Hi @Imee19 ,  
Glad you could solve it! The first error you were getting was because you were passing the wrong data type... you can use `qiime tools peek` to inspect the type of a QIIME 2 artifact if you are not sure what type it is.

You can also look at the contents of the files in that tutorial _before importing_ to see how your own files should be formatted.

Good luck!

---

<div class="post-metadata">

**Author:** ![Imee19](https://forum.qiime2.org/user_avatar/forum.qiime2.org/imee19/32/6330_2.png) [@Imee19](https://forum.qiime2.org/u/Imee19)\
**Post date:** [November 11, 2021, 8:22am UTC](https://forum.qiime2.org/t/evaluating-and-controlling-data-quality-with-q2-quality-control/21276/7 "2021-11-11T08:22:34Z")

</div>

![Slide1](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/7/7ac91416906b6115ec9c9fcc43bb6820fb6fba54.jpeg)

Actually, I thought I was but got an error at the last step.What does this error mean. I thought since I got the data in correct format, it's going to work.

---

<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:** [November 15, 2021, 2:23pm UTC](https://forum.qiime2.org/t/evaluating-and-controlling-data-quality-with-q2-quality-control/21276/8 "2021-11-15T14:23:50Z")

</div>

Hi @Imee19 - there is an issue with your screenshot, the text in it is not legible, can you please re-submit your error message? Thanks!

---

<div class="post-metadata">

**Author:** ![Imee19](https://forum.qiime2.org/user_avatar/forum.qiime2.org/imee19/32/6330_2.png) [@Imee19](https://forum.qiime2.org/u/Imee19)\
**Post date:** [November 20, 2021, 12:21pm UTC](https://forum.qiime2.org/t/evaluating-and-controlling-data-quality-with-q2-quality-control/21276/9 "2021-11-20T12:21:00Z")

</div>

Hi Matt,  
I have attached the screenshot here.

 ![Screen Shot 2021-11-08 at 9.59.52 pm](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/c/c35364610eab43b4f70d19c267e8ea01cb65651d.png)

Thank you,  
Imelda

---

<div class="post-metadata">

**Author:** ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)\
**Post date:** [November 22, 2021, 10:54am UTC](https://forum.qiime2.org/t/evaluating-and-controlling-data-quality-with-q2-quality-control/21276/10 "2021-11-22T10:54:05Z")

</div>

Hi @Imee19 ,  
You are using the wrong types of artifacts as input. That action expects two different sequence files as input (query and reference).

Instead it looks like you input a feature table and a taxonomy file. Are you instead trying to filter a feature table using taxonomy classifications? That would be a different action in q2-taxa

---

<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 23, 2021, 4:54pm UTC](https://forum.qiime2.org/t/evaluating-and-controlling-data-quality-with-q2-quality-control/21276/11 "2021-12-23T16:54:25Z")

</div>

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