map_df_to_list {qtl2convert}R Documentation

Marker map data frame to list

Description

Convert a marker map organized as data frame to a list

Usage

map_df_to_list(
  map,
  chr_column = "chr",
  pos_column = "cM",
  marker_column = "marker",
  Xchr = c("x", "X")
)

Arguments

map

Data frame with marker map

chr_column

Name of the column in map that contains the chromosome IDs.

pos_column

Name of the column in map that contains the marker positions.

marker_column

Name of the column in map that contains the marker names. If NULL, use the row names.

Xchr

Vector of character strings indicating the name or names of the X chromosome. If NULL, assume there's no X chromosome.

Value

A list of vectors of marker positions, one component per chromosome

See Also

map_list_to_df()

Examples

map <- data.frame(chr=c(1,1,1,  2,2,2,   "X","X"),
                  pos=c(0,5,10, 0,8,16,  5,20),
                  marker=c("D1M1","D1M2","D1M3",    "D2M1","D2M2","D2M3",   "DXM1","DXM2"))
map_list <- map_df_to_list(map, pos_column="pos")


[Package qtl2convert version 0.30 Index]