import_IBD: Import IBD probabilities as estimated by TetraOrigin

Description Usage Arguments Value

View source: R/polyqtlR_functions.R

Description

Imports the summarised IBD probability output of TetraOrigin (which estimates IBD probabilities at all marker positions), and interpolates these at a grid of positions at user-defined spacing.

Usage

1
2
3
4
5
6
7
import_IBD(
  folder = NULL,
  filename.vec,
  bivalent_decoding = TRUE,
  error = 0.01,
  log = NULL
)

Arguments

folder

The path to the folder in which the TetraOrigin output is contained, default is NULL if files are in working directory.

filename.vec

A vector of the character filename(s) of the .csv file(s) containing the output of TetraOrigin. Should be in order according to LG/chromosome numbering.

bivalent_decoding

Logical, if TRUE then only bivalent pairing was allowed in TetraOrigin, specify FALSE if multivalent pairing was also allowed.

error

The offspring error prior used in the offspring decoding step, here assumed to be 0.01

log

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

Value

Returns a list with the following items:

IBDtype :

Always "genotypeIBD" for the output of TetraOrigin

IBDarray :

An array of IBD probabilities. The dimensions of the array are: markers, genotype classes and individuals.

map :

Integrated linkage map positions of markers used in IBD calculation

parental_phase :

The parental marker phasing as used by TetraOrigin, recoded in 1 and 0's

marginal.likelihoods :

A list of marginal likelihoods of different valencies, currently NULL

valency :

The predicted valency that maximised the marginal likelihood, per offspring. Currently NULL

offspring :

Offspring names

biv_dec :

Logical, the bivalent_decoding parameter specified.

gap :

The gap size used in IBD interpolation, by default NULL. See spline_IBD

genocodes :

Ordered list of genotype codes used to represent different genotype classes.

pairing :

log likelihoods of each of the different pairing scenarios considered (can be used e.g. for post-mapping check of preferential pairing)

ploidy :

The ploidy of parent 1, by default assumed to be 4

ploidy2 :

The ploidy of parent 2, by default assumed to be 4

method :

The method used, always returned as "hmm_TO" (Hidden Markov Model TetraOrigin)

error :

The error prior used in the calculation, assumed to be 0.01


polyqtlR documentation built on Feb. 2, 2022, 5:09 p.m.