Unverified Commit 14eed9ee authored by Sander Bollen's avatar Sander Bollen Committed by GitHub
Browse files

Merge pull request #2 from LUMC/use-builtin-output-dir

Use builtin output dir
parents 1a7c51a9 2db357e3
Pipeline #2481 failed with stages
in 14 minutes and 6 seconds
image: python:3.6-stretch
.docker_before_script_anchor: &docker_before_script_anchor
before_script:
- pip install -r requirements.txt
- pip install -r requirements-dev.txt
before_script:
- pip install -r requirements.txt
- pip install -r requirements-dev.txt
stages:
- sanity
- dry-run
- integration
test_sanities:
<<: *docker_before_script_anchor
script:
- py.test --tag sanity
image: python:3.6-stretch
tags:
- docker
stage: sanity
test_dry_run:
<<: *docker_before_script_anchor
script:
- py.test --tag dry-run
image: python:3.6-stretch
tags:
- docker
stage: dry-run
test_integration:
before_script:
- export BASETEMP=$(mktemp -p ${RUN_BASE_DIR} -d)
script:
- source ${CONDA_SH}
- conda activate hutspot-pipeline
- export PATH=${PATH}:${CONDA_EXTRA_PATH}
- py.test --tag integration --basetemp ${BASETEMP} --keep-workflow-wd
tags:
- slurm
stage: integration
......@@ -113,7 +113,6 @@ The following configuration values are **required**:
| configuration | description |
| ------------- | ----------- |
| `OUTPUT_DIR` | Absolute path to output directory |
| `REFERENCE` | Absolute path to fasta file |
| `SAMPLE_CONFIG` | Path to config file as described above |
| `GATK` | Path to GATK jar. **Must** be version 3.7 |
......@@ -169,7 +168,6 @@ snakemake -s Snakefile \
--restart-times 2 \
-T \
--config SAMPLE_CONFIG=samples.json \
OUTPUT_DIR=/path/to/odir \
REFERENCE=/path/to/genome.fasta \
GATK=/path/to/GenomeAnalysisTK.jar \
DBSNP=/path/to/dbsnp.vcf.gz \
......
This diff is collapsed.
......@@ -22,13 +22,14 @@ input_fastq=${2}
output_fastq=${3}
max_bases=${4}
full_input=$(readlink -f ${input_fastq})
if [[ ${max_bases} -eq 'None' ]]; then
ln -s ${input_fastq} ${output_fastq}
ln -s ${full_input} ${output_fastq}
exit 0
fi
if [[ -z $max_bases ]]; then
ln -s ${input_fastq} ${output_fastq}
ln -s ${full_input} ${output_fastq}
exit 0
fi
......@@ -37,7 +38,7 @@ frac=$(jq -n "$max_bases / $bases" | sed -e "s:e:E:g")
echo $frac
frac_higher_than_one=$(echo "${frac} > 1" | bc )
if [[ ${frac_higher_than_one} -eq 1 ]]; then
ln -s ${input_fastq} ${output_fastq}
ln -s ${full_input} ${output_fastq}
else
seqtk sample -s100 ${input_fastq} ${frac} | gzip -c > ${output_fastq}
fi
@HD VN:1.4 SO:unsorted
@SQ SN:chrM LN:16569 M5:c68f52674c9fb33aef52dcf399755519 UR:file:ref.fa
16569 1 1
3106 1 N
16569 1 11
0 chrM NC_012920.1 Homo sapiens mitochondrion, complete genome
0 16569 1
- name: test-integration-run
command: >-
bash -c '
snakemake --use-conda --conda-prefix ${CONDA_PREFIX} --jobs 100 -w 120
--cluster 'sbatch' -r -p -s Snakefile -T
--config JAVA=$(which java)
REFERENCE=tests/data/ref.fa GATK=${GATK_JAR}
DBSNP=tests/data/database.vcf.gz
ONETHOUSAND=tests/data/database.vcf.gz
HAPMAP=tests/data/database.vcf.gz
SAMPLE_CONFIG=tests/data/sample_config.json'
exit_code: 0
stderr:
contains:
- "Job counts"
- "localrule all:"
- "(100%) done"
must_not_contain:
- "rror"
tags:
- integration
- name: test-no-output-dir
command: snakemake -n -r -p -s Snakefile
exit_code: 1
stdout:
contains:
- "You must set --config OUT_DIR=<path>"
tags:
- sanity
- name: test-no-reference
command: snakemake -n -r -p -s Snakefile --config OUTPUT_DIR=/teststtest/
exit_code: 1
......
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