Skip to content

Commit c95b2ed

Browse files
committed
Refactored code
1 parent 09aae6f commit c95b2ed

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

checkQC/parsers/illumina.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def from_bclconvert(cls, runfolder_path, parser_config):
7979
sample_summary := index_summary.at(lane).at(sample_no)
8080
).sample_id(),
8181
"cluster_count": sample_summary.cluster_count(),
82-
"percent_of_lane":next(
82+
"percent_of_lane": next(
8383
round(float(sample_stat["% Reads"]) * 100, 2)
8484
for sample_stat in demultiplex_stats
8585
if sample_stat["Lane"] == str(lane + 1) and
@@ -100,7 +100,7 @@ def from_bclconvert(cls, runfolder_path, parser_config):
100100
)
101101
),
102102
"percent_q30": next(
103-
float(row["% Q30"])
103+
float(row["% Q30"]) * 100
104104
for row in quality_metrics
105105
if (
106106
row["Lane"] == str(lane + 1)

tests/test_qc_data.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,15 @@ def bclconvert_runfolder():
124124
"percent_of_lane": 0.29,
125125
"percent_perfect_index_reads": 97.96,
126126
"mean_q30": 36.37,
127-
"percent_q30": 0.96,
127+
"percent_q30": 96,
128128
},
129129
{
130130
"sample_id": "Sample_14575-Qiagen-IndexSet1-SP-Lane1",
131131
"cluster_count": 8560,
132132
"percent_of_lane": 0.25,
133133
"percent_perfect_index_reads": 98.15,
134134
"mean_q30": 36.43,
135-
"percent_q30": 0.96,
135+
"percent_q30": 96,
136136
},
137137
],
138138
},
@@ -196,15 +196,15 @@ def bclconvert_runfolder():
196196
"percent_of_lane": 0.3,
197197
"percent_perfect_index_reads": 98.2,
198198
"mean_q30": 36.4,
199-
"percent_q30": 0.96,
199+
"percent_q30": 96,
200200
},
201201
{
202202
"sample_id": "Sample_14575-Qiagen-IndexSet1-SP-Lane2",
203203
"cluster_count": 8672,
204204
"percent_of_lane": 0.25,
205205
"percent_perfect_index_reads": 98.29,
206206
"mean_q30": 36.48,
207-
"percent_q30": 0.97,
207+
"percent_q30": 97,
208208
},
209209
],
210210
},

0 commit comments

Comments
 (0)