Updated Oct 19, 2026

Utilities

Align reads or assemblies to a local reference

minimap2-align is a reference-alignment node returning native minimap2 PAF or SAM.

Agent

overview

What minimap2-align does

Align long or short reads (or assemblies) to a reference with minimap2 using a named preset (map-ont, map-pb, map-hifi, sr, splice, asm5/10/20). Returns native PAF with CIGAR, or SAM.

Build a reference index on the fly and align with minimap2 2.31 on two threads. The default output is native PAF with CIGAR via -c; format sam returns unsorted SAM with a header. Unmapped reads are absent from PAF and flagged in SAM.

The source folder holds reference and query FASTA/FASTQ files, optionally gzipped, up to 8 GiB each. Presets are map-ont, map-pb, map-hifi, lr:hq, sr, splice, asm5, asm10 and asm20; map-ont is default. No other native flags are exposed. A report containing no parsed query sequences fails the task, and failures leave no partial artifact. Native execution has a two-hour timeout.

Packaged version: 2.31. Upstream license: MIT.

source github.com/lh3/minimap2/tree/3c28777e7e2dcc90f825de1b9f17a89cca7d4452

use cases

Where minimap2-align fits

Align long reads

Choose a long-read preset for a supplied reference and queries.

Request SAM output

Return an unsorted SAM header and records for downstream processing.

Compare an assembly to a reference

Select an asm preset instead of the default read preset.

reference

minimap2-align inputs and flags

5 inputs
NameTypeFlagDescription
sourceFOLDER--sourceFolder holding the reference FASTA and the reads FASTA/FASTQ (optionally .gz; each at most 8 GiB).
referenceSTRING--referencePath of the reference FASTA inside the folder.
readsSTRING--readsPath of the reads (or query assembly) FASTA/FASTQ inside the folder.
presetSTRING--presetmap-ont (default), map-pb, map-hifi, lr:hq, sr, splice, asm5, asm10 or asm20.
formatSTRING--formatpaf (default, with CIGAR via -c) or sam.

Showing key inputs. minimap2-align exposes 5 inputs in total.

example

Run minimap2-align

minimap2-align · command
python3 /app/run.py --source ./source --reference ref.fa --reads reads.fq --preset map-ont ./output

guidance

Choosing minimap2-align

Use minimap2-align for alignment records with a deliberate preset. Sorting, BAM conversion and indexing are downstream jobs. Kallisto estimates transcript abundance instead of producing these reference alignment records; FASTQ trimming and interval arithmetic serve other steps. MAFFT builds a multiple-sequence alignment rather than these reference mappings.

faq

minimap2-align questions

source: Folder holding the reference FASTA and the reads FASTA/FASTQ (optionally .gz; each at most 8 GiB). reference: Path of the reference FASTA inside the folder. reads: Path of the reads (or query assembly) FASTA/FASTQ inside the folder. preset: map-ont (default), map-pb, map-hifi, lr:hq, sr, splice, asm5, asm10 or asm20. format: paf (default, with CIGAR via -c) or sam.

Build a reference index on the fly and align with minimap2 2.31 on two threads. The default output is native PAF with CIGAR via -c; format sam returns unsorted SAM with a header. Unmapped reads are absent from PAF and flagged in SAM.

The source folder holds reference and query FASTA/FASTQ files, optionally gzipped, up to 8 GiB each. Presets are map-ont, map-pb, map-hifi, lr:hq, sr, splice, asm5, asm10 and asm20; map-ont is default. No other native flags are exposed. A report containing no parsed query sequences fails the task, and failures leave no partial artifact. Native execution has a two-hour timeout.

Use minimap2-align for alignment records with a deliberate preset. Sorting, BAM conversion and indexing are downstream jobs. Kallisto estimates transcript abundance instead of producing these reference alignment records; FASTQ trimming and interval arithmetic serve other steps. MAFFT builds a multiple-sequence alignment rather than these reference mappings.

The public image repository gives immutable image and ORAS download commands, the expected source/notices bundle checksum and pinned upstream source directions. The accompanying OCI bundle retains the original build recipe, runtime sources and full installed notices. The Git recipe keeps primary notices and an exact layer/hash index; it does not duplicate the full installed notice tree or mirror every upstream source archive. Image, source and license notice downloads.

Run minimap2-align yourself

The saved seeded fixture verifier confirmed fwd1 and rev1 alignments on opposite strands, both MAPQ 60, with the unrelated noise read absent from PAF. This summarizes saved assertions; the complete native PAF was not retained. The command shows the container entrypoint with example paths.

Facts on this page come from the live Trickest tool library.