Skip to content

Commit

Permalink
Stops raising error when sample has no reads, warning issued instead
Browse files Browse the repository at this point in the history
  • Loading branch information
mbdabrowska1 committed Jun 17, 2024
1 parent 3875b27 commit 3ae36b3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/check_samplesheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from pathlib import Path
import pandas as pd
import re
import itertools
import warnings

logger = logging.getLogger()

Expand Down Expand Up @@ -152,7 +152,9 @@ def _create_fastq_path(self, row):
matching_files = list(fastq_dir.glob(pattern))

if len(matching_files) == 0:
raise FileNotFoundError("The matching FASTQ file does not exist in the directory: {fastq_dir} for file: {filename}".format(fastq_dir=fastq_dir, filename=filename))
warnings.warn("No matching FASTQ file found in the directory: {fastq_dir} for file: {filename}".format(fastq_dir=fastq_dir, filename=filename))
row["status"] = "discontinued"
return None
elif len(matching_files) > 1:
raise FileNotFoundError("Multiple matching FASTQ files found in the directory: {fastq_dir} for file: {filename}".format(fastq_dir=fastq_dir, filename=filename))

Expand Down

0 comments on commit 3ae36b3

Please sign in to comment.