thinmap {polyqtlR}R Documentation

Thin out map data

Description

thinmap is a function for thinning out an integrated map, in order that IBD estimation runs more quickly. Especially useful for maps with very high marker densities for which the estimate_IBD function is to be used.

Usage

thinmap(
  maplist,
  dosage_matrix,
  bin_size = 1,
  bounds = NULL,
  remove_markers = NULL,
  plot_maps = TRUE,
  use_SN_phase = FALSE,
  parent1 = "P1",
  parent2 = "P2",
  log = NULL
)

Arguments

maplist

A list of maps. In the first column marker names and in the second their position.

dosage_matrix

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

bin_size

Numeric. Size (in cM) of the bins to include. By default, a bin size of 1 cM is used. Larger bin_size results in fewer markers being left on the resulting map.

bounds

Numeric vector. If NULL (by default) then all positions are included, however if specified then output is limited to a specific region, which may be useful if fine-mapping a region of interest.

remove_markers

Optional vector of marker names to remove from the maps. Default is NULL.

plot_maps

Logical. Plot the marker positions of the selected markers using polymapR::plot_map.

use_SN_phase

Logical, by default FALSE. If TRUE, then 1x0 and 0x1 are binned per phase, to increase coverage of these marker types across parental homologues. If not, at most one of each are retained per bin.

parent1

Identifier of parent 1, by default assumed to be "P1"

parent2

Identifier of parent 2, by default assumed to be "P2"

log

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

Value

A maplist of the same structure as the input maplist, but with fewer markers based on the bin_size.

Examples

data("phased_maplist.4x","SNP_dosages.4x")
maplist_thin<-thinmap(maplist=phased_maplist.4x,dosage_matrix=SNP_dosages.4x)

[Package polyqtlR version 0.1.1 Index]