Skip to main content

HFold: Python bindings for the HFold C++ library

Reason this release was yanked:

Doesn't work

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.0.tar.gz

  2. Install the Package:

tar -zxvf ViennaRNA-2.7.0.tar.gz
cd ViennaRNA-2.7.0
./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

python3 -m pip install pybind11 setuptools

4. Build the Python Extension

From the project root:

cd ./pylib
python3 setup.py build_ext --inplace

5. Start Python (From the pylib Directory)

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

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.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

hfold-0.0.1-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl (1.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ i686

hfold-0.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

hfold-0.0.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl (1.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ i686

hfold-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

hfold-0.0.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl (1.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ i686

hfold-0.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

hfold-0.0.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl (1.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ i686

hfold-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

hfold-0.0.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl (1.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ i686

hfold-0.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

hfold-0.0.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl (1.2 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ i686

File details

Details for the file hfold-0.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hfold-0.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1fa915de0e6f503fec83c4cd7e98acd677734411240aeb0248583c67bc665f74
MD5 ff52f73c5b85fcfed56fe5855e3680b7
BLAKE2b-256 e0c2994f6f29ad86ce48b63a6d53659bb849c1100380643b6f2cb35f5343d99b

See more details on using hashes here.

File details

Details for the file hfold-0.0.1-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for hfold-0.0.1-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 a734ea5dc60a85dc1d7d30137a8320ebe40672c72678f3d2a6410b6607674c40
MD5 5e72f921657c1f482792d41cdb6a03ff
BLAKE2b-256 d1a79419e6cb31488e5f6f1868451f8e901e149084115f8dabe3a9760852fda5

See more details on using hashes here.

File details

Details for the file hfold-0.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hfold-0.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8120638bf7066b9d86acbf25ccdbf911a03ddc102e30edf94c7abeec8e1294c4
MD5 6bf1c38068bd4bc4de34254f441fae85
BLAKE2b-256 38a81ab4cce283846ae07b845c484511e6cfc21abdab40b489e2097c65b8e54e

See more details on using hashes here.

File details

Details for the file hfold-0.0.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for hfold-0.0.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 8874e1828009a238d0c3f36242262940734e803c44fc05f5c25e626309c1c2d5
MD5 39a82090123316056d1c585061ace99a
BLAKE2b-256 6f344936f74ffd4c211c3b786c33b9fbe0e2f7aeb6a9f11dcf22e0ae7cfc0a66

See more details on using hashes here.

File details

Details for the file hfold-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hfold-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 48df4a71b6b7e569cacc0b8c35d3e6d7dd86e7c34211691cce9695a8a8e0fb8b
MD5 cc532720cac5290f5d280937c356217d
BLAKE2b-256 5925316bb55f4ac5f4976e17a2b1d7c22c1ef807f05e7bf15561a0d5d7f8c332

See more details on using hashes here.

File details

Details for the file hfold-0.0.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for hfold-0.0.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 67d593472f28c54debc658e2bc741347298a0240d4e5f1d3b76fc8f802eccec0
MD5 345b16957711226648664529f850b3e9
BLAKE2b-256 8ae9757d4092b01ab07db6991aa44296c8bb0ba13e5a4822ca0fe20e53e347b2

See more details on using hashes here.

File details

Details for the file hfold-0.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hfold-0.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 adf16a1e168350e8c5fe6b8e4d0454057513448bd1b404ceb8d88e723127b666
MD5 793618c55bb4b7bb856973503cd7b664
BLAKE2b-256 f3ad4945c5eb552c05f1f6897c3199cbec1587f08ed485c1b4d513d16c2b9775

See more details on using hashes here.

File details

Details for the file hfold-0.0.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for hfold-0.0.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 e6645cc01b2379bcb90977d4ea185d49a0af85994b9691f6d81e730215aba3c9
MD5 0a614d6c3cc6902af5df0f3c2fb01f41
BLAKE2b-256 6e90594f4be3254287ef63fad6cafe97c4093edd870218c99730b94d973da69a

See more details on using hashes here.

File details

Details for the file hfold-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hfold-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f356443d63f0c43007fa74b03f04f3c63108a45c07efc76646bca1b274402097
MD5 1b3cd2df78944ea0dfdedd676a5485c6
BLAKE2b-256 8dbf88ad5ed217a207677bb392cf4a850200c95f1fb3919f305901e4bf181c10

See more details on using hashes here.

File details

Details for the file hfold-0.0.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for hfold-0.0.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 cb49770c177fc99aee3fdbdd0900889326b26692f9bea7ebb223937e3c38ee3b
MD5 e5a2a6c8f46ead814a2da75418b0ae9e
BLAKE2b-256 97770be6121ecf0fa30e6009f2b7b37032a8036156f3660429760f70cbea49b7

See more details on using hashes here.

File details

Details for the file hfold-0.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hfold-0.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7fa417f6609517b604d95e311aef1b2dece777edd8f9fa78c75e1c60df56121d
MD5 2cdca1017ddeab9dc9437fc3e5db2945
BLAKE2b-256 60d14c31ba0d88788dc0ac0605cea93901f7c84a22a8f6697fea7ab767ab5668

See more details on using hashes here.

File details

Details for the file hfold-0.0.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for hfold-0.0.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 4283967f9cb1e010b33fd5b29844cfdcf5eaef40b061514ea6adaf4067a34071
MD5 47421c71762ea810d89a5ccd9fd350fc
BLAKE2b-256 b3a49fe8d9b4a1046c93ce7c9058ee5aba0b6eb86956f544153d4efff274cf77

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