Skip to content

Commit

Permalink
Warn if there are incomplete fastq pairs
Browse files Browse the repository at this point in the history
  • Loading branch information
cassimons committed Aug 16, 2023
1 parent b22076e commit 51e0c96
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/redcap_parsing_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# pylint: disable=unused-variable
import sys
from enum import Enum
from collections import defaultdict
from cloudpathlib import CloudPath
Expand Down Expand Up @@ -271,6 +272,9 @@ def find_fastq_pairs(
# Group by sample
read_pairs_by_sample_id = defaultdict(list)
for pair in read_pairs.values():
if len(pair) != 2:
print(f"Warning: skipping incomplete pair: {[fq.path for fq in pair]}", file=sys.stderr)
continue
read_pairs_by_sample_id[pair[0].sample_id].append(pair)

return read_pairs_by_sample_id

0 comments on commit 51e0c96

Please sign in to comment.