Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: BWA MEM 2 support #81

Open
wants to merge 1 commit into
base: ReleaseBranch_1.2.73-2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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_tbiLsf" type="string"/>
Expand Down