map_df_to_list: Marker map data frame to list

Description Usage Arguments Value See Also Examples

View source: R/map_df_to_list.R

Description

Convert a marker map organized as data frame to a list

Usage

1
2
3
4
5
6
7
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

1
2
3
4
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")

qtl2convert documentation built on Oct. 7, 2021, 9:27 a.m.