An addicting set of Kraken-enhancing tools.
Install with mamba, conda, or run directly with pixi:
pixi exec \
-c conda-forge -c bioconda \
krak --helpThis project provides tools for integrating Kraken and Kraken2 taxonomic classifications into FASTX (FASTQ or FASTA), SAM, BAM, and CRAM workflows.
Kraken creates k-mer-based taxonomic labels from genomic sequences such as single-end or paired-end sequencing reads.
krak bridges the gap between genomic sequences stored in alignment files and their taxonomic classifications so that you can filter, rescue, or otherwise act on the classification of each genomic sequence.
All subcommands support both Kraken v1 and Kraken v2 output formats.
Classify, annotate, and filter a queryname-grouped BAM:
krak annotate \
-i input.bam \
-d /kraken-db \
-a <(krak prep input.bam | kraken2 --db /kraken-db --output - -) \
| krak filter -t 9606 -o output.bamkrak prep: for preparing FASTA/FASTQ/SAM/BAM/CRAM for Kraken inputkrak annotate: annotates SAM/BAM/CRAM records with Kraken classificationskrak n2ref: converts aligned Ns to reference baseskrak filter: filters a FASTA/FASTQ/SAM/BAM/CRAM based on Kraken outputkrak report2tsv: converts a Kraken report to a tab-separated text file
See the contributing guide for more information.
