Skip to content

Commit

Permalink
First adaptations.
Browse files Browse the repository at this point in the history
  • Loading branch information
vinjana committed Mar 17, 2022
1 parent 66dfa91 commit 572f670
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
24 changes: 20 additions & 4 deletions resources/analysisTools/qcPipeline/environments/tbi-lsf-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,32 @@ export -f sambamba_markdup
export SAMBAMBA_MARKDUP_BINARY=sambamba_markdup


# Try to infer the module name and binary filename from the version number.
bwaMajorVersion="$(echo "$BWA_VERSION" | cut -f 1 -d '.')"
if [[ "$bwaMajorVersion" == "0" ]]; then
export BWA_MODULE=bwa
elif [[ "$bwaMajorVersion" == "2" ]]; then
export BWA_MODULE=bwa-mem2
else
echo "Cannot infer BWA_MODULE and BWA_BINARY from BWA_VERSION: '$BWA_VERSION'" >> /dev/stderr
exit 1
fi

if [[ "$WORKFLOW_ID" == "bisulfiteCoreAnalysis" ]]; then
if [[ "$bwaMajorVersion" != "1" ]]; then
echo "Only bwa-0.* has a bisulfite patch module" >> /dev/stderr
exit 1
fi
## For bisulfite alignment, we suffix the the value of BINARY_VERSION by '-bisulfite', because that's the name in LSF cluster.
export BWA_VERSION="${BWA_VERSION:?BWA_VERSION is not set}-bisulfite"
moduleLoad bwa
export BWA_BINARY=bwa
# This works with BWA_MODULE because the bwa-mem2 binary has the same interface.
moduleLoad "$BWA_MODULE" BWA_VERSION
export BWA_BINARY="$BWA_MODULE"

elif [[ "$WORKFLOW_ID" == "qcAnalysis" || "$WORKFLOW_ID" == "exomeAnalysis" ]]; then
if [[ "${useAcceleratedHardware:-false}" == false ]]; then
moduleLoad bwa
export BWA_BINARY=bwa
moduleLoad "$BWA_MODULE" BWA_VERSION
export BWA_BINARY="$BWA_MODULE"
elif [[ "${useAcceleratedHardware:-true}" == true ]]; then
moduleLoad bwa-bb BWA_VERSION
export BWA_ACCELERATED_BINARY=bwa-bb
Expand Down
6 changes: 5 additions & 1 deletion resources/configurationFiles/analysisQC.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
<cvalue name="BIOBAMBAM_VERSION" value="0.0.148" type="string"/>
<cvalue name="JAVA_VERSION" value="1.8.0_131" type="string"/>
<cvalue name="BWA_VERSION" value="0.7.8" type="string"
description="Use e.g. 0.7.8-r2.05 for a specific revision of bb-bwa."/>
description="Use e.g. 0.7.8-r2.05 for a specific revision of bb-bwa. Node that bwa-mem2 uses much more memory."/>
<cvalue name="BWA_MODULE" value="" type="string"
description="Empty string will result in automatic inference of the module name. If the first number (major version) is '2' then BWA_MODULE is automatically set to 'bwa-mem2', otherwise 'bwa'. See tbi-lsf-cluster.sh. You can also explicitly set the version."/>
<cvalue name="BWA_MEM_OPTIONS" value='" -T 0 "' type="string"
description="The original CO configuration is ' -T 0 '. Note that the value must be quoted."/>
<cvalue name="FASTQC_VERSION" value="0.11.3" type="string"/>

<cvalue name="workflowEnvironmentScript" value="workflowEnvironment_tbiPbs" type="string"/>
Expand Down

0 comments on commit 572f670

Please sign in to comment.