SNAPPER: BAM/SAM/CRAM Intron adjustment guided by reference intron positions.
Introduction
SNAPPER is a method designed to adjust introns in spliced alignments to best match their reference transcriptomic positions. Aligners such as minimap2 are built to only consider guide annotations on the genome to which sequences are being aligned to. However, in case of transcript alignments where sequences have often been extracted from the reference genome using an annotation, there is an additional unused prior in the form of reference exon boundaries in the sequences themselves. it is only logical to use this prior information to guide the alignment, alas such functionality is not present in most aligners. To circumvent this issue, SNAPPER was developed to adjust the intron positions in the alignment to best match the reference transcriptomic positions. The method reconstructs the alignment DP matrix, augments it with weights for reference intron positions and performs a traceback penalizing mismatches with respect to the original alignment and prioritizing intron positions from the reference annotation. The result is a more consistent alignment especially when it comes to alignment between poorly conserved genomes.
Publications
Coming soon...
Documentation
Installation
Via PyPI
The easiest way to install SNAPPER is through PyPI:
$ pip install snapper-av
$ snapper --help
To uninstall SNAPPER:
$ pip uninstall snapper-av
Building from source
To build from source, clone the git repository:
$ git clone https://github.com/alevar/snapper.git --recursive
$ cd snapper
$ pip install -r requirements.txt
$ pip install .
Requirements
| Requirement | Details |
|---|---|
| Language support | Python ≥ 3.6 |
| Dependencies | - |
Getting started
Usage
snapper [-h] -s SAM -r REFERENCE [-o OUTPUT] [--qry_intron_match_score QRY_INTRON_MATCH_SCORE]
[--trg_pos_match_score TRG_POS_MATCH_SCORE] [--trg_pos_mismatch_score TRG_POS_MISMATCH_SCORE]
Options
| Option | Description |
|---|---|
-s, --sam |
Path to the SAM/BAM alignment file. Read names in the alignment are expected to match corresponding transcript_id in the reference annotationPath to the query GTF/GFF annotation file. |
-r, --reference |
Path to the reference annotation. transcript_id field is expected to match read names in the sam alignment. |
-o, --output |
Path to the output SAM/BAM file. |
--qry_intron_match_score |
Score for matching query introns. |
--trg_pos_match_score |
Score for matching target positions. |
--trg_pos_mismatch_score |
Score for mismatching target positions. |
Help Options
| Option | Description |
|---|---|
-h, --help |
Prints help message. |
Example Data
Sample datasets are provided in the "example" directory to test and get familiar with SNAPPER.
The included example can be run with the following command from the root directory of the repository:
snapper --sam example/example.gtf --reference example/example.gtf --output example/output.sam
Release files for snapper-av 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| snapper_av-1.0.2.tar.gz | 41.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| snapper_av-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 83.2 kB
Release files / snapper_av-1.0.2.tar.gz
| Download URL | snapper_av-1.0.2.tar.gz |
|---|---|
| Size | 41.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e52d6d5a0972a1dd325e1f366d5fe70cafa21ec66f8c752add38f9363ddaad61
|
|
BLAKE2b-256 checksum How to use checksums |
bf81fd3126f5f8c7692ecfbc47f7617d63145a868e744077c1f1568415076004
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.6
|
Release files / snapper_av-1.0.2-py3-none-any.whl
| Download URL | snapper_av-1.0.2-py3-none-any.whl |
|---|---|
| Size | 42.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2e9952551c5243e980dcf2cf3a2e0bf966d5489add74ab02022258701ecbe4c5
|
|
BLAKE2b-256 checksum How to use checksums |
e7933d7e803e761a0eae253ae01092b76346dc680f177f0e9d0e364914d02add
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.6
|