Commit af0d1599 authored by Maxime Manno's avatar Maxime Manno 🍜
Browse files

Add N90 and 5 longest reads #113

parent 485bc0db
......@@ -72,22 +72,40 @@ class Run_stats (Analysis):
if parts[0] == "total_bases": stats["total_bases"] = parts[1]
if parts[0] == "mean_read_length": stats["mean_read_length"] = parts[1]
if parts[0] == "N50_read_length": stats["N50_read_length"] = parts[1]
if parts[0] == "N90_read_length": stats["N90_read_length"] = parts[1]
if parts[0] == "mean_read_quality": stats["mean_read_quality"] = parts[1]
if parts[0] == "mean_yield_per_sec": stats["mean_yield_per_sec"] = parts[1]
if parts[0] == "longread1": stats["longread1"] = parts[1]
if parts[0] == "longread2": stats["longread2"] = parts[1]
if parts[0] == "longread3": stats["longread3"] = parts[1]
if parts[0] == "longread4": stats["longread4"] = parts[1]
if parts[0] == "longread5": stats["longread5"] = parts[1]
if parts[0] == "nb_reads_Q7": stats["nb_reads_Q7"] = parts[1]
if parts[0] == "total_bases_Q7": stats["total_bases_Q7"] = parts[1]
if parts[0] == "mean_read_length_Q7": stats["mean_read_length_Q7"] = parts[1]
if parts[0] == "N50_read_length_Q7": stats["N50_read_length_Q7"] = parts[1]
if parts[0] == "N90_read_length_Q7": stats["N90_read_length_Q7"] = parts[1]
if parts[0] == "mean_read_quality_Q7": stats["mean_read_quality_Q7"] = parts[1]
if parts[0] == "mean_yield_per_sec_Q7": stats["mean_yield_per_sec_Q7"] = parts[1]
if parts[0] == "longread1_Q7": stats["longread1_Q7"] = parts[1]
if parts[0] == "longread2_Q7": stats["longread2_Q7"] = parts[1]
if parts[0] == "longread3_Q7": stats["longread3_Q7"] = parts[1]
if parts[0] == "longread4_Q7": stats["longread4_Q7"] = parts[1]
if parts[0] == "longread5_Q7": stats["longread5_Q7"] = parts[1]
if parts[0] == "nb_reads_Q9": stats["nb_reads_Q9"] = parts[1]
if parts[0] == "total_bases_Q9": stats["total_bases_Q9"] = parts[1]
if parts[0] == "mean_read_length_Q9": stats["mean_read_length_Q9"] = parts[1]
if parts[0] == "N50_read_length_Q9": stats["N50_read_length_Q9"] = parts[1]
if parts[0] == "N90_read_length_Q9": stats["N90_read_length_Q9"] = parts[1]
if parts[0] == "mean_read_quality_Q9": stats["mean_read_quality_Q9"] = parts[1]
if parts[0] == "mean_yield_per_sec_Q9": stats["mean_yield_per_sec_Q9"] = parts[1]
if parts[0] == "longread1_Q9": stats["longread1_Q9"] = parts[1]
if parts[0] == "longread2_Q9": stats["longread2_Q9"] = parts[1]
if parts[0] == "longread3_Q9": stats["longread3_Q9"] = parts[1]
if parts[0] == "longread4_Q9": stats["longread4_Q9"] = parts[1]
if parts[0] == "longread5_Q9": stats["longread5_Q9"] = parts[1]
#print(stats)
return stats
......@@ -142,36 +160,57 @@ class Run_stats (Analysis):
group = 'rawdata'
metrics.append(group)
self._add_result_element("metrics", "headers", ','.join(["nb_reads", "total_bases", "mean_read_length","N50_read_length", "mean_read_quality", "mean_yield_per_sec"]), group)
self._add_result_element(sample, "nb_reads", str(stat_info["nb_reads"]),group),
self._add_result_element(sample, "total_bases", str(stat_info["total_bases"]),group),
self._add_result_element(sample, "mean_read_length", str(stat_info["mean_read_length"]),group),
self._add_result_element(sample, "N50_read_length", str(stat_info["N50_read_length"]),group),
self._add_result_element(sample, "mean_read_quality", str(stat_info["mean_read_quality"]),group),
self._add_result_element(sample, "mean_yield_per_sec", str(stat_info["mean_yield_per_sec"]),group),
metrics_names = ["nb_reads",
"total_bases",
"mean_read_length",
"N50_read_length",
"N90_read_length",
"mean_read_quality",
"mean_yield_per_sec",
"longread1",
"longread2",
"longread3",
"longread4",
"longread5"]
self._add_result_element("metrics", "headers", ','.join(metrics_names), group)
for item in metrics_names:
self._add_result_element(sample, item, str(stat_info[item]),group)
group = 'Q7'
metrics.append(group)
self._add_result_element("metrics", "headers", ','.join(["nb_reads_Q7", "total_bases_Q7", "mean_read_length_Q7","N50_read_length_Q7", "mean_read_quality_Q7", "mean_yield_per_sec_Q7"]), group)
self._add_result_element(sample, "nb_reads_Q7", str(stat_info["nb_reads_Q7"]),group),
self._add_result_element(sample, "total_bases_Q7", str(stat_info["total_bases_Q7"]),group),
self._add_result_element(sample, "mean_read_length_Q7", str(stat_info["mean_read_length_Q7"]),group),
self._add_result_element(sample, "N50_read_length_Q7", str(stat_info["N50_read_length_Q7"]),group),
self._add_result_element(sample, "mean_read_quality_Q7", str(stat_info["mean_read_quality_Q7"]),group),
self._add_result_element(sample, "mean_yield_per_sec_Q7", str(stat_info["mean_yield_per_sec_Q7"]),group),
metrics_names = ["nb_reads_Q7",
"total_bases_Q7",
"mean_read_length_Q7",
"N50_read_length_Q7",
"N90_read_length_Q7",
"mean_read_quality_Q7",
"mean_yield_per_sec_Q7",
"longread1_Q7",
"longread2_Q7",
"longread3_Q7",
"longread4_Q7",
"longread5_Q7"]
self._add_result_element("metrics", "headers", ','.join(metrics_names), group)
for item in metrics_names:
self._add_result_element(sample, item, str(stat_info[item]),group)
group = 'Q9'
metrics.append(group)
self._add_result_element("metrics", "headers", ','.join(["nb_reads_Q9", "total_bases_Q9", "mean_read_length_Q9","N50_read_length_Q9", "mean_read_quality_Q9", "mean_yield_per_sec_Q9"]), group)
self._add_result_element(sample, "nb_reads_Q9", str(stat_info["nb_reads_Q9"]),group),
self._add_result_element(sample, "total_bases_Q9", str(stat_info["total_bases_Q9"]),group),
self._add_result_element(sample, "mean_read_length_Q9", str(stat_info["mean_read_length_Q9"]),group),
self._add_result_element(sample, "N50_read_length_Q9", str(stat_info["N50_read_length_Q9"]),group),
self._add_result_element(sample, "mean_read_quality_Q9", str(stat_info["mean_read_quality_Q9"]),group),
self._add_result_element(sample, "mean_yield_per_sec_Q9", str(stat_info["mean_yield_per_sec_Q9"]),group),
metrics_names = ["nb_reads_Q9",
"total_bases_Q9",
"mean_read_length_Q9",
"N50_read_length_Q9",
"N90_read_length_Q9",
"mean_read_quality_Q9",
"mean_yield_per_sec_Q9",
"longread1_Q9",
"longread2_Q9",
"longread3_Q9",
"longread4_Q9",
"longread5_Q9"]
self._add_result_element("metrics", "headers", ','.join(metrics_names), group)
for item in metrics_names:
self._add_result_element(sample, item, str(stat_info[item]),group)
group = 'plots'
metrics.append(group)
......
......@@ -16,7 +16,7 @@
#
--date
31/07/2017
23/07/2019
--data-nature
DNA
--sequencer
......@@ -28,10 +28,14 @@ Unknown
--species
arabido
--description
ont demo workflow
"ont demo workflow, Minknow 1.10 and Albacore 2.0.2"
--project-name
test-dev
REPDEV
--summary-file
/save/ng6-test/src/ng6-git-mmanno/workflows/ont_qc/data/sequencing_summary_barcoded_test.txt
--barcoded
no
--sample
sample-name=ONT_sample
read1=/MinION/20170308_arab1D_LSK108_MN19767/20170308_arab1D_LSK108_MN19767_albacorev1.2.4/20170308_arab1D_LSK108_MN19767_albacorev1.2.4.fastq
read1=/save/ng6-test/src/ng6-git-mmanno/workflows/ont_qc/data/test.fastq
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment