From 59fb68d21fbd18738ca1e47c72a33f728d7997ce Mon Sep 17 00:00:00 2001 From: jfouret Date: Thu, 23 May 2024 16:34:19 +0200 Subject: [PATCH] fix bug --- src/check_fastq.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/check_fastq.py b/src/check_fastq.py index 5adeffe..8cd72f6 100644 --- a/src/check_fastq.py +++ b/src/check_fastq.py @@ -18,6 +18,7 @@ def parse_fastq(handle, handle2, crypt_algo, num_bytes): handle.readline() # Skip line if handle2 is not None: + handle2.readline() # Skip line seq += "+" + handle2.readline().strip() handle2.readline() # Skip line handle2.readline() # Skip line @@ -65,6 +66,7 @@ def parse_fastq_test(handle, handle2, crypt_algo, num_bytes, target_reads, n_mut handle.readline() # Skip line if handle2 is not None: + handle2.readline() # Skip line seq2 = handle2.readline().strip() handle2.readline() # Skip line handle2.readline() # Skip line @@ -144,10 +146,11 @@ def main(args): seq_count[seq][1] += 1 else: same_seqs = False + print(seq_count) break_reason = "new key in second File/Pair" break - if handle2_r: - handle2_r.close() + if handle2_r: + handle2_r.close() batch2_duration = time.time() - start_time2 # End timer for batch 2