recmap

A command line tool and Rust library for working with recombination maps.

https://github.com/vsbuffalo/recmap

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.4%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

A command line tool and Rust library for working with recombination maps.

Basic Info
  • Host: GitHub
  • Owner: vsbuffalo
  • License: mit
  • Language: Rust
  • Default Branch: main
  • Homepage:
  • Size: 77.1 KB
Statistics
  • Stars: 9
  • Watchers: 1
  • Forks: 1
  • Open Issues: 0
  • Releases: 1
Created about 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.md

Crates.io Crates.io docs Rust CI DOI

RecMap library (and command line tool) for reading and working with recombination maps in Rust

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 "genome" files of the chromosome names and lengths.

Here is a example which loads a recombination map from a HapMap-formatted recombination map and calculates the total map lengths.

```rust use recmap::prelude::*; let seqlens = readseqlens("hg38seqlens.tsv") .expect("could not read seqlens"); let recmap = RecMap::fromhapmap("decode2019map.txt", seqlens) .expect("cannot read hapmap");

for (name, ratemap) in recmap.iter() { println!("{}\t{}", name, ratemap.totalmap_length().unwrap()); } ```

This example can be run on the command line with:

bash cargo run --example calc_map_lengths -- --seqlens hg38_seqlens.tsv decode_2019_map.txt

One of the most common tasks when working with recombination maps is to estimate the map position of arbitrary markers, which is usually done by linear interpolation. RecMap provides an easy way to do this for one position (RecMap.interpolate_map_position()) and for many positions, with RecMap.interpolate_map_positions():

```rust use recmap::prelude::*; let seqlens = readseqlens("hg38seqlens.tsv") .expect("could not read seqlens"); let recmap = RecMap::fromhapmap("decode2019map.txt", seqlens) .expect("cannot read hapmap");

let positions = vec![11975064, 15007450]; recmap.interpolatemap_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 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 --features=cli

Owner

  • Name: Vince Buffalo
  • Login: vsbuffalo
  • Kind: user
  • Location: Berkeley, CA
  • Company: UC Berkeley

Evolutionary geneticist at UC Berkeley, former bioinformatician. ♥s probability, statistics. Author of book Bioinformatics Data Skills.

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
  - family-names: Buffalo
    given-names: Vince
    orcid: https://orcid.org/0000-0003-4510-1609
title: "recmap"
version: 0.2.4
identifiers:
  - type: doi
    value: 10.5281/zenodo.10642334
date-released: 2024-02-09

GitHub Events

Total
  • Fork event: 1
Last Year
  • Fork event: 1

Packages

  • Total packages: 1
  • Total downloads:
    • cargo 5,952 total
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 5
  • Total maintainers: 1
crates.io: recmap

A library for reading and working with recombination maps in Rust

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 5,952 Total
Rankings
Dependent repos count: 29.4%
Dependent packages count: 34.6%
Average: 53.5%
Downloads: 96.3%
Maintainers (1)
Last synced: 6 months ago