Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
vsbuffalo committed Feb 9, 2024
1 parent 0ac84ef commit 79d0a9e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
34 changes: 32 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
```

5 changes: 5 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit 79d0a9e

Please sign in to comment.