po_gl: Generate genotype likelihoods from offspring genotypes.

View source: R/rscripts.R

po_glR Documentation

Generate genotype likelihoods from offspring genotypes.

Description

Takes as input (i) the parent genotypes, (ii) the offspring genotype frequency, (iii) sequencing error rate, (iv) read depth, (v) bias, and (vi) overdispersion. It returns genotype likelihoods.

Usage

po_gl(
  genovec,
  ploidy,
  p1_geno = NULL,
  p2_geno = NULL,
  rd = 10,
  seq = 0.01,
  bias = 1,
  od = 0.01
)

Arguments

genovec

Offspring genotypes. genovec[i] is the dosage for individual i.

ploidy

Ploidy

p1_geno

Parent 1 genotype

p2_geno

Parent 2 genotype

rd

Read depth. Lower is more uncertain.

seq

Sequencing error rate. Higher means more uncertain.

bias

Bias. 1 means no bias.

od

Overdispersion. Typical value is like 0.01. Higher means more uncertain.

Value

Genotype likelihoods

Author(s)

Mira Thakkar

Examples

set.seed(1)
po_gl(genovec = c(1, 2, 1, 1, 3), p1_geno = 2, p2_geno = 2, ploidy = 4)


segtest documentation built on July 1, 2025, 1:07 a.m.