linearpartition-unofficial


Namelinearpartition-unofficial JSON
Version 0.2 PyPI version JSON
download
home_pagehttps://github.com/ChangLabSNU/python-linearpartition
SummaryPython interface to LinearPartition, a linear-time RNA secondary structure prediction tool
upload_time2024-01-20 07:13:18
maintainer
docs_urlNone
authorHyeshik Chang
requires_python
licenseMIT
keywords rna secondary structure rna structure
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # python-linearpartition

Unofficial CPython binding to LinearPartition

### Installation

Use `pip` to install the module.

```bash
pip install linearpartition-unofficial
```

You may build from the source code for unsupported Python versions or platforms.

```bas
git clone --recursive https://github.com/ChangLabSNU/python-linearpartition
cd python-linearpartition
pip install .
```

### Usage

The module currently only has one function called `partition(seq)`.
The seq parameter should be an RNA sequence in *uppercase* letters,
and any `T` should be converted to `U` before passing it to the function.

```python
>>> import linearpartition as lp
>>> seq = 'UGUCGGGGUUGGCUGUCUGACA'
>>> bpmtx, fe = lp.partition(seq)
>>> fe
-7.216465644007023
>>> import pandas as pd
>>> pd.DataFrame(bpmtx).sort_values('prob', ascending=False).head()
    i   j      prob
19  3  18  0.999201
18  2  19  0.998801
17  1  20  0.997717
21  5  16  0.996692
22  4  17  0.996508
```

### Functions

#### linearpartition.partition()

The `linearpartition.partition` function is a Python C extension function that
calls [LinearPartition](https://github.com/LinearFold/LinearPartition) to
perform a linear partitioning operation and get the base pairing probability
matrix.

```python
linearpartition.partition(seq, mode='eterna', beamsize=100, dangles=2)
```

##### Parameters

- `seq` (required): A string containing the RNA sequence to be analyzed.
  The sequence must be in uppercase and only contain A, C, G, and U.
  This parameter is required.
- `mode` (optional): The name of free energy parameters to use. Use
  `'vienna'` for Vienna RNA parameters, or `'eterna'` for EternaFold
  parameters.
- `beamsize` (optional): An integer representing the beam size for the
  operation. Larger value requires more computational time and memory.
  The default value is 100.
- `dangles` (optional): An integer representing the number of dangles for
  the partitioning operation. The default value is 2.

##### Return Value

This function returns a tuple containing the result of the partitioning
operation and the free energy of the ensemble structure in kcal/mol.

### Author

Hyeshik Chang <hyeshik@snu.ac.kr>

### License

This Python binding is licensed under [the MIT-style license](LICENSE).
However, the compiled binary includes code from the LinearPartition
package, which is licensed for non-commercial use.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ChangLabSNU/python-linearpartition",
    "name": "linearpartition-unofficial",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "RNA,secondary structure,RNA structure",
    "author": "Hyeshik Chang",
    "author_email": "hyeshik@snu.ac.kr",
    "download_url": "https://files.pythonhosted.org/packages/07/4e/7c13033b54583774643a9546f29e1bbbc5a9ac05695b0a722ac5cd24a852/linearpartition-unofficial-0.2.tar.gz",
    "platform": null,
    "description": "# python-linearpartition\n\nUnofficial CPython binding to LinearPartition\n\n### Installation\n\nUse `pip` to install the module.\n\n```bash\npip install linearpartition-unofficial\n```\n\nYou may build from the source code for unsupported Python versions or platforms.\n\n```bas\ngit clone --recursive https://github.com/ChangLabSNU/python-linearpartition\ncd python-linearpartition\npip install .\n```\n\n### Usage\n\nThe module currently only has one function called `partition(seq)`.\nThe seq parameter should be an RNA sequence in *uppercase* letters,\nand any `T` should be converted to `U` before passing it to the function.\n\n```python\n>>> import linearpartition as lp\n>>> seq = 'UGUCGGGGUUGGCUGUCUGACA'\n>>> bpmtx, fe = lp.partition(seq)\n>>> fe\n-7.216465644007023\n>>> import pandas as pd\n>>> pd.DataFrame(bpmtx).sort_values('prob', ascending=False).head()\n    i   j      prob\n19  3  18  0.999201\n18  2  19  0.998801\n17  1  20  0.997717\n21  5  16  0.996692\n22  4  17  0.996508\n```\n\n### Functions\n\n#### linearpartition.partition()\n\nThe `linearpartition.partition` function is a Python C extension function that\ncalls [LinearPartition](https://github.com/LinearFold/LinearPartition) to\nperform a linear partitioning operation and get the base pairing probability\nmatrix.\n\n```python\nlinearpartition.partition(seq, mode='eterna', beamsize=100, dangles=2)\n```\n\n##### Parameters\n\n- `seq` (required): A string containing the RNA sequence to be analyzed.\n  The sequence must be in uppercase and only contain A, C, G, and U.\n  This parameter is required.\n- `mode` (optional): The name of free energy parameters to use. Use\n  `'vienna'` for Vienna RNA parameters, or `'eterna'` for EternaFold\n  parameters.\n- `beamsize` (optional): An integer representing the beam size for the\n  operation. Larger value requires more computational time and memory.\n  The default value is 100.\n- `dangles` (optional): An integer representing the number of dangles for\n  the partitioning operation. The default value is 2.\n\n##### Return Value\n\nThis function returns a tuple containing the result of the partitioning\noperation and the free energy of the ensemble structure in kcal/mol.\n\n### Author\n\nHyeshik Chang <hyeshik@snu.ac.kr>\n\n### License\n\nThis Python binding is licensed under [the MIT-style license](LICENSE).\nHowever, the compiled binary includes code from the LinearPartition\npackage, which is licensed for non-commercial use.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python interface to LinearPartition, a linear-time RNA secondary structure prediction tool",
    "version": "0.2",
    "project_urls": {
        "Download": "https://github.com/ChangLabSNU/python-linearpartition/releases",
        "Homepage": "https://github.com/ChangLabSNU/python-linearpartition"
    },
    "split_keywords": [
        "rna",
        "secondary structure",
        "rna structure"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d48cb4c9836ad9ffb1badfdd4d34cb3b04b04982509bcf6bf34ede78c9eeef22",
                "md5": "e01ffb4631fe0aa15f04f366a42be26e",
                "sha256": "40f93343cfd93297c5c94cf19c7a5c8b08c4a3e5521e35d887135f8eeb59a9ca"
            },
            "downloads": -1,
            "filename": "linearpartition_unofficial-0.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "e01ffb4631fe0aa15f04f366a42be26e",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 804100,
            "upload_time": "2024-01-20T07:13:03",
            "upload_time_iso_8601": "2024-01-20T07:13:03.559091Z",
            "url": "https://files.pythonhosted.org/packages/d4/8c/b4c9836ad9ffb1badfdd4d34cb3b04b04982509bcf6bf34ede78c9eeef22/linearpartition_unofficial-0.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "000040b5506f4a8abd998ce0543ee63ad5baccb19ab4f31644c7b08bb314af1a",
                "md5": "ac636e0cc8e1c15ac059831895f4cff5",
                "sha256": "aef2012cceca9e7a27eae70c92bf6dd44b6c14c5dffdaafc22afeb01020e3fda"
            },
            "downloads": -1,
            "filename": "linearpartition_unofficial-0.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "ac636e0cc8e1c15ac059831895f4cff5",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": null,
            "size": 804852,
            "upload_time": "2024-01-20T07:13:06",
            "upload_time_iso_8601": "2024-01-20T07:13:06.407449Z",
            "url": "https://files.pythonhosted.org/packages/00/00/40b5506f4a8abd998ce0543ee63ad5baccb19ab4f31644c7b08bb314af1a/linearpartition_unofficial-0.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7fdfeefe38f1ae17fa7bb9cbcffab5ce2d3635809abe33f930869dc894773336",
                "md5": "2a32e14b1c3b2928074c94b4b515f5aa",
                "sha256": "44a1649ae9b41e6441d1758cfe7f65541e402d826414fdde3fcf7b911b4b14c9"
            },
            "downloads": -1,
            "filename": "linearpartition_unofficial-0.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "2a32e14b1c3b2928074c94b4b515f5aa",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": null,
            "size": 805077,
            "upload_time": "2024-01-20T07:13:08",
            "upload_time_iso_8601": "2024-01-20T07:13:08.319570Z",
            "url": "https://files.pythonhosted.org/packages/7f/df/eefe38f1ae17fa7bb9cbcffab5ce2d3635809abe33f930869dc894773336/linearpartition_unofficial-0.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3790dd53e0af1b92c6a26f38514b2b5a7d22fd3548389a738db456027b10b3d2",
                "md5": "503a4829fb790b6e210498b748ec0180",
                "sha256": "e364ad2349224f9d47bbf22411aa562bd1dd408a8a8c3b29c017833222c870f1"
            },
            "downloads": -1,
            "filename": "linearpartition_unofficial-0.2-cp36-cp36m-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "503a4829fb790b6e210498b748ec0180",
            "packagetype": "bdist_wheel",
            "python_version": "cp36",
            "requires_python": null,
            "size": 803657,
            "upload_time": "2024-01-20T07:13:10",
            "upload_time_iso_8601": "2024-01-20T07:13:10.308450Z",
            "url": "https://files.pythonhosted.org/packages/37/90/dd53e0af1b92c6a26f38514b2b5a7d22fd3548389a738db456027b10b3d2/linearpartition_unofficial-0.2-cp36-cp36m-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "13388689af0d2f6782c4ddc0001de890256f0ac1ec670c39cd6a49cc9e161372",
                "md5": "5f7b8b4138a1390b1fadc9f64485ec43",
                "sha256": "5b3f99fada10d48271e6061348d43981366886383fc1950fb02f8126aae67ead"
            },
            "downloads": -1,
            "filename": "linearpartition_unofficial-0.2-cp37-cp37m-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "5f7b8b4138a1390b1fadc9f64485ec43",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 804986,
            "upload_time": "2024-01-20T07:13:12",
            "upload_time_iso_8601": "2024-01-20T07:13:12.364600Z",
            "url": "https://files.pythonhosted.org/packages/13/38/8689af0d2f6782c4ddc0001de890256f0ac1ec670c39cd6a49cc9e161372/linearpartition_unofficial-0.2-cp37-cp37m-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1bced042f2aec8c88d0fa1de7db20bfe3cd3d7b081bb6387559b271e46ded3e7",
                "md5": "eecb65045b9054cbc76ab2f1cdb6fce3",
                "sha256": "d30f34a31bfc2f869d97a102ec95ff86b5a0bde0a754a045bf96055cd961ef58"
            },
            "downloads": -1,
            "filename": "linearpartition_unofficial-0.2-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "eecb65045b9054cbc76ab2f1cdb6fce3",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": null,
            "size": 804262,
            "upload_time": "2024-01-20T07:13:14",
            "upload_time_iso_8601": "2024-01-20T07:13:14.350915Z",
            "url": "https://files.pythonhosted.org/packages/1b/ce/d042f2aec8c88d0fa1de7db20bfe3cd3d7b081bb6387559b271e46ded3e7/linearpartition_unofficial-0.2-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4aa3f25d82fb897678bb8a0b6dbc59bdcc595327413172df5bb4b72ce65f2426",
                "md5": "2796732b1427ab4d66ec999c889fa983",
                "sha256": "64d22519aa6ca7634800ec1fafeae58a82f6711bcc8300e20321339e55987b7a"
            },
            "downloads": -1,
            "filename": "linearpartition_unofficial-0.2-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "2796732b1427ab4d66ec999c889fa983",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": null,
            "size": 803858,
            "upload_time": "2024-01-20T07:13:17",
            "upload_time_iso_8601": "2024-01-20T07:13:17.164969Z",
            "url": "https://files.pythonhosted.org/packages/4a/a3/f25d82fb897678bb8a0b6dbc59bdcc595327413172df5bb4b72ce65f2426/linearpartition_unofficial-0.2-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "074e7c13033b54583774643a9546f29e1bbbc5a9ac05695b0a722ac5cd24a852",
                "md5": "7a25394fbf792f07ecec1336eb0776aa",
                "sha256": "72089742a419d6505d26fb8f9b780721d1c0fa8851d775dc44b149ddd9b824f0"
            },
            "downloads": -1,
            "filename": "linearpartition-unofficial-0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "7a25394fbf792f07ecec1336eb0776aa",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7838,
            "upload_time": "2024-01-20T07:13:18",
            "upload_time_iso_8601": "2024-01-20T07:13:18.679735Z",
            "url": "https://files.pythonhosted.org/packages/07/4e/7c13033b54583774643a9546f29e1bbbc5a9ac05695b0a722ac5cd24a852/linearpartition-unofficial-0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-20 07:13:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ChangLabSNU",
    "github_project": "python-linearpartition",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "linearpartition-unofficial"
}
        
Elapsed time: 0.19197s