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.
-
Download the ViennaRNA package: ViennaRNA-2.7.0.tar.gz
-
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
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:
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 |
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
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 hfold-0.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: hfold-0.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe4a6ebdf65d5634134b7e0130fb9a5935a964997a62e8e7465c451b2a72ad3e
|
|
| MD5 |
741887cb69937e5ff4cc1e01bbb8570b
|
|
| BLAKE2b-256 |
b0f33a2a2cec75e6565ec8cbb17cf8036290da8c4143437ed4e71a79c57f43ed
|
File details
Details for the file hfold-0.0.2-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: hfold-0.0.2-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.13, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c57d7950d1ca46aa0efa4d830c3d0f4a6df2957c57439681b21bd58d7335619a
|
|
| MD5 |
9cf4159fcfdbb754c4d438212caa2f38
|
|
| BLAKE2b-256 |
84387106812163d2f1ad6577a43ebe73af8b2d21a2aefb9ae5605726e31554bb
|
File details
Details for the file hfold-0.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: hfold-0.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
845335f9e10de5d82be0e14ffdfc2c2421ddb5c81bd3cdacec634312342c9ea3
|
|
| MD5 |
78af41988bed0a70b629d48f697a4e70
|
|
| BLAKE2b-256 |
3fa45440a798c829093e053aa194da5cb10742d46bbbaae6e1edc34c3ee3969b
|
File details
Details for the file hfold-0.0.2-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: hfold-0.0.2-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06306947dd91dd4bd4ab7b9903dc671cd86ff879da221b4cba24cfc041d88069
|
|
| MD5 |
725955ffe1720c3997af753de1fee21d
|
|
| BLAKE2b-256 |
a5ccd97f3db6f2b92cc46fcac6e12d44f887f8d98919041274db4514fe506645
|
File details
Details for the file hfold-0.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: hfold-0.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9160dcee6541623c9e5f1f959bc4c90293565003dc0cbf283978dd2fcfd97f06
|
|
| MD5 |
58b6f6fd0cbfc8486955537ff241eb95
|
|
| BLAKE2b-256 |
fa03ac97926b05c25c549879c2e5bdfc44248700b8deb63dbe77528b588a4a09
|
File details
Details for the file hfold-0.0.2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: hfold-0.0.2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c03cd0581bdacb14c5f08b456153e27fa6184882ce0a172f8dcc4112f78a86b5
|
|
| MD5 |
e145f523c03fdab7769afe0d1de2137c
|
|
| BLAKE2b-256 |
e3571cd2efc41cf0d8db395c4c215f9a6b074876fe3795d2c82dfbf1586538da
|
File details
Details for the file hfold-0.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: hfold-0.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4d36673a0dd6ca49735ef3f4908950f82ab75720013b1292ddcd12a95e932a5
|
|
| MD5 |
772c3eb1de14546db1c3ec35310d66ad
|
|
| BLAKE2b-256 |
3888e25fa70bfae51035ea830d3fbf1bc682e575b0593fc3f8111633d25220ad
|
File details
Details for the file hfold-0.0.2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: hfold-0.0.2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d338b1ee21e6107b5ca086e132dd1186e9ea6f5e212a078e233d0a3a4203218
|
|
| MD5 |
7a4e123c5fd007cc361b672d9e151d81
|
|
| BLAKE2b-256 |
5fbc81d70db1b5153572b8c3686805b468347a278a373eae772211c3fe273373
|
File details
Details for the file hfold-0.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: hfold-0.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37f9c6929ed0b56ff2de6d473a22078e4df10d3096e591eb18d0deb8b01f78bb
|
|
| MD5 |
1696725f1a4eb7b3b3a794d3f6ce3eb5
|
|
| BLAKE2b-256 |
d6d49c0b30453ddfebd41925feab952b53b3e0958e970931bb5f0b6afd4a72c6
|
File details
Details for the file hfold-0.0.2-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: hfold-0.0.2-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1eb5bd5af3e5ad117d2b9b3307c8b68ea1ceb6ebb56192a1f7899a0403a30508
|
|
| MD5 |
c6f230dbd23f4852c911bdc690542c0a
|
|
| BLAKE2b-256 |
14728661ddc94fee4ea4ae9ce7754abda90944374b5f7b976472329b9239e749
|
File details
Details for the file hfold-0.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: hfold-0.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e31ec447d9cb54d1e4af9df230f3c715a9243750b86117e21e5cb7dd121f59cd
|
|
| MD5 |
630a5036d5850fb49cf00e897686c63c
|
|
| BLAKE2b-256 |
07207b11fb05bf3d5d3f29e626363303e1d15c6b94f36dfee2eda139a5574ae7
|
File details
Details for the file hfold-0.0.2-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: hfold-0.0.2-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
688e8844eade9cf6b64be1be092aa4323b2c192328d339c3493da81b927e49d3
|
|
| MD5 |
c0a1d329e1e56ff4ce603279693ccb8d
|
|
| BLAKE2b-256 |
dfe8da275bb2e726387ef424fc46c40b14701bc386229f3ff981776ae64bf713
|