# RNApysoforms <img src="./assets/RNA-pysoforms-logo.png" align="right" height="80" />
<!-- badges: start -->
[](https://github.com/UK-SBCoA-EbbertLab/RNApysoforms/actions/workflows/main.yml)
[](https://app.codecov.io/gh/UK-SBCoA-EbbertLab/RNApysoforms?branch=main)
[](https://lifecycle.r-lib.org/articles/stages.html#stable)
[](https://github.com/UK-SBCoA-EbbertLab/RNApysoforms/issues)
[](https://github.com/UK-SBCoA-EbbertLab/RNApysoforms/pulls)
[](https://rna-pysoforms.readthedocs.io/en/latest/?badge=latest)
[](https://doi.org/10.5281/zenodo.14052788)
<!-- badges: end -->
`RNApysoforms` is a Python package designed for visualizing RNA isoform structures and expression levels. Leveraging Plotly for interactive plotting and Polars for efficient data manipulation, it enables the creation of fast-rendering, interactive plots suitable for both local and web applications. Inspired by the R package [ggtranscript](https://github.com/dzhang32/ggtranscript), RNApysoforms brings similar RNA visualization capabilities to the Python ecosystem, facilitating effective exploration and presentation of RNA sequencing data.
## Pre-print for citation
https://www.biorxiv.org/content/10.1101/2024.11.06.622357v1
## Important
### RNApysoforms expects feature start and end coordinates in GTF format, where coordinates are 1-indexed and inclusive on both ends.
## Installation
You can install `RNApysoforms` using pip:
```bash
pip install RNApysoforms
```
## Quick Start
[Basic usage (quick start)](https://rna-pysoforms.readthedocs.io/en/latest/examples/basic_usage.html)
## More vignettes (usage examples)
[Rescaling introns for a prettier RNA isoform structure plot](https://rna-pysoforms.readthedocs.io/en/latest/examples/rescaled_introns.html)
[Plotting RNA isoform structure and expression](https://rna-pysoforms.readthedocs.io/en/latest/examples/expression_plot.html)
[Plotting RNA isoform structure and normalized expression](https://rna-pysoforms.readthedocs.io/en/latest/examples/expression_plot_filtered_and_ordered.html)
## Test data and documentation
[Download small test dataset](https://zenodo.org/records/13961009/files/RNApysoforms_test_data.zip?download=1)
[Function documentation and vignettes](https://rna-pysoforms.readthedocs.io/en/latest/index.html)
## Issues
Please go through the [documentation and vignettes](https://rna-pysoforms.readthedocs.io/en/latest/index.html) before submitting an issue.
## Contributing
Contributions to `RNApysoforms` are welcome! Please feel free to submit a Pull Request.
The function implementations are under the `src/RNApysoforms` directory.
## Functions
- [calculate_exon_number()](https://rna-pysoforms.readthedocs.io/en/latest/_autosummary/RNApysoforms.calculate_exon_number.html): Assigns exon numbers to exons, CDS, and introns within a genomic annotation dataset based on transcript structure and strand direction.
- [gene_filtering()](https://rna-pysoforms.readthedocs.io/en/latest/_autosummary/RNApysoforms.gene_filtering.html): Filters genomic annotations and optionally an expression matrix for a specific gene, with options to order and select top expressed transcripts.
- [make_plot()](https://rna-pysoforms.readthedocs.io/en/latest/_autosummary/RNApysoforms.make_plot.html): Creates a Plotly figure panel for transcript structure plots and/or expression data plots.
- [make_traces()](https://rna-pysoforms.readthedocs.io/en/latest/_autosummary/RNApysoforms.make_traces.html): Generates Plotly traces for visualizing transcript structures and expression data.
- [read_expression_matrix()](https://rna-pysoforms.readthedocs.io/en/latest/_autosummary/RNApysoforms.read_expression_matrix.html): Loads and processes an expression matrix, optionally merging with metadata, performing CPM normalization, and calculating relative transcript abundance.
- [read_ensembl_gtf()](https://rna-pysoforms.readthedocs.io/en/latest/_autosummary/RNApysoforms.read_ensembl_gtf.html): Reads an ENSEMBL GTF (Gene Transfer Format) file and returns the data as a Polars DataFrame.
- [shorten_gaps()](https://rna-pysoforms.readthedocs.io/en/latest/_autosummary/RNApysoforms.shorten_gaps.html): Shortens intron and transcript start gaps between exons in genomic annotations to enhance visualization.
- [to_intron()](https://rna-pysoforms.readthedocs.io/en/latest/_autosummary/RNApysoforms.to_intron.html): Converts exon coordinates into corresponding intron coordinates within a genomic annotation dataset.
## License
This project is licensed under the MIT License.
Raw data
{
"_id": null,
"home_page": "https://github.com/UK-SBCoA-EbbertLab/RNApysoforms",
"name": "RNApysoforms",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "plotly, RNA isoforms, transcripts, ggtranscript, bioinformatics, genomics",
"author": "Bernardo Aguzzoli Heberle",
"author_email": "Your Name <bernardo.aguzzoli@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/86/2f/71474c3e02305ac1079c0aa26c223ce9921626ad95085fe2b586621b571c/rnapysoforms-1.0.1.tar.gz",
"platform": null,
"description": "# RNApysoforms <img src=\"./assets/RNA-pysoforms-logo.png\" align=\"right\" height=\"80\" />\r\n\r\n\r\n<!-- badges: start -->\r\n[](https://github.com/UK-SBCoA-EbbertLab/RNApysoforms/actions/workflows/main.yml)\r\n[](https://app.codecov.io/gh/UK-SBCoA-EbbertLab/RNApysoforms?branch=main)\r\n[](https://lifecycle.r-lib.org/articles/stages.html#stable)\r\n[](https://github.com/UK-SBCoA-EbbertLab/RNApysoforms/issues)\r\n[](https://github.com/UK-SBCoA-EbbertLab/RNApysoforms/pulls)\r\n[](https://rna-pysoforms.readthedocs.io/en/latest/?badge=latest)\r\n[](https://doi.org/10.5281/zenodo.14052788)\r\n\r\n<!-- badges: end -->\r\n\r\n\r\n`RNApysoforms` is a Python package designed for visualizing RNA isoform structures and expression levels. Leveraging Plotly for interactive plotting and Polars for efficient data manipulation, it enables the creation of fast-rendering, interactive plots suitable for both local and web applications. Inspired by the R package [ggtranscript](https://github.com/dzhang32/ggtranscript), RNApysoforms brings similar RNA visualization capabilities to the Python ecosystem, facilitating effective exploration and presentation of RNA sequencing data.\r\n\r\n## Pre-print for citation\r\n\r\nhttps://www.biorxiv.org/content/10.1101/2024.11.06.622357v1\r\n\r\n\r\n## Important\r\n\r\n### RNApysoforms expects feature start and end coordinates in GTF format, where coordinates are 1-indexed and inclusive on both ends.\r\n\r\n\r\n## Installation\r\n\r\nYou can install `RNApysoforms` using pip:\r\n\r\n```bash\r\npip install RNApysoforms\r\n```\r\n\r\n\r\n## Quick Start\r\n\r\n[Basic usage (quick start)](https://rna-pysoforms.readthedocs.io/en/latest/examples/basic_usage.html)\r\n\r\n\r\n## More vignettes (usage examples)\r\n\r\n[Rescaling introns for a prettier RNA isoform structure plot](https://rna-pysoforms.readthedocs.io/en/latest/examples/rescaled_introns.html)\r\n\r\n[Plotting RNA isoform structure and expression](https://rna-pysoforms.readthedocs.io/en/latest/examples/expression_plot.html)\r\n\r\n[Plotting RNA isoform structure and normalized expression](https://rna-pysoforms.readthedocs.io/en/latest/examples/expression_plot_filtered_and_ordered.html)\r\n\r\n\r\n\r\n## Test data and documentation\r\n\r\n[Download small test dataset](https://zenodo.org/records/13961009/files/RNApysoforms_test_data.zip?download=1)\r\n\r\n[Function documentation and vignettes](https://rna-pysoforms.readthedocs.io/en/latest/index.html)\r\n\r\n\r\n## Issues\r\n\r\nPlease go through the [documentation and vignettes](https://rna-pysoforms.readthedocs.io/en/latest/index.html) before submitting an issue.\r\n\r\n\r\n## Contributing\r\n\r\nContributions to `RNApysoforms` are welcome! Please feel free to submit a Pull Request.\r\n\r\nThe function implementations are under the `src/RNApysoforms` directory.\r\n\r\n\r\n## Functions\r\n\r\n- [calculate_exon_number()](https://rna-pysoforms.readthedocs.io/en/latest/_autosummary/RNApysoforms.calculate_exon_number.html): Assigns exon numbers to exons, CDS, and introns within a genomic annotation dataset based on transcript structure and strand direction.\r\n\r\n- [gene_filtering()](https://rna-pysoforms.readthedocs.io/en/latest/_autosummary/RNApysoforms.gene_filtering.html): Filters genomic annotations and optionally an expression matrix for a specific gene, with options to order and select top expressed transcripts.\r\n\r\n- [make_plot()](https://rna-pysoforms.readthedocs.io/en/latest/_autosummary/RNApysoforms.make_plot.html): Creates a Plotly figure panel for transcript structure plots and/or expression data plots.\r\n\r\n- [make_traces()](https://rna-pysoforms.readthedocs.io/en/latest/_autosummary/RNApysoforms.make_traces.html): Generates Plotly traces for visualizing transcript structures and expression data.\r\n\r\n- [read_expression_matrix()](https://rna-pysoforms.readthedocs.io/en/latest/_autosummary/RNApysoforms.read_expression_matrix.html): Loads and processes an expression matrix, optionally merging with metadata, performing CPM normalization, and calculating relative transcript abundance.\r\n\r\n- [read_ensembl_gtf()](https://rna-pysoforms.readthedocs.io/en/latest/_autosummary/RNApysoforms.read_ensembl_gtf.html): Reads an ENSEMBL GTF (Gene Transfer Format) file and returns the data as a Polars DataFrame.\r\n\r\n- [shorten_gaps()](https://rna-pysoforms.readthedocs.io/en/latest/_autosummary/RNApysoforms.shorten_gaps.html): Shortens intron and transcript start gaps between exons in genomic annotations to enhance visualization.\r\n\r\n- [to_intron()](https://rna-pysoforms.readthedocs.io/en/latest/_autosummary/RNApysoforms.to_intron.html): Converts exon coordinates into corresponding intron coordinates within a genomic annotation dataset.\r\n\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License.\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python package designed for visualizing RNA isoform structures and expression levels by leveraging Plotly for interactive plotting and Polars for efficient data manipulation, enabling the creation of fast-rendering, interactive plots.",
"version": "1.0.1",
"project_urls": {
"Homepage": "https://github.com/UK-SBCoA-EbbertLab/RNApysoforms"
},
"split_keywords": [
"plotly",
" rna isoforms",
" transcripts",
" ggtranscript",
" bioinformatics",
" genomics"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "a2cd5643c1ba26ef4ada8374acec01de260a73f7eddd5121f4f0f09348dc63d1",
"md5": "96499cb0245e375384e9e8b1c429c548",
"sha256": "c32778ecdd8b896c1e770040076e4957db0ca3b8197484c5dce950d5b407dd57"
},
"downloads": -1,
"filename": "RNApysoforms-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "96499cb0245e375384e9e8b1c429c548",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 38898,
"upload_time": "2025-02-11T01:01:57",
"upload_time_iso_8601": "2025-02-11T01:01:57.137136Z",
"url": "https://files.pythonhosted.org/packages/a2/cd/5643c1ba26ef4ada8374acec01de260a73f7eddd5121f4f0f09348dc63d1/RNApysoforms-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "862f71474c3e02305ac1079c0aa26c223ce9921626ad95085fe2b586621b571c",
"md5": "2017c5810a4352e6a6c0ff9438cc8b42",
"sha256": "6af73d2f142fff5983e5da4468a7f9e87c8a8fa9abbb48d0ce87df6ed9bfb957"
},
"downloads": -1,
"filename": "rnapysoforms-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "2017c5810a4352e6a6c0ff9438cc8b42",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 35302,
"upload_time": "2025-02-11T01:01:58",
"upload_time_iso_8601": "2025-02-11T01:01:58.878498Z",
"url": "https://files.pythonhosted.org/packages/86/2f/71474c3e02305ac1079c0aa26c223ce9921626ad95085fe2b586621b571c/rnapysoforms-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-11 01:01:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "UK-SBCoA-EbbertLab",
"github_project": "RNApysoforms",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "rnapysoforms"
}