Skip to content

Commit

Permalink
Merge pull request #59 from molgenis/fix/14-fixModVersions-v1.1.0
Browse files Browse the repository at this point in the history
Fix #14 Fix module versions (backport)
  • Loading branch information
bartcharbon authored Oct 19, 2020
2 parents e4aaf88 + dabe524 commit 9bec5b4
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 13 deletions.
16 changes: 8 additions & 8 deletions pipeline_annotate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ ops=["self"]
names=["CAP"]
EOT

module load vcfanno
module load HTSlib
module load "${MOD_VCF_ANNO}"
module load "${MOD_HTS_LIB}"

VCFANNO_ARGS="-p ${CPU_CORES} ${VCFANNO_PRE_CONF} ${VCFANNO_INPUT}"
vcfanno ${VCFANNO_ARGS} | bgzip > ${VCFANNO_OUTPUT}
Expand All @@ -206,7 +206,7 @@ CAPICE_OUTPUT_VCF="${CAPICE_OUTPUT_DIR}"/vcfanno_bcftools_filter_capice.vcf.gz
rm -rf "${CAPICE_OUTPUT_DIR}"
mkdir -p "${CAPICE_OUTPUT_DIR}"

module load BCFtools
module load "${MOD_BCF_TOOLS}"
bcftools filter -i 'CAP="."' --threads "${CPU_CORES}" "${BCFTOOLS_FILTER_INPUT}" | bgzip -c > "${BCFTOOLS_FILTER_OUTPUT}"
module purge

Expand All @@ -218,14 +218,14 @@ else
VCFANNO_ALL_OUTPUT="${CAPICE_OUTPUT_DIR}"/vcfanno_all.vcf.gz
echo "calculating CAPICE scores for variants without precomputed score ..."

module load CADD
module load "${MOD_CADD}"
# strip headers from input vcf for cadd
CADD_INPUT="${CAPICE_OUTPUT_DIR}/input_headerless_$(date +%s).vcf.gz"
gunzip -c $CAPICE_INPUT | sed '/^#/d' | bgzip > ${CADD_INPUT}
CADD.sh -a -g ${ASSEMBLY} -o ${CAPICE_OUTPUT_DIR}/cadd.tsv.gz -c ${CPU_CORES} -s ${CADD_INPUT}
module purge

module load CAPICE
module load "${MOD_CAPICE}"
python ${EBROOTCAPICE}/CAPICE_scripts/model_inference.py \
--input_path ${CAPICE_OUTPUT_DIR}/cadd.tsv.gz \
--model_path ${EBROOTCAPICE}/CAPICE_model/${ASSEMBLY}/xgb_booster.pickle.dat \
Expand Down Expand Up @@ -255,8 +255,8 @@ ops=["self"]
names=["CAP"]
EOT

module load vcfanno
module load HTSlib
module load "${MOD_VCF_ANNO}"
module load "${MOD_HTS_LIB}"

VCFANNO_ARGS="-p ${CPU_CORES} ${VCFANNO_POST_CONF} ${VCFANNO_OUTPUT}"
vcfanno ${VCFANNO_ARGS} | bgzip > ${VCFANNO_ALL_OUTPUT}
Expand All @@ -274,7 +274,7 @@ VEP_OUTPUT_STATS="${VEP_OUTPUT}"
rm -rf "${VEP_OUTPUT_DIR}"
mkdir -p "${VEP_OUTPUT_DIR}"

module load VEP
module load "${MOD_VEP}"
VEP_ARGS="\
--input_file ${VEP_INPUT} --format vcf \
--output_file ${VEP_OUTPUT} --vcf"
Expand Down
6 changes: 3 additions & 3 deletions pipeline_filter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ if [ -z "${TMPDIR+x}" ]; then
TMPDIR=/tmp
fi

module load vcf-decision-tree
module load "${MOD_VCF_DECISION_TREE}"
java -Djava.io.tmpdir="${TMPDIR}" -XX:ParallelGCThreads=2 -jar "${EBROOTVCFMINDECISIONMINTREE}"/vcf-decision-tree.jar ${DECISION_TREE_ARGS}
module purge

Expand All @@ -203,8 +203,8 @@ BCFTOOLS_FILTER_INPUT="${DECISION_TREE_OUTPUT}"
BCFTOOLS_FILTER_OUTPUT="${OUTPUT}"
BCFTOOLS_FILTER_ARGS="--threads ${CPU_CORES} ${BCFTOOLS_FILTER_INPUT}"

module load BCFtools
module load HTSlib
module load "${MOD_BCF_TOOLS}"
module load "${MOD_HTS_LIB}"
if [[ "${BCFTOOLS_FILTER_OUTPUT}" == *.vcf.gz ]]
then
bcftools filter -i'VIPC=="T"' ${BCFTOOLS_FILTER_ARGS} | bgzip -c > "${BCFTOOLS_FILTER_OUTPUT}"
Expand Down
2 changes: 1 addition & 1 deletion pipeline_preprocess.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ fi

PREPROCESS_INPUT="${INPUT}"

module load BCFtools
module load "${MOD_BCF_TOOLS}"

BCFTOOLS_ARGS="\
norm \
Expand Down
2 changes: 1 addition & 1 deletion pipeline_report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ if [ -z "${TMPDIR+x}" ]; then
TMPDIR=/tmp
fi

module load vcf-report
module load "${MOD_VCF_REPORT}"

REPORT_ARGS="-i ${INPUT} -o ${OUTPUT}"
if [ ! -z "${INPUT_PED}" ]; then
Expand Down
9 changes: 9 additions & 0 deletions utils/header.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
#!/bin/bash
set -euo pipefail

MOD_BCF_TOOLS="BCFtools/1.10.2-GCCcore-7.3.0"
MOD_CADD="CADD/v1.4-foss-2018b"
MOD_CAPICE="CAPICE/v1.3.0-foss-2018b"
MOD_HTS_LIB="HTSlib/1.10.2-GCCcore-7.3.0"
MOD_VCF_ANNO="vcfanno/v0.3.2"
MOD_VCF_DECISION_TREE="vcf-decision-tree/v0.0.1-Java-11-LTS"
MOD_VCF_REPORT="vcf-report/v1.0.2-Java-11-LTS"
MOD_VEP="VEP/100.4-foss-2018b-Perl-5.28.0"

0 comments on commit 9bec5b4

Please sign in to comment.