feat(alphafold): accept a user-provided custom MSA input (#52)#235
Draft
Elarwei001 wants to merge 1 commit into
Draft
feat(alphafold): accept a user-provided custom MSA input (#52)#235Elarwei001 wants to merge 1 commit into
Elarwei001 wants to merge 1 commit into
Conversation
Add an `msa` parameter (Python) / -msa, --msa flag (CLI) to gget alphafold that lets users supply a custom multiple sequence alignment (a3m or aligned FASTA) instead of running the internal jackhmmer search. The first sequence in the MSA must be the query. When a custom MSA is provided, gget skips the jackhmmer search and the genetic-database download entirely and builds the MSA features directly from the file. New helpers detect_msa_format()/parse_custom_msa()/ read_custom_msa() handle format detection and a3m/FASTA parsing (lowercase a3m insertions are folded into the deletion matrix, matching AlphaFold's own parser). Currently supported for single-sequence (monomer) predictions; clear errors are raised otherwise. Default behavior is unchanged (backward compatible). Resolves scverse#52. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #235 +/- ##
==========================================
+ Coverage 56.14% 56.45% +0.31%
==========================================
Files 29 29
Lines 9244 9317 +73
==========================================
+ Hits 5190 5260 +70
- Misses 4054 4057 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Resolves #52
Summary
gget alphafold: Added a newmsaargument (-msa/--msaon the command line) that lets you provide a custom multiple sequence alignment (a3m or aligned FASTA) instead of running the internal jackhmmer search. The first sequence in the MSA must be the query. This enables folding from a manually curated MSA and skips the genetic database download entirely (currently supported for single-sequence/monomer predictions). Resolves issue 52.Testing
Unit tests in
tests/test_alphafold.pywith a3m/FASTA fixtures intests/fixtures/(parsing/validation level, since AlphaFold's heavy deps are unavailable in CI); run with pytest.