Skip to main content

PEP8 PyPI Status Python Version License

ScanExitronLR

A computational workflow for exitron splicing identification in long-read RNA-seq data.

Installation

The recommended way to install ScanExitronLR is using pip:

$ pip install scanexitronlr

This will pull and install the latest stable release from PyPi. ScanExitronLR requires Python 3.7+. Thus you need to make sure that the pip is for python3 using e.g. which pip or using:

$ pip3 install scanexitronlr

To test your installation, run:

$ selr

You should see the version number, usage instructions and commands. (If you prefer a more descriptive command scanexitronlr also works.)

NOTE: ScanExitronLR uses the LIQA package to infer exitron specific transcript abundance. Currently, LIQA sometimes crashes with newest versions of the lifelines package. To avoid this, install version v0.26.4 of lifelines with conda install lifelines=v0.26.4.

Usage

ScanExitronLR has two modes, extract and annotate. Use extract when calling exitrons in an alignment and annotate when annotating exitrons called using extract.

Extract

extract requires three inputs: (1) a BAM alignment file of long-reads containing the ts:A flag (provided by default by Minimap2), (2) a reference genome and (3) a sorted and bgzip'd gene annotation file. Currently only gtf files are supported. We suggest using the --junc-bed parameter in minimap2 for more accurate spliced alignments. Without the parameter, it may be harder to distinguish unannoted exitron splicing events from annotated splicing events.

To sort your gtf file, use the command:

$ awk '$1 ~ /^#/ {print $0;next} {print $0 | "sort -k1,1 -k4,4n -k5,5n"}' in.gtf > out_sorted.gtf

To bgzip your gene annotation file, use:

$ bgzip in.gtf

bgzip is part of the htslib, which you most likely already have installed if you care about BAM files. Otherwise, you can get it here. It is important to note that if you download the latest GENCODE release it will be in the gzip form, not bgzip. You will need to run gzip -d and then bgzip.

ScanExitronLR utilizes the gffutils package, which requires an SQL-lite database of the annotation file. You do not need to provide such a file, as ScanExitronLR will create one if one is not found, though it may take ~20 minutes to build. It will be saved as your_annotation.gtf.gz.db in the same location as your annotation and will not need to be built again. In addition, we require a tabix index, and it will be created if one is not found. This should only take seconds. It will be saved as your_annotation.gtf.gz.tbi.

Thus, if you are running ScanExitronLR on a shared server and using a shared annotation database, you may not have writing privelages in the shared space. You will need to copy your annotation file to your local directory.

We have provided fully processed GTF files for Gencode V39 and TAIR10 for your convenience.

To run ScanExitronLR in extract mode, simply run

$ selr extract ...

with the following parameters:

Parameter Description
-i STR REQUIRED: Input BAM file
-g STR REQUIRED: Input genome reference (e.g. hg38.fa)
-r STR REQUIRED: Input sorted and bgzip'd annotation reference (e.g. gencode_v38_sorted.gtf.gz).
-o STR Output filename (e.g. bam_filename.exitron <- this is default)
-a/--ao INT Reports only exitrons with AO (# of supporting reads) of INT or above (default: 2).
-p/--pso FLOAT Reports only exitrons with PSO of FLOAT or above (default: 0.01).
-c/--cores INT Use INT cores (default: 1). Use as many as you can spare. Even large BAM files only use at most 4GB total memory on 10 cores.
-cp/--cluster-purity FLOAT Reports only exitrons with cluster purity of FLOAT or above (default: 0).
-m/--mapq INT Only considers reads with mapq score >= INT (default: 50)
-j/--jitter INT Treat splice-sites with fuzzy boundry of +/- INT (default: 10).
-sr Use this flag to skip the realignment step.
-sa Use this flag to save isoform abundance files for downstream differential isoform usage analysis with LIQA. Files are of the form: input.isoform.exitrons, input.isoform.normals (See example page)

We provide some functionality to perform exitron differential isoform usage with the -sa flag. See here for an example.

Choosing Filtering Parameters

ScanExitronLR filters exitron splicing events based on AO (-a/--ao), PSO (-p/--pso) and cluster purity (-cp/--cluster-purity):

AO. By default, ScanExitronLR only reports exitrons with at least two supporting reads (AO >= 2). This is filter out random sequencing errors that may lead to a faulty alignment and false splicing event. However, if the coverage is particularly low, you may need to set the AO threshold to 1 in order to detect exitrons in medium and lower expressed genes.

PSO. By default, ScanExitronLR only reports exitrons with a splicing frequence (PSO) above 1%. Splicing events below this frequency may not be biologically relevant or may just be due to splicing noise. Setting PSO filtering to 0% is not recommended because it will increase running time and report many low quality splicing events.

Cluster Purity. By default, ScanExitronLR does not filter by cluster purity. However, cluster purity is important for having high confidence the the reported splice sites. For example, if the cluster purity is 90%, then 90% of the exitron spliced reads have the reported splice sites. Thus, one ought to be cautious when investigating exitrons with cluster purities below 50%. There is an exitron splicing event being detected, but it is unclear where the exact splice sites occur. This can happen if the reads are particularly noisy or are aligned to a repetitive region.

Annotate

To run ScanExitronLR in annotate mode, simply run

$ selr annotate ...

with the following parameters:

parameters Description
-i STR REQUIRED: Input exitron file, generated from selr extract
-g STR REQUIRED: Input genome reference (e.g. hg38.fa)
-r STR REQUIRED: Input sorted and _ gzip'd_ annotation reference (e.g. gencode_v38_sorted.gtf.gz).
-o STR Output filename (e.g. bam_filename.exitron.annotation <- this is default)
-b/--bam-file STR If specified, annotation includes read supported NMD status directly from alignments.
-arabidopsis Use this flag if using alignments from Arabidopsis. See github page for annotation file/genome assumptions.

The output is a tab-separated file with the following columns:

Column Description
chrom Chromosome name
start Exitron start
end Exitron end
name Unique exitron identifier
region Exitron region
ao # of supporting reads
strand Gene strand
gene_name Gene name from annotation
gene_id Gene ID from annotation
length Exitron legnth
splice_site Exitron splice sites (G[T/C]-AG, AT-AC)
transcript_id Transcript ID from annotation
pso Exitron percent spliced out value
dp Total depth at exitron position (PSO = AO/DP)
cluster_purity Exitron cluster purity
exitron_prot_position Position in amino acid sequence of exitron splicing event
type Exitron type (frameshift/truncation/truncation+substitution)
substitution If from substitution type, determines which amino acid substitution occured
nmd_status_predicted If frameshift type, determines if a downstream stop codon is 50 nt upstream of splicing junction
nmd_status_percentage If frameshift type, reports percentage of reads that directly support a stop codon 50 nt upstream of splicing junction
downstream_inframe_AUG If frameshift type, reports whether there is a downstream AUG, usually attenuating NMD efficiency
start_proximal_PTC If frameshift type, reports whether premature stop codon is within 200 nt of start codon, usually attenuating NMD efficiency
prot_domains Any PFAM domains that are disrupted by the exitron splicing
reads Name of all reads which are exitron spliced

ScanExitronLR may assign transcript abundance to multiple annotated transcripts. If this is the case, each transcript will get an annotation. Thus, if an exitron is associated with two transcripts, there will be two rows in the annotation output, one for each transcript.

Example

See here for an example.

Contact

Please feel free to post any issues here on github.

Citation

@article{Fry_ScanExitronLR_characterization_and_2022,
author = {Fry, Joshua P and Li, Yang Yang and Yang, Ren Dong},
doi = {10.1101/2022.03.25.485864},
journal = {bioRxiv},
month = {3},
number = {1},
pages = {1--7},
title = {{ScanExitronLR: characterization and quantification of exitron splicing events in long-read RNA-seq data}},
volume = {1},
year = {2022}
}

Metadata

Release files for scanexitronlr 1.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scanexitronlr 1.1.9
File Size Uploaded Provenance Actions
scanexitronlr-1.1.9.tar.gz 1.8 MB Without provenance Details for scanexitronlr-1.1.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scanexitronlr 1.1.9
File Interpreter ABI Platform Actions
scanexitronlr-1.1.9-py3-none-any.whl Python 3 none any Details for scanexitronlr-1.1.9-py3-none-any.whl

Total release size: 3.6 MB

Release files / scanexitronlr-1.1.9.tar.gz

Download URL scanexitronlr-1.1.9.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
fe9ef2a1925aa707bca34914731987a74eba240a8e5e39f475fefdf4ef003102
BLAKE2b-256 checksum
How to use checksums
fe28c817f1f08741cee85c4f18e2b9a75c6955a66cf09b002cf9fdafe07ef1d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.62.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5

Release files / scanexitronlr-1.1.9-py3-none-any.whl

Download URL scanexitronlr-1.1.9-py3-none-any.whl
Size 1.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
8c0dd984de881c5aa08eb962386eb574850fc874662d88ffee07461ad186270a
BLAKE2b-256 checksum
How to use checksums
72839de51fc2d9931279896ba3a09bd1ddf7c07f87a2bfbc34f32b095800f683
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.62.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5

Security for scanexitronlr 1.1.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page