Learn R Programming

mapfuser (version 0.1.2)

read_ref: Load a reference map

Description

Read a reference map, either a reference genetic map or a map with physical genome positions

Usage

read_ref(MF.obj = NULL, ref_file = ref_file, sep = NULL, header = TRUE,
  na.strings = "NA", type = c("delim", "JoinMap"))

Arguments

MF.obj

A mapfuser object

ref_file

path to reference file

sep

The field separator character, see read.delim

header

A logical value indicating whether the files contains the names of variable int the first line, see read.delim()

na.strings

How to interpret missing values? See read.delim

type

Type of input data, either delimited file with columns "Marker", "LG", and "Position" or a JoinMap ".map" file.

Value

A mapfuser object with the reference map loaded to the ref_map slot. Name of the reference map is saved to the config.

Examples

Run this code
# NOT RUN {
fpath <- system.file("extdata", package="mapfuser")
maps <- list.files(fpath, pattern = "Col", full.names = TRUE)
MF.obj <- read_maps(mapfiles = maps, sep = ",", header = TRUE,
mapweights = rep(1,7), type = "delim")
ref_file <- list.files(fpath, pattern = "reference", full.names = TRUE)
MF.obj <- read_ref(MF.obj = MF.obj, ref_file = ref_file, sep = ",",
header = TRUE, na.string = NA, type = "delim")
# }

Run the code above in your browser using DataLab