read_ref: Load a reference map

Description Usage Arguments Value Author(s) Examples

View source: R/read_ref.R

Description

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

Usage

1
2
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.

Author(s)

Dennis van Muijen

Examples

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

dmuijen/mapfuser documentation built on May 28, 2019, 7:53 p.m.