Skip to content

Commit

Permalink
Make calls of jar files and wrappers more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
sposadac committed Apr 13, 2020
1 parent 9925a5f commit 9a1c6fc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ bam2sam() {
}

indelFixer() {
if [[ -z "${CONDA_PREFIX:-}" ]]; then
java -XX:+UseParallelGC -XX:NewRatio=9 -Xms2G -Xmx10G -jar $@
else
if [[ -x "$(command -v $1)" ]]; then
$1 -XX:+UseParallelGC -XX:NewRatio=9 -Xms2G -Xmx10G ${@:2}
else
java -XX:+UseParallelGC -XX:NewRatio=9 -Xms2G -Xmx10G -jar $@
fi
}

consensusFixer() {
if [[ -z "${CONDA_PREFIX:-}" ]]; then
java -XX:+UseParallelGC -XX:NewRatio=9 -Xms2G -Xmx10G -jar $@
else
if [[ -x "$(command -v $1)" ]]; then
$1 -XX:+UseParallelGC -XX:NewRatio=9 -Xms2G -Xmx10G ${@:2}
else
java -XX:+UseParallelGC -XX:NewRatio=9 -Xms2G -Xmx10G -jar $@
fi
}

Expand All @@ -48,9 +48,9 @@ QuasiRecomb() {
}

SamToFastq() {
if [[ -z "${CONDA_PREFIX:-}" ]]; then
java -jar $1 SamToFastq ${@:2}
else
if [[ -x "$(command -v $1)" ]]; then
$1 SamToFastq ${@:2}
else
java -jar $1 SamToFastq ${@:2}
fi
}
4 changes: 2 additions & 2 deletions rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ class VpipeConfig(object):
'prinseq': __RECORD__(value="prinseq-lite.pl", type=str),
'fastqc': __RECORD__(value="fastqc", type=str),
'vicuna': __RECORD__(value="vicuna", type=str),
'indelfixer': __RECORD__(value="IndelFixer.jar", type=str),
'consensusfixer': __RECORD__(value="ConsensusFixer.jar", type=str),
'indelfixer': __RECORD__(value="InDelFixer", type=str),
'consensusfixer': __RECORD__(value="ConsensusFixer", type=str),
'picard': __RECORD__(value="picard", type=str),
'bwa': __RECORD__(value="bwa", type=str),
'bowtie_idx': __RECORD__(value="bowtie2-build", type=str),
Expand Down

0 comments on commit 9a1c6fc

Please sign in to comment.