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.0.tar.gz (10.7 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.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for alphapulldown_input_parser-0.5.0.tar.gz
Algorithm Hash digest
SHA256 5be55ded62e6f770de79d7630f371c9b8cb96fecda96c1db63e6bb7ba06d30c1
MD5 ee29ad000df56fb526866dd85af9dadd
BLAKE2b-256 36f061e95aa21a239ee6a20ffe0381c4c15db3df9b7e7cf20a7ea582aa99c126

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for alphapulldown_input_parser-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 30f7b2101b917a8e8b9836741760776e97eae5ea657bdd265c57ce16e6ea014a
MD5 936bf545b64ed1c671d8e22a42b26989
BLAKE2b-256 5223ff1ec1eba7dbc192dc4df9ed57c3a40c3d4e186f5783367769b838dff9e5

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