getGVGenotype: Get Genetic Value Genotype data structure for reportGV...

Description Usage Arguments Value Examples

View source: R/getGVGenotype.R

Description

Extracts genotype data if available otherwise NULL is returned.

Usage

1

Arguments

ped

the pedigree information in datatable format

Value

A data.frame with the columns id, first, and second extracted from a pedigree object (a data.frame) containing genotypic data. If the pedigree object does not contain genotypic data the NULL is returned.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## We usually defined `n` to be >= 5000
library(nprcgenekeepr)
ped <- nprcgenekeepr::lacy1989Ped
allelesNew <- geneDrop(ped$id, ped$sire, ped$dam, ped$gen,
                      genotype = NULL, n = 50, updateProgress = NULL)
genotype <- data.frame(id = ped$id,
                       first_allele = c(NA, NA, "A001_B001", "A001_B002",
                                        NA, "A001_B002", "A001_B001"),
                       second_allele = c(NA, NA, "A010_B001", "A001_B001",
                                         NA, NA, NA),
                       stringsAsFactors = FALSE)
pedWithGenotype <- addGenotype(ped, genotype)
pedGenotype <- getGVGenotype(pedWithGenotype)
allelesNewGen <- geneDrop(ped$id, ped$sire, ped$dam, ped$gen,
                         genotype = pedGenotype,
                         n = 5, updateProgress = NULL)

rmsharp/nprcmanager documentation built on April 24, 2021, 3:13 p.m.