# Interactive quality plot interpretation and colors

**URL:** <https://forum.qiime2.org/t/interactive-quality-plot-interpretation-and-colors/1843>\
**Category:** User Support\
**Tags:** demux, summarize, quality\
**Created:** [November 14, 2017, 10:55pm UTC](https://forum.qiime2.org/t/interactive-quality-plot-interpretation-and-colors/1843 "2017-11-14T22:55:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sarah\_McGrath](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/s/87869e/32.png) [@Sarah\_McGrath](https://forum.qiime2.org/u/Sarah_McGrath)\
**Post date:** [November 14, 2017, 10:55pm UTC](https://forum.qiime2.org/t/interactive-quality-plot-interpretation-and-colors/1843/1 "2017-11-14T22:55:50Z")

</div>

Hello,

I am new to interpreting quality plots of my data and had a question about the interactive quality plots produced in qiime2. Below is a screen shot of the quality plot for my forward reads:

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

Here is the file that gave me my quality plots [frog2.qzv](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/flex002/uploads/qiime21/original/1X/a5c2d5d4d4cf72fc42fc3eed481d1b339cc38208.qzv) (289.9 KB)

I was wondering if someone could provide insight into interpretation and what the features of this interactive plot mean (what are the most important features to pay attention to?). Also, when zooming in on a certain section, the score plots are differentiated into two different colors, blue or pink (see below).

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

What do these different colors mean and why are they produced?

Any assistance is greatly appreciated! Thank you in advance.

---

<div class="post-metadata">

**Author:** ![jairideout](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jairideout/32/9_2.png) [@jairideout](https://forum.qiime2.org/u/jairideout)\
**Post date:** [November 15, 2017, 5:55pm UTC](https://forum.qiime2.org/t/interactive-quality-plot-interpretation-and-colors/1843/3 "2017-11-15T17:55:19Z")

</div>

Hi @Sarah_McGrath!

> [@Sarah\_McGrath](#):
>
> I was wondering if someone could provide insight into interpretation and what the features of this interactive plot mean (what are the most important features to pay attention to?).

A box plot of the quality score distribution is shown for each position in your input sequences. Since it could take awhile to compute these distributions from all of your sequence data (e.g. millions of reads), a subset of your reads are selected randomly (without replacement), and the quality scores of those subsampled sequences are used to generate the box plots. By default, 10,000 sequences are subsampled (you can control that number with `--p-n` on the `demux summarize` command). Due to this random subsampling, if you rerun `demux summarize` on the same sequence data, you will obtain (slightly different) plots.

When you hover the mouse over a box plot for a given base position, the box plot's data is shown in a table below the interactive plot as a parametric seven-number summary. These values describe the distribution of quality scores at that position in your subsampled sequences.

These interactive plots can be used to determine if there is a drop in quality at some point in your sequences, which (for example) can help you with choosing truncation and trimming parameters when using DADA2.

> [@Sarah\_McGrath](#):
>
> Also, when zooming in on a certain section, the score plots are differentiated into two different colors, blue or pink (see below)

Red box plots (and the associated red warning text) should only appear when your input sequences have different lengths. This is typically not the case with Illumina data. The warning and red box plots indicate that not all sequences' quality scores were included at that position because some of the sequences were shorter. Thus, those red box plots don't represent as many quality scores as the blue box plots (which include quality scores from all sequences at that position).

I think you may have found a bug related to this coloring/warning. With your forward reads, the plot is saying that there is at least one sequence that is 40bp, which is shorter than many of the other sequences. I would expect the red box plots to show up at position 41, since that would be the point where data starts getting dropped from box plots due to sequence length. However, this warning is showing up at position 150, which makes no sense. The reverse reads appear to be functioning correctly.

Could you provide me with your demultiplexed sequences? That would be the `.qza` file with semantic type `SampleData[PairedEndSequencesWithQuality]` that you used as input to `demux summarize`. That'll let me reproduce and debug this issue locally. Thanks!

---

<div class="post-metadata">

**Author:** ![jairideout](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jairideout/32/9_2.png) [@jairideout](https://forum.qiime2.org/u/jairideout)\
**Post date:** [November 15, 2017, 8:46pm UTC](https://forum.qiime2.org/t/interactive-quality-plot-interpretation-and-colors/1843/6 "2017-11-15T20:46:30Z")

</div>

Hello again!

> [@jairideout](#):
>
> Could you provide me with your demultiplexed sequences? That would be the .qza file with semantic type SampleData[PairedEndSequencesWithQuality] that you used as input to demux summarize. That’ll let me reproduce and debug this issue locally. Thanks!

Ignore my request for your data -- @ebolyen figured out what's going on. This is [definitely a bug](https://github.com/qiime2/q2-demux/issues/64) and will be fixed in the next QIIME 2 release. We'll follow up here when that happens!

**TL;DR:** The "minimum sequence length observed during subsampling (`N` bases)" that appears in the red warning text below the interactive plot is incorrect. The number being reported is the _global_ minimum sequence length, but the _subsampled_ minimum sequence length should be reported here. The way that you interpret these plots (blue vs. red) is the same though, and the cutoff between blue and red plots is correct. So this is a pretty minor bug but definitely makes things confusing when interpreting these warnings.

**Longer explanation:**

What's happening is that the shortest sequence in your data is 40bp. However, only 10,000 of those sequences are randomly subsampled, and their quality scores are plotted. These subsampled sequences (by chance) did not include that really short (40bp) sequence, so the box plots actually include quality scores from all subsampled sequences, up to 150bp (which is when the sequence lengths of the subsampled sequences begin to differ). Thus, the interactive plot is correctly warning (and coloring the box plots in red) at position 150 because that's the point where some sequences are longer than others in the _subsampled sequences_. The bug here is that 40bp (the _global_ minimum) is being reported in the error message, when it really should be reporting the _subsampled_ minimum of 149bp.

Let me know if you have any more questions about interpreting these plots!

---

<div class="post-metadata">

**Author:** ![Sarah\_McGrath](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/s/87869e/32.png) [@Sarah\_McGrath](https://forum.qiime2.org/u/Sarah_McGrath)\
**Post date:** [November 20, 2017, 3:46pm UTC](https://forum.qiime2.org/t/interactive-quality-plot-interpretation-and-colors/1843/8 "2017-11-20T15:46:55Z")

</div>

Thanks so much for this great explanation! Very helpful!

---

<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 21, 2017, 9:47pm UTC](https://forum.qiime2.org/t/interactive-quality-plot-interpretation-and-colors/1843/9 "2017-12-21T21:47:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)\
**Post date:** [December 22, 2017, 5:59pm UTC](https://forum.qiime2.org/t/interactive-quality-plot-interpretation-and-colors/1843/10 "2017-12-22T17:59:52Z")

</div>

> [@jairideout](#):
>
> This is definitely a bug and will be fixed in the next QIIME 2 release. We’ll follow up here when that happens!

This bug has been fixed in [QIIME 2 2017.12](https://forum.qiime2.org/t/qiime-2-2017-12-release-is-now-live/2308)! Now the legend agrees with the plot.
