Commit 8ca740f7 authored by Sander Bollen's avatar Sander Bollen
Browse files

one last sanity check

parent 3162e47e
Pipeline #2379 passed with stage
in 3 minutes and 3 seconds
......@@ -72,6 +72,13 @@ if FASTQ_COUNT is None:
else:
fqc = FASTQ_COUNT
# sample config parsing
SCONFIG = config.get("SAMPLE_CONFIG")
if SCONFIG is None:
raise ValueError("You must set --config SAMPLE_CONFIG=<path>")
if not Path(SCONFIG).exists():
raise FileNotFoundError("{0} does not exist".format(SCONFIG))
with open(config.get("SAMPLE_CONFIG")) as handle:
SAMPLE_CONFIG = json.load(handle)
SAMPLES = SAMPLE_CONFIG['samples'].keys()
......
......@@ -75,4 +75,16 @@
exit_code: 1
stdout:
contains:
- "/very/unlikely/to/exist does not exist"
\ No newline at end of file
- "/very/unlikely/to/exist does not exist"
- name: test-no-sample-config
command: snakemake -n -r -p -s Snakefile --config OUTPUT_DIR=/test/ REFERENCE=Snakefile JAVA=Snakefile GATK=Snakefile DBSNP=Snakefile ONETHOUSAND=Snakefile HAPMAP=Snakefile
exit_code: 1
stdout:
contains:
- "You must set --config SAMPLE_CONFIG=<path>"
- name: test-sample-config-does-not-exist
command: snakemake -n -r -p -s Snakefile --config OUTPUT_DIR=/test/ REFERENCE=Snakefile JAVA=Snakefile GATK=Snakefile DBSNP=Snakefile ONETHOUSAND=Snakefile HAPMAP=Snakefile SAMPLE_CONFIG=/very/unlikely/to/exist
exit_code: 1
stdout:
contains:
- "/very/unlikely/to/exist does not exist"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment