Fold specification parser for AlphaPulldown
Project description
alphapulldown-input-parser
Reusable parser for AlphaPulldown-style fold specifications. Install it with:
pip install "alphapulldown-input-parser>=0.4.0"
or, for local development:
pip install -e /path/to/alphapulldown-input-parser
The package exposes three helpers:
parse_fold(...)– mirrors the historical AlphaPulldown helper and performs feature existence checks.expand_fold_specification(...)– expands a single fold string without raising if features are missing.parse_fold_chains(spec, protein_delimiter="+")– pure-syntactic parse of a single spec into(chain_name, copies, regions)triples, with no filesystem access or feature lookup. Useful for resource sizing or input validation before features exist on disk.
The parser is dependency-free and works across AlphaPulldown, the Snakemake pipeline, or any other tooling that consumes the same fold syntax.
As of 0.4.0, AF3 JSON feature files support the same copy/range suffixes as
classic AlphaPulldown feature pickles, including discontinuous regions and copy
counts. For example:
parse_fold(
[
"P01258_af3_input.json:1-100",
"P01258_af3_input.json:1-100:150-200",
"P01258_af3_input.json:2:1-100:150-200+P01579_af3_input.json",
],
features_directory=["/path/to/features"],
protein_delimiter="+",
)
AlphaPulldown and AlphaPulldownSnakemake can then preserve those AF3 JSON regions during input preparation. For the AlphaFold 3 backend, discontinuous regions are expanded into separate cropped chains rather than one continuous polymer chain.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file alphapulldown_input_parser-0.5.1.tar.gz.
File metadata
- Download URL: alphapulldown_input_parser-0.5.1.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f91a9fd024bbc035f47eadef0b07bf81a769ce62320b369d4e9d23759288a3a
|
|
| MD5 |
3e0dea420e6bf8473a612a536962a8f2
|
|
| BLAKE2b-256 |
12e83c93d0a1c892bf8cad12c27fbffa8f94c64c89eef5c2353479b8bedc791d
|
File details
Details for the file alphapulldown_input_parser-0.5.1-py3-none-any.whl.
File metadata
- Download URL: alphapulldown_input_parser-0.5.1-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d27179183ffdae4c49654ab45dc9e5b90d7fbd7705b126abfb11b7a5d58ec7bc
|
|
| MD5 |
ed3629640bfd274f671c1b0d4c0daef4
|
|
| BLAKE2b-256 |
55cf959e8d60028f332c750683a733035bbf943ce3e6e68db70628cf844207e3
|