Skip to content

Commit

Permalink
improve error mesage
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewprzh committed Oct 23, 2023
1 parent 463bd2e commit acebf46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/input_data_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ def check_input_type(fname, input_type):
basename, fasta_ext = os.path.splitext(basename_plus_inner_ext)
if fasta_ext in ['.fastq', '.fasta', '.fa', '.fq', '.fna']:
if input_type != 'fastq':
raise Exception("Wrong file extension was detected. Use only FASTQ/FASTA files with --fastq option.")
raise Exception("Wrong file extension was detected %s. Use only FASTQ/FASTA files with --fastq option." % fname)
elif fasta_ext == '.bam':
if input_type != 'bam':
raise Exception("Wrong file extension was detected. Use only BAM files with --bam option.")
raise Exception("Wrong file extension was detected for file %s. Use only BAM files with --bam option." % fname)
else:
raise Exception("File format " + fasta_ext + " is not supported! Supported formats: FASTQ, FASTA, BAM")

0 comments on commit acebf46

Please sign in to comment.