diff --git a/README.md b/README.md index a2926e6..9814519 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ ![Crates.io](https://img.shields.io/crates/v/recmap) ![Crates.io](https://img.shields.io/crates/d/recmap) [![docs](https://docs.rs/recmap/badge.svg)](https://docs.rs/recmap) ![Rust CI](https://github.com/vsbuffalo/recmap/actions/workflows/rust.yml/badge.svg) -# RecMap library for reading and working with recombination maps in Rust +# RecMap library (and command line tool) for reading and working with recombination maps in Rust -`RecMap` objects can be created from reading in a HapMap-formatted +A `RecMap` object can be created from reading in a HapMap-formatted recombination map. Note that since the HapMap recombination format does not include the chromosome lengths, this must be specified too. A convenience function `read_seqlens` is provided to read in TSV-formatted @@ -48,3 +48,33 @@ rec_map.interpolate_map_positions("chr1", &positions); ``` +## Command line tool + +Additionally, `recmap` had an optional command line tool feature that +interpolates recombination map positions and recombination rates, given BED3 +input: + +``` +$ recmap interp --seqlens hg38_seqlens.tsv --hapmap decode_2019_map.txt \ + hg38_1Mb_windows.bed --output decode_2019_map_1Mb_summaries.tsv --header +``` + +Currently the command line tool only has one subcommand, though more features +may be added. Please [file an +issue](https://github.com/vsbuffalo/recmap/issues) if there is a feature you'd +like! + +## Installation + +To use the library in your own Rust projects, install with: + +``` +$ cargo add recmap +``` + +To install the command line tool, use: + +``` +$ cargo install recmap +``` + diff --git a/src/main.rs b/src/main.rs index 7891363..81e96a7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -43,8 +43,13 @@ enum Commands { /// - recombination rate in [start, end) (in cM/Mb) /// /// Example: + /// /// $ recmap interp --seqlens hg38_seqlens.tsv --hapmap decode_2019_map.txt \ /// hg38_1Mb_windows.bed --output decode_2019_map_1Mb_summaries.tsv --header + /// + /// It is highly advised all recombination map output is validated visually, + /// since it is not uncommon for recombination maps to implement non-standard + /// variants of the HapMap recombination map format. Interp { /// a TSV file of chromosome names and their lengths #[arg(long, required = true)]