Crates.io | klassify |
lib.rs | klassify |
version | 0.1.4 |
source | src |
created_at | 2024-07-31 00:46:51.352755 |
updated_at | 2024-08-18 04:05:21.864794 |
description | Classify chimeric reads based on unique kmer contents |
homepage | |
repository | |
max_upload_size | |
id | 1320486 |
size | 627,155 |
Classify chimeric reads based on unique kmer contents and identify the breakpoint locations.
The breakpoints can be due to:
While there are many tools that can identify structural variations, this tool is designed to compare progeny (e.g. F1) reads to the parental genome. The key idea is an extension to the trio binning approach, where we use the unique kmers from each chromosome/contig of the parental genomes to classify the reads that bridge two different chromosomes/contigs.
Following are examples of recominant reads identified by this tool:
cargo install klassify
Suppose you have 3 input files:
parents.genome.fa
: the parental genomesf1_reads.fa
: the progeny readsparent_reads.fa
: the parental readsmkdir ref
faSplit byname parents.genome.fa ref/
klassify build ref/*.fa -o kmers.bc
This generates an index for all the unique kmers (present in a single contig/chromosome).
mkdir f1_reads f1_classify
faSplit about f1_reads.fa 2000000000 f1_reads/
klassify classify kmers.bc f1_reads/*.fa -o f1_classify
klassify extract f1_classify.filtered.tsv f1_reads/*.fa -o f1_classify.fa
minimap2 -t 80 -ax map-hifi --eqx --secondary=no parents.genome.fa f1_classify.fa \
--split-prefix f1_classify | samtools sort -@ 8 -o f1_classify.bam
mkdir parent_reads parent_classify
faSplit about parent_reads.fa 2000000000 parent_reads/
klassify classify kmers.bc parent_reads/*.fa -o parent_classify
klassify extract parent_classify.filtered.tsv parent_reads/*.fa -o parent_classify.fa
minimap2 -t 80 -ax map-hifi --eqx --secondary=no parents.genome.fa parent_classify.fa \
--split-prefix parent_classify | samtools sort -@ 8 -o parent_classify.bam
klassify regions f1_classify.bam parent_classify.bam
That's it! The breakpoint locations in the parental genomes are in
f1_classify.regions.tsv
, where column 2 has the depth within each 10kb bin
around the breakpoint:
SoChr01A:118800000-118810000 10
SoChr01B:43130000-43150000 8,12