Skip to main content

HFold: Python bindings for the HFold C++ library

Project description

How to test the hfold python package

1. Make sure you have ViennaRNA installed on your system

ViennaRNA package installation

The hfold package requires ViennaRNA to be installed before compilation.

  1. Download the ViennaRNA package: ViennaRNA-2.7.1.tar.gz

  2. Install the Package:

tar -zxvf ViennaRNA-2.7.1.tar.gz
cd ViennaRNA-2.7.1
./configure --without-perl
sudo make -j$(nproc)              # Linux
sudo make -j$(sysctl -n hw.ncpu)  # macOS
sudo make install

More info: ViennaRNA GitHub

2. Setup a Virtual Environment

Make sure you're in a virtual environment

python3 -m venv venv
source venv/bin/activate

3. Install Python Dependencies

Make sure you have pybind11 and setuptools installed

sudo apt install pybind11-dev # linux
brew install pybind11 # MacOS
python3 -m pip install pybind11 setuptools scikit-build

4. Build the Python Extension

From the project root:

pip install -v -e ./pylib/

5. Start Python

python3

6. Run Test Commands

Once in the Python shell, you can test hfold:

import hfold

# Basic sequence folding
hfold.hfold("AGGGCUAUCCUU", param_file="../params/rna_DirksPierce09.par")[0][0]

# Folding with suboptimal structures
hfold.hfold("AGGGCUAUCCUU", subopt=5, param_file="../params/rna_DirksPierce09.par")[0]

# Folding sequences from file
hfold.hfold(subopt=2, fileI="./sample_inputs/sample.txt", param_file="../params/rna_DirksPierce09.par")

Full List of Parameters

Parameter Type Description
sequence str RNA sequence
restriction str Folding constraint
pk_free bool Exclude pseudoknots
pk_only bool Only allow pseudoknots
dangles int Dangle configuration
subopt int Number of suboptimal structures
fileI str Input file path
fileO str Output file path
param_file str Thermodynamic parameters file
noConv_given bool Do not convert DNA into RNA
suppress_output bool Suppress console output

Build wheels

python -m pip install --upgrade cibuildwheel scikit-build-core twine pybind11 setuptools # install pre-req
cibuildwheel pylib --output-dir dist # build
python -m twine upload dist/* # upload

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

hfold-0.0.5-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

hfold-0.0.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

hfold-0.0.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

hfold-0.0.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

hfold-0.0.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

hfold-0.0.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

hfold-0.0.5-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (627.4 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file hfold-0.0.5-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hfold-0.0.5-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d960e116fbdbaf2284d438fd70705cdc17d47e46a4226b58c3a0d67e6f60355e
MD5 dc8bcead21cda0d13088f59d38731ef6
BLAKE2b-256 56a76af9d79a008519950dc6e5d2a681dbab8413b0b81e57c25379cd7fcc1dd4

See more details on using hashes here.

Provenance

The following attestation bundles were made for hfold-0.0.5-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: python-publish.yml on TheCOBRALab/HFold

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hfold-0.0.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hfold-0.0.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4fb7fa95c966d45a8bce567901ac517c57cd399b5e541727001db05bfeb51026
MD5 f9b97067aa7e79cb7ecbb9c63c706cac
BLAKE2b-256 59cc5c4f905877d8f46fe2be6b72fbbb3c7962952e5b2f050c4e925754629d12

See more details on using hashes here.

Provenance

The following attestation bundles were made for hfold-0.0.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: python-publish.yml on TheCOBRALab/HFold

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hfold-0.0.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hfold-0.0.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 75ebcbf205098704735e9c2a15940980cd198c5d08d1f11387c9eb21690314ef
MD5 96ba94e5763ee628153e733b23fb00b4
BLAKE2b-256 753932dcae4e4d4421d611b16510e8461f415294aeec3c50c4cb56a1468a783d

See more details on using hashes here.

Provenance

The following attestation bundles were made for hfold-0.0.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: python-publish.yml on TheCOBRALab/HFold

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hfold-0.0.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hfold-0.0.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 77a44089fd22ba7e2ffed19ad7358fe7033cedae4dc37725ab2c25fd50fb4210
MD5 40a745abaadf9c542aae188bd79a7e4e
BLAKE2b-256 1d92829878ebf640b412ab3ee1108e6d50de62ab5782a3bbd8da2679bf9f0232

See more details on using hashes here.

Provenance

The following attestation bundles were made for hfold-0.0.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: python-publish.yml on TheCOBRALab/HFold

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hfold-0.0.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hfold-0.0.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 991c2e381d22e4be73eff3bdb989844b76444bdf2d275e4e5b1c1d1e983e5d72
MD5 39ea3e6ae511ee6f061e7e712ec3b3ec
BLAKE2b-256 17ef5ba6128ad4d174a684b81e4133b33966b9575ba5aa963c6c000e25e850e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for hfold-0.0.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: python-publish.yml on TheCOBRALab/HFold

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hfold-0.0.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hfold-0.0.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9f5f5a47b89c5cc81e319f1f2dfeaa8f79dbc15af8622bc96c0339d18d381b87
MD5 293dfd1f23051e5e0bdd3465301293ba
BLAKE2b-256 e519df9d66b562b6ac06ab5e3a180efc5132506c2bde095b5e3ac2c9fa3fe0cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for hfold-0.0.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: python-publish.yml on TheCOBRALab/HFold

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hfold-0.0.5-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hfold-0.0.5-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7980bb0cf25d2a8dd75e13bc3edc694537e136b0b5f2a25d71e59dedf52c39f2
MD5 dbd4931a27febcf541510563d920afad
BLAKE2b-256 94a6b8863d8208ce26802df23dcab48397b9fde33df2e2aa549680595e59f763

See more details on using hashes here.

Provenance

The following attestation bundles were made for hfold-0.0.5-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: python-publish.yml on TheCOBRALab/HFold

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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