mmistat

Version, currently 0.1.01 version
  • 0.1.0latestJun 8, 2025

github.com/bio-cr/mmistat

minimap2 index file (.mmi) statistics

0 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  mmistat:
    github: bio-cr/mmistat
    version: ~> 0.1.0

Then run:

shards install

shard.yml

Crystal
no constraint declared
License
MIT
Author
kojix2
Target
  • mmistat from mmistat.cr

Dependencies

This version declares no dependencies.

README

mmistat

minimap2 index file (.mmi) statistics

build test

Usage

Create a minimap2 index file with the -d option:

# For Oxford Nanopore reads
minimap2 -x map-ont -d MT-human-ont.mmi test/MT-human.fa
# For PacBio reads
minimap2 -x map-pb  -d MT-human-pb.mmi  test/MT-human.fa

Then run mmistat on the map-ont index file:

mmistat MT-human-ont.mmi
Magic number (raw): "MMI\u0002"
MMI Header:
  k-mer size: 15
  Seed width: 10
  Bucket bits: 14
  Number of sequences: 1
  Flags: 0x0

Sequences:
  Idx   Name    Length
  [1]   MT_human        16569

Run mmistat on the map-pb index file:

mmistat MT-human-pb.mmi
Magic number (raw): "MMI\u0002"
MMI Header:
  k-mer size: 19
  Seed width: 10
  Bucket bits: 14
  Number of sequences: 1
  Flags: 0x1

Sequences:
  Idx   Name    Length
  [1]   MT_human        16569

You can see that the k-mer size differs between the two index files.

The output also shows the names and lengths of the chromosomes.

This allows you to verify that the index file is as expected.

Build

Crystal version

The Crystal version is faster because it only parses the header.

It is expected to output the same results as the C version.

crystal build mmistat.cr

C version (for testing)

The C version is reliable because it uses minimap2 as a library.

make

License

MIT

The project includes code generated by AI.