n_missing: Count missing genotypes

View source: R/n_missing.R

n_missingR Documentation

Count missing genotypes

Description

Number (or proportion) of missing (or non-missing) genotypes by individual or marker

Usage

n_missing(
  cross,
  by = c("individual", "marker"),
  summary = c("count", "proportion")
)

n_typed(
  cross,
  by = c("individual", "marker"),
  summary = c("count", "proportion")
)

Arguments

cross

An object of class "cross2", as output by read_cross2(). For details, see the R/qtl2 developer guide.

by

Whether to summarize by individual or marker

summary

Whether to take count or proportion

Value

Vector of counts (or proportions) of missing (or non-missing) genotypes.

Functions

  • n_missing(): Count missing genotypes

  • n_typed(): Count genotypes

Examples

iron <- read_cross2(system.file("extdata", "iron.zip", package="qtl2"))
nmis_ind <- n_missing(iron)
pmis_mar <- n_typed(iron, "mar", "proportion")
plot(nmis_ind, xlab="Individual", ylab="No. missing genotypes")
plot(pmis_mar, xlab="Markers", ylab="Prop. genotyped")

qtl2 documentation built on May 29, 2024, 11:46 a.m.