order_and_plot optimizes the marker order in a (trimmed) genotype matrix using
recombination frequency (RF) matrices. It performs multiple iterations of
marker ordering, selects the best order based on the smallest Sum of Adjusted
Recombination Fractions (SARF), and generates visualizations of marker order. The function uses
MLEL() and order_markers() from Professor Jeffrey Endelman's MapRtools and streamlines the process.
This workflow should be easier on the user when dealing with multiple chromosomes.
MapRtools.
Arguments
- trimmed_geno
A genotype matrix where:
Rows represent markers.
Columns represent individuals. It could be the output of
trim_LGor any genotype matrix.
- pop.type
Character. The population type used for ordering markers. Default is
"F2".order_and_plotwould work with any of the following "DH","BC","F2","S1","RIL.self","RIL.sib". Based onMapRtools::MLEL()- CHR
Character (optional). The chromosome identifier for labeling plots.
- n.iter
Integer. The number of iterations for marker ordering. Default is
6.- prop
Numeric. The proportion of individuals to include in the genotype plot. Must be between
0and1. Default is0.20(20% of individuals). If all individuals are included the visualization quality drops.
Value
A list containing:
"original_geno": The original genotype matrix."ordered_geno": The optimized genotype matrix with markers reordered."order_plot": Aggplot2object displaying the original vs. optimized marker order."haplotype_plot": Aggplot2object showing the genotype haplotype plot.
Details
Computes an RF matrix using
MLEL(), then orders markers iteratively.Runs
order_markers()n.itertimes and selects the order with the smallest SARF.order_markers()Order markers by solving the traveling salesperson problem.Plots the original vs. optimized marker order.
Generates a genotype haplotype plot for a subset of individuals (
prop).If
CHRis provided, adds a chromosome label to the plots.
