# RNApysoforms <img src="./assets/RNA-pysoforms-logo.png" align="right" height="80" />
<!-- badges: start -->
[![Run Tests](https://github.com/UK-SBCoA-EbbertLab/RNApysoforms/actions/workflows/main.yml/badge.svg)](https://github.com/UK-SBCoA-EbbertLab/RNApysoforms/actions/workflows/main.yml)
[![Codecov test coverage](https://codecov.io/gh/UK-SBCoA-EbbertLab/RNApysoforms/branch/main/graph/badge.svg)](https://app.codecov.io/gh/UK-SBCoA-EbbertLab/RNApysoforms?branch=main)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![GitHub issues](https://img.shields.io/github/issues/UK-SBCoA-EbbertLab/RNApysoforms)](https://github.com/UK-SBCoA-EbbertLab/RNApysoforms/issues)
[![GitHub pulls](https://img.shields.io/github/issues-pr/UK-SBCoA-EbbertLab/RNApysoforms)](https://github.com/UK-SBCoA-EbbertLab/RNApysoforms/pulls)
[![Documentation Status](https://readthedocs.org/projects/rna-pysoforms/badge/?version=latest)](https://rna-pysoforms.readthedocs.io/en/latest/?badge=latest)
[![DOI](https://zenodo.org/badge/863499343.svg)](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.
## 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/0.basic_usage.html)
## More vignettes (usage examples)
[Rescaling introns for a prettier RNA isoform structure plot](https://rna-pysoforms.readthedocs.io/en/latest/examples/01.rescaled_introns.html)
[Plotting RNA isoform structure and expression](https://rna-pysoforms.readthedocs.io/en/latest/examples/02.expression_plot.html)
[Plotting RNA isoform structure and normalized expression](https://rna-pysoforms.readthedocs.io/en/latest/examples/04.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/1d/58/bc85ccb5097371b0aa4ebc00208179f00375a2a80306d21818c0334b58ba/rnapysoforms-0.9.5.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[![Run Tests](https://github.com/UK-SBCoA-EbbertLab/RNApysoforms/actions/workflows/main.yml/badge.svg)](https://github.com/UK-SBCoA-EbbertLab/RNApysoforms/actions/workflows/main.yml)\r\n[![Codecov test coverage](https://codecov.io/gh/UK-SBCoA-EbbertLab/RNApysoforms/branch/main/graph/badge.svg)](https://app.codecov.io/gh/UK-SBCoA-EbbertLab/RNApysoforms?branch=main)\r\n[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)\r\n[![GitHub issues](https://img.shields.io/github/issues/UK-SBCoA-EbbertLab/RNApysoforms)](https://github.com/UK-SBCoA-EbbertLab/RNApysoforms/issues)\r\n[![GitHub pulls](https://img.shields.io/github/issues-pr/UK-SBCoA-EbbertLab/RNApysoforms)](https://github.com/UK-SBCoA-EbbertLab/RNApysoforms/pulls)\r\n[![Documentation Status](https://readthedocs.org/projects/rna-pysoforms/badge/?version=latest)](https://rna-pysoforms.readthedocs.io/en/latest/?badge=latest)\r\n[![DOI](https://zenodo.org/badge/863499343.svg)](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## 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/0.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/01.rescaled_introns.html)\r\n\r\n[Plotting RNA isoform structure and expression](https://rna-pysoforms.readthedocs.io/en/latest/examples/02.expression_plot.html)\r\n\r\n[Plotting RNA isoform structure and normalized expression](https://rna-pysoforms.readthedocs.io/en/latest/examples/04.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": "0.9.5",
"project_urls": {
"Homepage": "https://github.com/UK-SBCoA-EbbertLab/RNApysoforms"
},
"split_keywords": [
"plotly",
" rna isoforms",
" transcripts",
" ggtranscript",
" bioinformatics",
" genomics"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "566f04f9dfd0b080454193b3c24a286d37c7b9621cb3ce2d7d4afc05ea0681bc",
"md5": "1ecd96e80412d358c0870cd1f7f54de5",
"sha256": "6b335754fdc172cc871f7720c1befc9e1c0260ec79c349824d3c503551b7de5e"
},
"downloads": -1,
"filename": "RNApysoforms-0.9.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1ecd96e80412d358c0870cd1f7f54de5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 38214,
"upload_time": "2024-11-19T16:29:05",
"upload_time_iso_8601": "2024-11-19T16:29:05.459667Z",
"url": "https://files.pythonhosted.org/packages/56/6f/04f9dfd0b080454193b3c24a286d37c7b9621cb3ce2d7d4afc05ea0681bc/RNApysoforms-0.9.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1d58bc85ccb5097371b0aa4ebc00208179f00375a2a80306d21818c0334b58ba",
"md5": "55b7317a5b565465030ef8135b545fb3",
"sha256": "36f91fd046013ee96546e4a0224baff53de14c71c9d92044844d0042b351ea38"
},
"downloads": -1,
"filename": "rnapysoforms-0.9.5.tar.gz",
"has_sig": false,
"md5_digest": "55b7317a5b565465030ef8135b545fb3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 34576,
"upload_time": "2024-11-19T16:29:06",
"upload_time_iso_8601": "2024-11-19T16:29:06.487417Z",
"url": "https://files.pythonhosted.org/packages/1d/58/bc85ccb5097371b0aa4ebc00208179f00375a2a80306d21818c0334b58ba/rnapysoforms-0.9.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-19 16:29:06",
"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"
}