precellar.make_minimap2_index#
- precellar.make_minimap2_index(fasta, output_index, *, preset='map-ont')#
Create a minimap2 index from a FASTA file.
This function creates a
.mmiindex file that can be used with the MINIMAP2 aligner. The index is created with k-mer and window sizes optimized for the selected preset.- Parameters:
fasta (Path) – File path to the FASTA file containing reference sequences.
output_index (Path) – File path for the output minimap2 index (.mmi file).
preset (str) –
Optional preset to optimize index for specific read types: - Long Reads DNA Mapping:
’map-ont’: Oxford Nanopore reads (default)
’map-pb’: PacBio CLR reads
’map-hifi’: PacBio HiFi reads
’lr:hq’: Long reads, high quality
Spliced / RNA-seq Alignment: - ‘splice’: RNA-seq long reads - ‘splice:hq’: High-quality RNA-seq long reads - ‘splice:sr’: Short-read RNA-seq
Long Assembly to Reference Mapping: - ‘asm5’, ‘asm10’, ‘asm20’: Assembly alignment (5%, 10%, 20% divergence)
Short Reads Mapping: - ‘short’: Short single-end reads - ‘sr’: Short paired-end reads
All-vs-All Overlap Mapping: - ‘ava-pb’: PacBio all-vs-all overlap - ‘ava-ont’: ONT all-vs-all overlap
Examples
>>> from precellar import make_minimap2_index >>> make_minimap2_index("genome.fa", "genome.mmi", preset="map-ont") >>> # For RNA-seq >>> make_minimap2_index("transcriptome.fa", "transcriptome.mmi", preset="splice")
See also
aligners.MINIMAP2The aligner class that uses these indices
make_bwa_indexCreate BWA-MEM2 index for short reads