8 releases
0.2.4 | Apr 6, 2023 |
---|---|
0.2.3 | Feb 20, 2023 |
0.1.2 | Feb 10, 2023 |
#55 in Biology
55 downloads per month
140KB
2.5K
SLoC
Split K-mer Analysis (version 2) 
Installation
Choose from:
- Download a binary from the releases.
- Use
cargo install ska
orcargo add ska
. - Use
conda install -c bioconda ska2
(note the two!). - Build from source
For 2) or 4) you must have the rust toolchain installed.
OS X users
If you have an M1/M2 (arm64) Mac, we aren't currently automatically building binaries, so would recommend either option 2) or 4) for best performance.
If you get a message saying the binary isn't signed by Apple and can't be run, use the following command to bypass this:
xattr -d "com.apple.quarantine" ./ska
Build from source
- Clone the repository with
git clone
. - Run
cargo install --path .
orRUSTFLAGS="-C target-cpu=native" cargo install --path .
to optimise for your machine.
Documentation
Can be found at https://docs.rs/ska.
Description
This is a reimplementation of Simon Harris' SKA package in the rust language, by Johanna von Wachsmann, Simon Harris and John Lees.
SKA (Split Kmer Analysis) is a toolkit for prokaryotic (and any other small, haploid) DNA sequence analysis using split kmers. A split kmer is a pair of kmers in a DNA sequence that are separated by a single base. Split kmers allow rapid comparison and alignment of small genomes, and is particulalry suited for surveillance or outbreak investigation. SKA can produce split kmer files from fasta format assemblies or directly from fastq format read sequences, cluster them, align them with or without a reference sequence and provide various comparison and summary statistics. Currently all testing has been carried out on high-quality Illumina read data, so results for other platforms may vary.
Optimisations include:
- Integer DNA encoding, optimised parsing from FASTA/FASTQ.
- Faster dictionaries.
- Full parallelisation of build phase.
- Smaller, standardised input/output files.
- Reduced memory footprint with read filtering.
And other improvements:
- IUPAC uncertainty codes for multiple copy k-mers.
- Fully dynamic files (merge, delete samples).
- Native VCF output for map.
- Support for known strand sequence (e.g. RNA viruses).
- Stream to STDOUT, or file with
-o
. - Simpler command line combining
ska fasta
,ska fastq
,ska alleles
andska merge
into the newska build
. - Option for single commands to run
ska align
orska map
. - Logging.
- CI testing.
All of which make ska.rust run faster and with smaller file size and memory footprint than the original.
Planned features
- Add support for amiguity in VCF output
Things you can no longer do
- Use k > 63 (shouldn't be necessary? Let us know if you need this and why).
ska annotate
(use bedtools).ska compare
,ska humanise
,ska info
orska summary
(useska nk --full-info
).ska distance
andska unique
(use pp-sketchlib).ska type
(use PopPUNK instead of MLST 🙂)- Ns are always skipped, and will not be found in any split k-mers.
.skf
files are not backwards compatible with version 1.
Dependencies
~11–18MB
~338K SLoC