Skip to main content

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

Run Tests Codecov test coverage Lifecycle: experimental GitHub issues GitHub pulls Documentation Status

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, RNApysoforms 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

Basic usage (quick start)

More vignettes (usage examples)

Rescaling 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

Download small test dataset

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 Plotly figure panel for transcript structure plots and/or 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 an ENSEMBL 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

rnapysoforms-0.9.2.tar.gz (34.6 kB view details)

Uploaded Source

Built Distribution

RNApysoforms-0.9.2-py3-none-any.whl (38.2 kB view details)

Uploaded Python 3

File details

Details for the file rnapysoforms-0.9.2.tar.gz.

File metadata

  • Download URL: rnapysoforms-0.9.2.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

Hashes for rnapysoforms-0.9.2.tar.gz
Algorithm Hash digest
SHA256 216e671c2266a7f3f7033f2c668ff065e6e233a9484733e1feb9e0f445a80eda
MD5 bb661929f2b891377fb9200c5e0b93eb
BLAKE2b-256 2a9b7271fe52307fee4d49bf9291e14d033e636d558f5a1b5a3833f6943281d1

See more details on using hashes here.

File details

Details for the file RNApysoforms-0.9.2-py3-none-any.whl.

File metadata

File hashes

Hashes for RNApysoforms-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 779e1895714400aa1fdd4acbe7c85e20f8022544fb840b43a619ee872b2d7b7b
MD5 161df9749ae474e79400df8188039c0e
BLAKE2b-256 84f493e474821df92f72bd1c23130159dfac91469001b5db0bf507e8000760f2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page