Skip to content

Commit

Permalink
DRAGEN: add few coverage metrics in general stats (#2341)
Browse files Browse the repository at this point in the history
* DRAGEN: Coverage: add few metrics into general stats

* DRAGEN: Ploidy: if Sex is not found, do not add it

* [automated] Update CHANGELOG.md

---------

Co-authored-by: MultiQC Bot <multiqc-bot@seqera.io>
  • Loading branch information
vladsavelyev and multiqc-bot committed Feb 16, 2024
1 parent e83d7ca commit 298c111
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
### Module updates

- **bcl2fastq**: fix the top undetermined barcodes plot ([#2340](https://github.com/MultiQC/MultiQC/pull/2340))
- **DRAGEN**: add few coverage metrics in general stats ([#2341](https://github.com/MultiQC/MultiQC/pull/2341))
- **fastp**: Improve detection of JSON files ([#2334](https://github.com/MultiQC/MultiQC/pull/2334))

## [MultiQC v1.20](https://github.com/ewels/MultiQC/releases/tag/v1.20) - 2024-02-12
Expand Down
7 changes: 7 additions & 0 deletions multiqc/modules/dragen/coverage_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@
"suffix": " %",
"scale": "Purples",
"colour": "255, 0, 0",
"exclude": False,
},
"aligned bases": {
"order_priority": 0.3,
Expand All @@ -293,6 +294,7 @@
"scale": "Greens",
"suffix": " %",
"bgcols": {"NA": "#00FFFF"},
"exclude": False,
},
"average chr x coverage over region": {
"order_priority": 1.0,
Expand Down Expand Up @@ -323,6 +325,7 @@
"order_priority": 3,
"exclude": False,
"hidden_own": False,
"hidden": False,
"title": "Depth",
"scale": "BrBG",
"colour": "0, 255, 255",
Expand Down Expand Up @@ -353,6 +356,7 @@
"title": "Med aut cov",
"suffix": " x",
"scale": "Greens",
"exclude": False,
},
"mean/median autosomal coverage ratio over region": {
"order_priority": 7.1,
Expand All @@ -367,6 +371,7 @@
"uniformity of coverage (pct > d.d*mean) over region": {
"suffix": " %",
"colour": "55, 255, 55",
"exclude": False,
"extra": {
# "Uniformity of coverage (PCT > 0.2*mean) over region" metric.
"0.2": {
Expand Down Expand Up @@ -406,6 +411,7 @@
"scale": "Purples",
"suffix": " %",
"colour": "255, 50, 25",
"exclude": False,
WGS: {
# "scale": "Reds",
},
Expand Down Expand Up @@ -772,6 +778,7 @@ def make_general_stats(coverage_data, coverage_headers):
m_id = re.sub(r"(\s|-|\.|_)+", " ", phenotype + "_" + metric)
gen_data[sample][m_id] = data[metric]
gen_headers[m_id] = coverage_headers[_metric].copy()
del gen_headers[m_id]["colour"]
"""
Some modifications are necessary to improve informativeness
of the general table, because several/many familiar tables
Expand Down
2 changes: 2 additions & 0 deletions multiqc/modules/dragen/ploidy_estimation_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ def parse_ploidy_estimation_metrics_file(f):

for line in f["f"].splitlines():
_, _, metric, stat = line.split(",")
if stat.strip() == "":
continue
try:
stat = float(stat)
except ValueError:
Expand Down

0 comments on commit 298c111

Please sign in to comment.