Skip to main content

kraut

Run Pytest GitHub Release PyPI - Downloads Conda Downloads GitHub commit activity License: MIT

Kraut logo

A python package for parsing, merging, and analyzing Kraken2 output files.

Installation

From PyPI:

pip install krautils

From a local checkout:

pip install .

For developer's dependencies:

pip install .[dev]
pytest

Command

kraut parses, filters, merges, tabulates, splits, and plots Kraken2 reports.

  • single-report: filter or reformat one Kraken report.
  • make-table: build a configurable multi-sample abundance table.
  • make-mpa-table: merge MetaPhlAn profiles into a multi-sample abundance table.
  • table-summary: summarize a table produced by make-table.
  • ma-export: export reports for MicrobiomeAnalyst as counts, taxonomy, metadata, and tree files.
  • alpha: calculate alpha diversity from Kraken or Bracken reports.
  • beta: calculate beta diversity distance matrices and heatmap/PCA plots.
  • dendrogram: plot hierarchical clustering dendrograms from beta distances.
  • split-combine-table: split a KrakenTools combined table into ALL/LVL tables.
  • plot-single: plot one sample as an HTML or static composition chart.
  • plot-multi: plot multiple samples as an HTML or static stacked/bubble chart.
kraut alpha reports/*.tsv -o alpha.tsv -p alpha.html --metrics core --add-metrics chao1,ace
kraut beta reports/*.tsv -o beta.tsv --plot beta.html --pca beta_pca.html
kraut dendrogram reports/*.tsv -o dendrogram.html --distance braycurtis --clustering ward
kraut ma-export reports/*.tsv -o microbiomeanalyst --metadata metadata.tsv --metadata-sample-col Sample
kraut make-mpa-table profiles/*_profile.tsv -o metaphlan_species.tsv --keep-taxid --drop-unclassified --normalise

ma-export writes counts.csv, taxonomy.csv, metadata.csv, and tree.nwk. It uses taxon-specific counts by default (--metric LVL); use --metric TOT for cumulative clade counts.

Example plots:

Kraut Multi

Kraut Single

License

This project is licensed under the MIT License. See LICENSE.

Metadata

Release files for krautils 0.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for krautils 0.7.1
File Size Uploaded Provenance
krautils-0.7.1.tar.gz 57.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for krautils 0.7.1
File Interpreter ABI Platform
krautils-0.7.1-py3-none-any.whl Python 3 none any Details

Total release size: 112.2 kB

Release files / krautils-0.7.1.tar.gz

Download URL krautils-0.7.1.tar.gz
Size 57.5 kB
Tags Source
SHA-256 checksum
How to use checksums
eabd47dde6f2d65782c189a6cded4fac73d72635f3cb7fb18195fc0886d257d7
BLAKE2b-256 checksum
How to use checksums
5105fe2056dd0ad6186f77fc76e122a509e3ee8426ff0beb97798edba916c36e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release files / krautils-0.7.1-py3-none-any.whl

Download URL krautils-0.7.1-py3-none-any.whl
Size 54.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fe101b6e07d49dd4adc84609047e5fa65b1843e7a50648cef9a0d1ccae96d836
BLAKE2b-256 checksum
How to use checksums
6dd4bd0cc25844be35aec03115bba116a9b8529ea75ff7dabb2ec761e1e945a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Security for krautils 0.7.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for krautils-0.7.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page