mmconvert {mmconvert}R Documentation

Convert mouse genome positions

Description

Convert mouse genome positions between the build 39 physical map and the Cox genetic map.

Usage

mmconvert(
  positions,
  input_type = c("bp", "Mbp", "ave_cM", "female_cM", "male_cM")
)

Arguments

positions

A set of positions, in one of three possible formats

  • a vector of character strings with like "chr:position", with names being marker names, e.g., c(rs13482072="14:6738536", rs13482231="14:67215850", gnf14.117.278="14:121955310").

  • a list of marker positions, each list being positions on a given chromosome, e.g., list("14"=c(rs13482072=6738536, rs13482231=67215850, gnf14.117.278=121955310)).

  • a data frame with columns chromosome, position, and marker, e.g. data.frame(chr=c(14,14,14), pos=c(6738536, 67215850, 121955310), marker=c("rs13482072", "rs13482231", "gnf14.117.278")).

input_type

Character string indicating the type of positions provided ("bp", "Mbp", "ave_cM", "female_cM", or "male_cM")

Details

We use linear interpolation using the Cox map positions in the object coxmap. For positions outside the range of the markers on the Cox map, we extrapolate using the overall recombination rate.

Value

A data frame with the interpolated positions, with seven columns: marker, chromosome, sex-averaged cM, female cM, male cM, basepairs, and mega-basepairs. The rows are sorted by genomic position.

See Also

coxmap

Examples

# input as character strings like chr:position
input_char <- c(rs13482072="14:6738536", rs13482231="14:67215850", gnf14.117.278="14:121955310")
mmconvert(input_char)

# input as list, as in the map object for R/qtl1 and R/qtl2
input_list <- list("14"=c(rs13482072=6738536, rs13482231=67215850, gnf14.117.278=121955310))
mmconvert(input_list)

# input as data frame; *must* have chr as first column and position as second
# (marker names can be third column, or can be row names)
input_df <- data.frame(chr=c(14,14,14),
                       pos=c(6738536, 67215850, 121955310),
                       marker=c("rs13482072", "rs13482231", "gnf14.117.278"))
mmconvert(input_df)

# input can also be in Mbp
input_df$pos <- input_df$pos / 1e6
mmconvert(input_df, input_type="Mbp")

[Package mmconvert version 0.10 Index]