convert_marker_dosages {polymapR}R Documentation

Convert marker dosages to the basic types.

Description

Convert marker dosages to the basic types which hold the same information and for which linkage calculations can be performed.

Usage

convert_marker_dosages(
  dosage_matrix,
  ploidy,
  ploidy2 = NULL,
  parent1 = "P1",
  parent2 = "P2",
  marker_conversion_info = FALSE,
  log = NULL
)

Arguments

dosage_matrix

An integer matrix with markers in rows and individuals in columns.

ploidy

ploidy level of the plant species. If parents have different ploidy level, ploidy of parent1.

ploidy2

ploidy level of the second parent. NULL if both parents have the same ploidy level.

parent1

Character string specifying the first (usually maternal) parentname.

parent2

Character string specifying the second (usually paternal) parentname.

marker_conversion_info

Logical, by default FALSE. Should marker conversion information be returned? This output can be useful for later map phasing step, if original marker coding is desired (which is most likely the case).

log

Character string specifying the log filename to which standard output should be written. If NULL log is send to stdout.

Value

A modified dosage matrix. If marker_conversion_info = TRUE, this function returns a list, with both the converted dosage_matrix, and information on the marker conversions performed per marker.

Examples

data("ALL_dosages")
conv<-convert_marker_dosages(dosage_matrix=ALL_dosages, ploidy = 4)

[Package polymapR version 1.1.5 Index]