Skip to main content

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

alphapulldown_input_parser-0.5.1.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

alphapulldown_input_parser-0.5.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file alphapulldown_input_parser-0.5.1.tar.gz.

File metadata

File hashes

Hashes for alphapulldown_input_parser-0.5.1.tar.gz
Algorithm Hash digest
SHA256 7f91a9fd024bbc035f47eadef0b07bf81a769ce62320b369d4e9d23759288a3a
MD5 3e0dea420e6bf8473a612a536962a8f2
BLAKE2b-256 12e83c93d0a1c892bf8cad12c27fbffa8f94c64c89eef5c2353479b8bedc791d

See more details on using hashes here.

File details

Details for the file alphapulldown_input_parser-0.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for alphapulldown_input_parser-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d27179183ffdae4c49654ab45dc9e5b90d7fbd7705b126abfb11b7a5d58ec7bc
MD5 ed3629640bfd274f671c1b0d4c0daef4
BLAKE2b-256 55cf959e8d60028f332c750683a733035bbf943ce3e6e68db70628cf844207e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page