-
Notifications
You must be signed in to change notification settings - Fork 5
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
base: ReleaseBranch_1.2.73-2
Are you sure you want to change the base?
Conversation
Next step: Try to convert the now inoperable "accelerated" job, that used to be used for Convey and later Bluebee FPGA implementations of bwa, for BWA-MEM2. This would allow using a dedicated set of resource sets for bwa-mem2. |
@coderabbitai review |
WalkthroughThe changes primarily focus on enhancing the BWA module's adaptability in the Changes
Validation with GitHub issue(Beta)Assessment of the PR changes against GitHub Issue
TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to filter (1)
- resources/configurationFiles/analysisQC.xml
Files selected for processing (1)
- resources/analysisTools/qcPipeline/environments/tbi-lsf-cluster.sh (1 hunks)
Additional comments: 4
resources/analysisTools/qcPipeline/environments/tbi-lsf-cluster.sh (4)
- 129-160: The logic for determining the BWA module and binary based on the version number and workflow ID seems sound. However, it's important to ensure that the BWA_VERSION environment variable is always set correctly before this script is run. Also, the script assumes that the BWA version number always starts with a major version of "0" or "2". If BWA releases a version with a different major version number, this script will fail. Consider adding a default case to handle unexpected major version numbers.
* 132-141: + # 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 + # Consider a default case here + exit 1 + fi
- 143-160: The script checks if the workflow ID is "bisulfiteCoreAnalysis" and if so, it appends a "-bisulfite" suffix to the BWA version. It also checks if the workflow ID is "qcAnalysis" or "exomeAnalysis" and if so, it loads the BWA module and sets the BWA binary based on whether accelerated hardware is being used. This logic seems sound, but it's important to ensure that the workflow ID and the useAcceleratedHardware variable are always set correctly before this script is run.
* 143-160: + 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" + # 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_MODULE" BWA_VERSION + export BWA_BINARY="$BWA_MODULE" + elif [[ "${useAcceleratedHardware:-true}" == true ]]; then + moduleLoad bwa-bb BWA_VERSION + export BWA_ACCELERATED_BINARY=bwa-bb + fi + fi
TODO
Summary by CodeRabbit
New Features:
Refactor: