Skip to content

Commit b599aab

Browse files
authored
add ngsbits sex check (#3752)
### Added - ngs-bits sex check to raredisease
1 parent cec8b1e commit b599aab

File tree

4 files changed

+78
-0
lines changed

4 files changed

+78
-0
lines changed

cg/constants/nf_analysis.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class NfTowerStatus(StrEnum):
2222
"PCT_TARGET_BASES_10X": {"norm": "gt", "threshold": 0.95},
2323
"PCT_EXC_ADAPTER": {"norm": "lt", "threshold": 0.0005},
2424
"predicted_sex_sex_check": {"norm": "eq", "threshold": None},
25+
"gender": {"norm": "eq", "threshold": None},
2526
}
2627

2728
RAREDISEASE_PARENT_PEDDY_METRIC_CONDITION: dict[str, dict[str, Any]] = {

cg/meta/workflow/raredisease.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ def get_multiqc_json_metrics(self, case_id: str) -> list[MetricsBase]:
218218
@staticmethod
219219
def set_order_sex_for_sample(sample: Sample, metric_conditions: dict) -> None:
220220
metric_conditions["predicted_sex_sex_check"]["threshold"] = sample.sex
221+
metric_conditions["gender"]["threshold"] = sample.sex
221222

222223
def get_sample_coverage_file_path(self, bundle_name: str, sample_id: str) -> str | None:
223224
"""Return the Raredisease d4 coverage file path."""

tests/fixtures/analysis/raredisease/multiqc_data.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,14 @@
100100
"summed_median": 327
101101
}
102102
},
103+
{
104+
"ADM1": {
105+
"gender": "female",
106+
"reads_chry": 103876,
107+
"reads_chrx": 37077016,
108+
"ratio_chry_chrx": 0.0028
109+
}
110+
},
103111
{
104112
"ADM1": {
105113
"GENOME_TERRITORY": 2858674663.0,
@@ -301,6 +309,14 @@
301309
"summed_median": 327
302310
}
303311
},
312+
{
313+
"ADM2": {
314+
"gender": "female",
315+
"reads_chry": 103876,
316+
"reads_chrx": 37077016,
317+
"ratio_chry_chrx": 0.0028
318+
}
319+
},
304320
{
305321
"ADM2": {
306322
"GENOME_TERRITORY": 2858674663.0,

tests/fixtures/analysis/raredisease/raredisease_case_enough_reads_metrics_deliverables.yaml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,36 @@ metrics:
563563
name: summed_median
564564
step: multiqc
565565
value: 327
566+
- condition:
567+
norm: eq
568+
threshold: female
569+
header: null
570+
id: ADM1
571+
input: multiqc_data.json
572+
name: gender
573+
step: multiqc
574+
value: female
575+
- condition: null
576+
header: null
577+
id: ADM1
578+
input: multiqc_data.json
579+
name: reads_chry
580+
step: multiqc
581+
value: 103876
582+
- condition: null
583+
header: null
584+
id: ADM1
585+
input: multiqc_data.json
586+
name: reads_chrx
587+
step: multiqc
588+
value: 37077016
589+
- condition: null
590+
header: null
591+
id: ADM1
592+
input: multiqc_data.json
593+
name: ratio_chry_chrx
594+
step: multiqc
595+
value: 0.0028
566596
- condition: null
567597
header: null
568598
id: ADM1
@@ -1653,6 +1683,36 @@ metrics:
16531683
name: summed_median
16541684
step: multiqc
16551685
value: 327
1686+
- condition:
1687+
norm: eq
1688+
threshold: female
1689+
header: null
1690+
id: ADM2
1691+
input: multiqc_data.json
1692+
name: gender
1693+
step: multiqc
1694+
value: female
1695+
- condition: null
1696+
header: null
1697+
id: ADM2
1698+
input: multiqc_data.json
1699+
name: reads_chry
1700+
step: multiqc
1701+
value: 103876
1702+
- condition: null
1703+
header: null
1704+
id: ADM2
1705+
input: multiqc_data.json
1706+
name: reads_chrx
1707+
step: multiqc
1708+
value: 37077016
1709+
- condition: null
1710+
header: null
1711+
id: ADM2
1712+
input: multiqc_data.json
1713+
name: ratio_chry_chrx
1714+
step: multiqc
1715+
value: 0.0028
16561716
- condition: null
16571717
header: null
16581718
id: ADM2

0 commit comments

Comments
 (0)