Skip to main content

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

Project description

kraut

Run Pytest GitHub Release PyPI - 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.
  • 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

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

krautils-0.6.0.tar.gz (52.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

krautils-0.6.0-py3-none-any.whl (51.2 kB view details)

Uploaded Python 3

File details

Details for the file krautils-0.6.0.tar.gz.

File metadata

  • Download URL: krautils-0.6.0.tar.gz
  • Upload date:
  • Size: 52.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for krautils-0.6.0.tar.gz
Algorithm Hash digest
SHA256 5f9ef8150a351881aebfcfb34facaefa01c40bf0a7daa5d54027713b14cea723
MD5 18d4286103992b53872beb4fdfc7a13f
BLAKE2b-256 f181c27c88853ac03c76556e0c8a80d28f0b32cba35df39a0092190f201b38f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for krautils-0.6.0.tar.gz:

Publisher: publish.yml on quadram-institute-bioscience/kraut

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file krautils-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: krautils-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 51.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for krautils-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 89cbdf6c0f296a1f9f5aa71972a8caef5ba690ee04523953789c09bb095d7195
MD5 b0a4ebe0bdaaa7c1385dae258a2d011e
BLAKE2b-256 a959efa52e6a85e2049391f76d73f0f919db0b4d4a8c72db7e1ba80d569732d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for krautils-0.6.0-py3-none-any.whl:

Publisher: publish.yml on quadram-institute-bioscience/kraut

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page