Commit 2417f521 authored by Sander Bollen's avatar Sander Bollen
Browse files

sanity check messages in Snakefile

parent 95edeb22
import json
from functools import partial
from os.path import join, basename
from pathlib import Path
from pyfaidx import Fasta
OUT_DIR = config.get("OUTPUT_DIR")
if OUT_DIR is None:
raise ValueError("You must set --config OUT_DIR=<path>")
REFERENCE = config.get("REFERENCE")
JAVA = config.get("JAVA")
if REFERENCE is None:
raise ValueError("You must set --config REFERENCE=<path>")
if not Path(reference).exists:
raise FileNotFoundError("Reference file does not exist.")
JAVA = config.get("JAVA") # TODO: should be handled by conda?!
if JAVA is None:
raise ValueError("You must set --config JAVA=<path>")
GATK = config.get("GATK")
if GATK is None:
raise ValueError("You must set --config GATK=<path>")
DBSNP = config.get("DBSNP")
if DBSNP is None:
raise ValueError("You must set --config DBSNP=<path>")
ONETHOUSAND = config.get("ONETHOUSAND")
if ONETHOUSAND is None:
raise ValueError("You must set --config ONETHOUSAND=<path>")
HAPMAP = config.get("HAPMAP")
if HAPMAP is None:
raise ValueError("You must set --config HAPMAP")
# these are all optional
BED = config.get("BED", "") # comma-separated list of BED files
REFFLAT = config.get("REFFLAT", "") # comma-separated list of refFlat files
FEMALE_THRESHOLD = config.get("FEMALE_THRESHOLD", 0.6)
......
pytest>=4.3.0
pytest-workflow>=1.1.0
\ No newline at end of file
- name
\ No newline at end of file
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