BIMSBbioinfo / pigx_rnaseq

Bulk RNA-seq Data Processing, Quality Control, and Downstream Analysis Pipeline
GNU General Public License v3.0
20 stars 11 forks source link

Check for blanks in filename when samples are not found #106

Closed smoe closed 2 years ago

smoe commented 2 years ago

The error

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/snakemake/__init__.py", line 593, in snakemake
    workflow.include(
  File "/usr/lib/python3/dist-packages/snakemake/workflow.py", line 1182, in include
    exec(compile(code, snakefile.get_path_or_uri(), "exec"), self.globals)
  File "/usr/libexec/pigx_rnaseq/snakefile.py", line 33, in <module>
  File "/usr/libexec/pigx_rnaseq/scripts/validate_input.py", line 55, in validate_config
    raise Exception('ERROR: missing reads file: {}'.format(fullpath))
Exception: ERROR: missing reads file: somepath/V25_2.fastq.gz 

is technically correct but the file as printed does exist - the sample_sheet had blanks. Would you accept a PR to introduce quotes around the missing filename, maybe even combined with a check for blanks at either end of the filename and a respective warning?

al2na commented 2 years ago

seems like a good idea! but @rekado or @borauyar should comment on this more competently than I can

borauyar commented 2 years ago

@smoe yes, please! we'd appreciate that.

borauyar commented 2 years ago

We use this script https://github.com/BIMSBbioinfo/pigx_rnaseq/blob/master/scripts/validate_input.py to check for problems in the input data.

borauyar commented 2 years ago

108 fixes the issue.