Skip to contents

This function creates a Marey plot, which visualizes the relationship between physical position (in megabases) and genetic distance (in centimorgans) for a single chromosome.

Usage

plot_marey(map, chrom)

Arguments

map

A data frame containing marker mapping information with at least the following columns:

  • "position_Mb": Physical position of markers (in base pairs).

  • "position_cM": Genetic distance in centimorgans (cM).

chrom

Character or numeric. The chromosome identifier to be displayed in the plot title.

Value

A ggplot2 scatter plot showing the Marey plot.

Examples

if (FALSE) { # \dontrun{
# Example map data
example_map <- data.frame(
  position = c(1000000, 5000000, 10000000, 20000000, 30000000),
  p20 = c(0, 5, 10, 20, 30)
)

# Generate Marey plot for Chromosome 1
plot_marey(example_map, chrom = 1)
} # }