Migrate from BioExt/bealign to cawlign for sequence alignment#116
Merged
stevenweaver merged 1 commit intomasterfrom Oct 14, 2025
Merged
Migrate from BioExt/bealign to cawlign for sequence alignment#116stevenweaver merged 1 commit intomasterfrom
stevenweaver merged 1 commit intomasterfrom
Conversation
Replace the two-step bealign+bam2msa alignment workflow with a single cawlign call. This migration simplifies the alignment process and removes the BioExt dependency. Key changes: - Replace bealign and bam2msa with cawlign for sequence alignment - Remove BAM intermediate file format, cawlign outputs FASTA directly - Add optional --cawlign CLI argument (defaults to 'cawlign' in PATH) - Add optional --score-matrix CLI argument (defaults to 'HIV_BETWEEN_F') - Add validate_cawlign() function to warn if cawlign is not found - Remove BioExt from install_requires in setup.py - Update phase numbering after removing BAM_FASTA_CONVERSION phase - Document cawlign v1.0.3+ as required non-PyPI dependency The cawlign command uses: - '-s SCORE_MATRIX' for alignment scoring - '-t codon' for codon-aware alignment (required for HIV_BETWEEN_F) - '-I' flag to include reference sequence in output - '-r reference' to specify reference sequence All existing tests pass with the new implementation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR migrates the HIV-TRACE alignment workflow from BioExt/bealign to cawlign, simplifying the alignment process and removing the BioExt dependency.
Changes Made
cawligncall instead of two-stepbealign+bam2msaprocess--cawlign: Path to cawlign executable (defaults to 'cawlign' in PATH)--score-matrix: Score matrix for alignment (defaults to 'HIV_BETWEEN_F')validate_cawlign()function warns if cawlign is not foundbioext >= 0.21.8from install_requiresBAM_FASTA_CONVERSIONphase, renumbered remaining phasesTechnical Details
The cawlign command uses:
-s SCORE_MATRIX: Alignment scoring matrix-t codon: Codon-aware alignment mode (required for HIV_BETWEEN_F)-I: Include reference sequence in output (equivalent to bealign's-K)-r reference: Specify reference sequence fileTesting
All 14 existing tests pass with the new implementation:
Dependencies
Breaking Changes
None. The changes are backward compatible - existing functionality is preserved with the new alignment tool.