Skip to content

alejandrogzi/netools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

netools

Version Badge Crates.io Version GitHub License Crates.io Total Downloads

work with .net files in Rust

docs . usage . tools . nets

Installation

Binary

cargo install --all-features netools

Docker

docker pull ghcr.io/alejandrogzi/netools:latest

Conda

conda install -c bioconda netools

Library

Add this to your Cargo.toml:

[dependencies]
netools = { version = "0.0.1", features = ["mmap", "gzip", "parallel"] }

Benchmarks

netools commands

Command Mean [s] Min [s] Max [s] Relative
netools filter 3.255 ± 0.029 3.209 3.305 1.00
netools sort 14.014 ± 0.131 13.868 14.327 1.00
netools merge 31.587 ± 9.757 22.248 50.022 1.00

Commands: filter --kind fill --min-score 100000 IN -o /dev/null, sort --records reference IN -o /dev/null, merge --duplicates keep-all IN IN -o /dev/null (10–12 runs each, 2 warmups; merge is memory-bound — it parses two full copies — hence the wider spread).

*ran using hyperfine 1.18.0 on an AMD Ryzen 7 5700X with 128 GB of RAM and 16 cores with a 1.4 GB uncompressed hg38.mm39.net (hg38↔mm39 whole-genome net, 20.3M records across 349 sequences) file as input


Raw chainNet conversion

Command Plain mean ± SD Gzip mean ± SD Plain speedup Gzip speedup Peak RSS plain / gzip
Kent chainNet (query discarded) 18.019 ± 0.248 s 18.920 ± 0.402 s 1.00× 1.00× 3.63 / 3.63 GiB
Rust both, 1 thread 10.896 ± 0.064 s 12.130 ± 0.021 s 1.65× 1.56× 3.54 / 3.54 GiB
Rust both, 16 threads 7.830 ± 0.063 s 9.074 ± 0.056 s 2.30× 2.09× 4.13 / 4.11 GiB
Rust reference-only, 1 thread 8.619 ± 0.107 s 9.767 ± 0.043 s 2.09× 1.94× 3.45 / 3.45 GiB
Rust reference-only, 16 threads 7.094 ± 0.052 s 8.217 ± 0.029 s 2.54× 2.30× 4.09 / 4.09 GiB

*ran using hyperfine 1.18.0 on an AMD Ryzen 7 5700X with 128 GB of RAM and 16 cores with a 360 MB compressed hg38.rhiRex1.net (hg38↔rhiRex1 whole-genome chain; 3,049,608 chains; 608 reference sequences; 91 query sequences) file as input


chainNet + Kent NetFilterNonNested.perl

Command Plain mean ± SD Gzip mean ± SD Plain speedup Gzip speedup Peak RSS plain / gzip
Kent chainNet + Perl 24.611 ± 0.339 s 25.685 ± 1.153 s 1.00× 1.00× 3.63 / 3.63 GiB
Rust --preset ccr, 1 thread 8.060 ± 0.029 s 9.216 ± 0.111 s 3.05× 2.79× 3.43 / 3.43 GiB
Rust --preset ccr, 16 threads 6.634 ± 0.044 s 7.668 ± 0.051 s 3.71× 3.35× 4.05 / 4.05 GiB

*ran using hyperfine 1.18.0 on an AMD Ryzen 7 5700X with 128 GB of RAM and 16 cores with a 360 MB compressed hg38.rhiRex1.net (hg38↔rhiRex1 whole-genome chain; 3,049,608 chains; 608 reference sequences; 91 query sequences) file as input

About

work with .net files in Rust

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages