# How does MinKNOW classify 1D reads as “pass” or “fail”?

I have found a couple of sources1,2 that indicate that a read in a 1D² run is classified by MinKNOW as "pass" and put into the fastq_pass folder if both of the following conditions are met:

1. Both strands were read
2. The average Phred score of all bases in the read was >9

(Thus a read in a 1D² run goes into the fastq_fail folder if either its Phred is too low or if the second strand didn't follow the first through the pore.)

However, I have been unable to track down any source indicating how the pass/fail classification works for 1D runs (where only one strand is supposed to be read per read). One might reasonably guess that it's based solely upon whether the mean Phred score is above 9, but inspection of the data from a 1D run reveals that this is not the case. While all "pass" reads seem to have a mean Phred score of at least 9 (the lowest I see is 9.45), some fail reads have scores above 9 too (with the highest one being 12.9): Thus it looks to me like this is not the condition used to classify 1D reads. But then what is?

• How did you calculate the average quality score here per read? Note that you cannot just take the average of all phred scores, as you are dealing with log-transformed probabilities. Or did you use the quality score from the sequencing_summary for this plot? – Wouter De Coster Jun 3 '19 at 5:54
• @WouterDeCoster Excellent call - you guessed precisely the mistake I'd made. I'll write up an answer now with some new graphs. – Mark Amery Jun 3 '19 at 11:09

## 1 Answer

The classification is indeed based purely on comparing a mean to a threshold... but it's not the mean of the Phred scores that represent base quality on a logarithmic scale, but rather the mean of the underlying quality values prior to being transformed into Phreds.

If I compute the "mean" quality for a read in this way - by converting each Phred in the read back to a probability, taking the mean of those probabilities, and then converting that mean probability to a Phred - I find that whether a read is a pass or fail is determined by comparing that score to a threshold of 7: A mean quality score computed in this way is also included in the mean_qscore_template column of the sequencing summary file. If you open that file in a spreadsheet program (it's just a TSV) and sort by mean_qscore_template, you will find that the passes_filter column is always FALSE for mean_qscore_template values below 7 and always TRUE for values above 7.

(Hat tip to Wouter De Coster for successfully guessing that this was the answer in the comments and pointing me on the right path.)