Package including ViennaRNA helper functions and classes
Project description
RNAtweaks
Installation
In addition to the RNAtweaks package you also need the viennarna package from anaconda
pip install RNAtweaks
conda install viennarna
Usage
RNAplfold
For RNAplfold usage two different wrappers exist. One uses the command line version of RNAplfold and the other uses the ViennaRNA API
import RNAtweaks.RNAtweaks as RNAtweaks
sequence = "AAATTTTGGGGGGCCCC"
window = 3 # winsize option of RNAplfold
span = 3 # span option of RNAplfold
region = 3 # ulength option of RNAplfold
constraint = ("paired", 3, 5)
api_result = RNAtweaks.api_rnaplfold(sequence, window, span, region=region, temperature=37.0, constraint=[constraint])
cmd_result = RNAtweaks.cmd_rnaplfold(sequence, window, span, region=region, temperature=37.0, constraint=[constraint])
For now only paired and unpaired constraints are supported. The constraints must be a list of
Tuples in the format ("paired"/"unpaired", start, end)
in contrast to the ViennaRNA constraints these are zero based.
Both calls will produce an identical PLFoldOutput object that reflects the ViennaRNA _lunp
file.
PLFoldOutput
Object that reflects the ViennaRNA _lunp
file. The objects supports various functions to get different representations
of the file. The recommended usage is to produce an numpy array as follows:
array = api_result.numpy_array
However, it is also possible to get the text representation of the file, which is usually produced by RNAplfold via:
array = api_result.get_text(nan="NA", truncated=False)
Hereby nan replaced the non float values with "NA"
and the truncated flag is used to either keep or drop the header
lines beginning with "#".
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 Distribution
Built Distribution
File details
Details for the file RNAtweaks-0.0.2.tar.gz
.
File metadata
- Download URL: RNAtweaks-0.0.2.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d83c028bf5641b5d938d849f5bf85d8ae3c037ac85f933bb8c2d488aeb594847 |
|
MD5 | ca6a785865a416caa9390e27968b5dbe |
|
BLAKE2b-256 | 0ef245daad47cb66a396e4d3451204739080fd056e3cecbc9a5c3fb388ef8aff |
File details
Details for the file RNAtweaks-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: RNAtweaks-0.0.2-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 811f4b225eda08539b1a481303ce29ec3aad6ae81420f733815e8baacf352bb0 |
|
MD5 | 9052415e8b2c31849c8bd95c10fec1ab |
|
BLAKE2b-256 | 83c866cac9103f55c4957f22ba5b03cb538333540c00e6672ba293d493391ed5 |