https://github.com/animesh/miniprot
Align proteins to genomes with splicing and frameshift
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: arxiv.org, pubmed.ncbi, ncbi.nlm.nih.gov -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.7%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
Align proteins to genomes with splicing and frameshift
Basic Info
- Host: GitHub
- Owner: animesh
- License: mit
- Default Branch: master
- Homepage: https://lh3.github.io/miniprot/
- Size: 294 KB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Fork of lh3/miniprot
Created over 3 years ago
· Last pushed over 3 years ago
https://github.com/animesh/miniprot/blob/master/
[](https://github.com/lh3/miniprot/releases) [](https://anaconda.org/bioconda/miniprot) [](https://github.com/lh3/miniprot/actions) ## Getting Started ```sh # download and compile git clone https://github.com/lh3/miniprot cd miniprot && make # test file ./miniprot test/DPP3-hs.gen.fa.gz test/DPP3-mm.pep.fa.gz > aln.paf # PAF output ./miniprot --gff test/DPP3-hs.gen.fa.gz test/DPP3-mm.pep.fa.gz > aln.gff # GFF3+PAF output # general command line: index and align in one go (-I sets max intron size based on genome size) ./miniprot -Iut16 --gff genome.fna protein.faa > aln.gff # general command line: index first and then align (recommended) ./miniprot -t16 -d genome.mpi genome.fna ./miniprot -Iut16 --gff genome.mpi protein.faa > aln.gff # output format man ./miniprot.1 ``` ## Table of Contents - [Getting Started](#started) - [Introduction](#intro) - [Users' Guide](#uguide) - [Installation](#install) - [Usage](#usage) - [Algorithm overview](#algo) - [Citing miniprot](#cite) - [Limitations](#limit) ## Introduction Miniprot aligns a protein sequence against a genome with affine gap penalty, splicing and frameshift. It is primarily intended for annotating protein-coding genes in a new species using known genes from other species. Miniprot is similar to [GeneWise][genewise] and [Exonerate][exonerate] in functionality but it can map proteins to whole genomes and is much faster at the residue alignment step. Miniprot is not optimized for mapping distant homologs because distant homologs are less informative to gene annotations. Nonetheless, it is still possible to tune seeding parameters to achieve higher sensitivity at the cost of performance. ## Users' Guide ### Installation Miniprot requires SSE2 or NEON instructions and only works on x86\_64 or ARM CPUs. It depends on [zlib][zlib] for parsing gzip'd input files. To compile miniprot, type `make` in the source code directory. This will produce a standalone executable `miniprot`. This executable is all you need to invoke miniprot. For some unknown reason, the default gcc-4.8.5 on CentOS 7 may compile a binary that is very slow on certain sequences but gcc-10.3.0 has more stable performance. If possible, use a more recent gcc to compile miniprot. ### Usage To run miniprot, use ```sh miniprot -t8 ref-file protein.faa > output.paf ``` where `ref-file` can either be a genome in the FASTA format or a pre-built index generated by ```sh miniprot -t8 -d ref.mpi ref.fna ``` Because miniprot indexing is slow and memory intensive, it is recommended to pre-build the index. FASTA input files can be optionally compressed with gzip. Miniprot outputs alignment in the protein PAF format. Different from the more common nucleotide PAF format, miniprot uses more CIGAR operators to encode introns and frameshifts. Please refer to the [manpage][manpage] for detailed explanation. For convenience, miniprot can also output GFF3 with option `--gff`: ```sh miniprot -t8 --gff -d ref.mpi ref.fna > out.gff ``` The detailed alignment is embedded in `##PAF` lines in the GFF3 output. You can also get detailed residue alignment with `--aln`. If you are aligning proteins to a whole genome, it is recommended to add option `-I` to let miniprot automatically set the maximum intron size. You can also use `-G` to explicitly specify the max intron size. ### Algorithm overview 1. Translate the reference genome to amino acids in six phases and filter out ORFs shorter than 45bp. Reduce 20 amino acids to 13 distinct integers and extract random open syncmers of 6aa in length. By default, miniprot selects 20% of 6-mers in average. For a reduced 6-mer at reference position `x`, keep the 6-mer and `floor(x/256)` in a dense hash table. This concludes the indexing step. 2. Given a protein sequence as query, extract 6-mer syncmers on the protein, look up the index for seed matches and apply minimap2-like chaining. This first round of chaining is approximate as the reference positions have been binned during indexing. 3. For each chain in step 2, redo seeding and chaining with sliding 5-mers from both the reference and the protein in the original chain. Miniprot uses all reduced 5-mers for this second round of chaining. 4. Choose top 100 (see `-N`) chains. Filter out anchors around potential introns or long gaps. Perform striped dynamic programming between remaining anchors and also extend from the first or last anchors. This gives the final alignment. ### Citing miniprot If you use miniprot, please cite: > Li, H. (2023) Protein-to-genome alignment with miniprot. *Bioinformatics*, **39**, btad014 [[PMID: 36648328]][mp-pmid]. The preprint is available at [arXiv:2210.08052](https://arxiv.org/abs/2210.08052), which additionally shows metrics on MetaEuk. Please note that the published paper evaluated miniprot-0.7. The latest version may report different numbers. ## Limitations * The initial conditions of dynamic programming are not technically correct, which may result in suboptimal residue alignment in rare cases. * Support for non-splicing alignment needs to be improved. * More manual inspection required for improved accuracy. For example, tandem copies in segmental duplications could be handled more carefully. [exonerate]: https://pubmed.ncbi.nlm.nih.gov/15713233/ [genewise]: https://pubmed.ncbi.nlm.nih.gov/15123596/ [mp-pmid]: https://pubmed.ncbi.nlm.nih.gov/36648328/ [zlib]: https://zlib.net [paftools]: https://github.com/lh3/minimap2/blob/master/misc/paftools.js [minimap2]: https://github.com/lh3/minimap2 [spaln]: https://github.com/ogotoh/spaln [spaln2]: https://pubmed.ncbi.nlm.nih.gov/22848105/ [manpage]: https://lh3.github.io/miniprot/miniprot.html
Owner
- Name: Ani
- Login: animesh
- Kind: user
- Location: Norway
- Company: Norwegian University of Science and Technology
- Website: https://www.fuzzylife.org
- Twitter: animesh1977
- Repositories: 749
- Profile: https://github.com/animesh
A medical graduate from Delhi University with post-graduation in bioinformatics from Jawaharlal Nehru University, India.