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.
Project description
RNApysoforms
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, RNApyisoforms brings similar RNA visualization capabilities to the Python ecosystem, facilitating effective exploration and presentation of RNA sequencing data.
Installation
You can install RNApysoforms
using pip:
pip install RNApysoforms
Quick Start
More vignettes (usage examples)
Recaling introns for a prettier RNA isoform structure plot
Plotting RNA isoform structure and expression
Plotting RNA isoform structure and normalized expression
Test data and documentation
Function documentation and vignettes
Issues
Please go through the documentation and vignettes 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()
: Assigns exon numbers to exons, CDS, and introns within a genomic annotation dataset based on transcript structure and strand direction. -
gene_filtering()
: Filters genomic annotations and optionally an expression matrix for a specific gene, with options to order and select top expressed transcripts. -
make_plot()
: Creates a multi-panel Plotly figure combining transcript structure plots and expression data plots. -
make_traces()
: Generates Plotly traces for visualizing transcript structures and expression data. -
read_expression_matrix()
: Loads and processes an expression matrix, optionally merging with metadata, performing CPM normalization, and calculating relative transcript abundance. -
read_ensembl_gtf()
: Reads a GTF (Gene Transfer Format) file and returns the data as a Polars DataFrame. -
shorten_gaps()
: Shortens intron and transcript start gaps between exons in genomic annotations to enhance visualization. -
to_intron()
: Converts exon coordinates into corresponding intron coordinates within a genomic annotation dataset.
License
This project is licensed under the MIT License.
Project details
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 rnapysoforms-0.9.0.tar.gz
.
File metadata
- Download URL: rnapysoforms-0.9.0.tar.gz
- Upload date:
- Size: 34.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e1262a2e0099d6bb7cace6b9db74f04ad46409aa7c948888949f46e4e0a0949 |
|
MD5 | 5e0e4e432cf277003a708929b8bc7600 |
|
BLAKE2b-256 | 73e87f7a4c7bb95e41cd3fa7bababd22002fa787fb3e545d4751774d46a569e1 |
File details
Details for the file RNApysoforms-0.9.0-py3-none-any.whl
.
File metadata
- Download URL: RNApysoforms-0.9.0-py3-none-any.whl
- Upload date:
- Size: 38.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7a1bde8d12aeee0a30415647be21c50026cf07d582b6173a7ccf0e3c742de27 |
|
MD5 | d031fdd64722048209f8c4542187e04f |
|
BLAKE2b-256 | 7f190670fbaddcf1b5f6d6edfbb9b73bf4e4f9e0e1793bd11c935ec356249775 |