For RNA-seq data, use splice-aware presets. By default, -x splice assumes unknown read orientation and performs two rounds of alignment to infer it.
Presets and Options
splice:hq: For PacBio Iso-seq or traditional cDNA. Use -uf to force forward strand consideration.splice: For Nanopore 2D cDNA-seq.splice with -uf -k14: For Nanopore Direct RNA-seq (smaller k-mer increases sensitivity).--splice-flank=no: Use when mapping against SIRV control data to ignore non-conservative splicing signals.-N: Tune the number of secondary alignments (default is 5).-G: Set max intron length (default 200k). Avoid excessively large values.
Using Gene Annotations
You can prioritize annotated splice junctions using --junc-bed. This requires a BED file (e.g., generated via paftools.js gff2bed).
# PacBio Iso-seq
minimap2 -ax splice:hq -uf ref.fa iso-seq.fq > aln.sam
# Nanopore 2D cDNA-seq
minimap2 -ax splice ref.fa nanopore-cdna.fa > aln.sam
# Nanopore Direct RNA-seq
minimap2 -ax splice -uf -k14 ref.fa direct-rna.fq > aln.sam
# Using annotations (requires BED file)
paftools.js gff2bed anno.gff > anno.bed
minimap2 -ax splice --junc-bed anno.bed ref.fa query.fa > aln.sam