compute_cf: Call Frequency

Description Usage Arguments Value Examples

View source: R/call_frequency.R

Description

compute_cf returns results from call frequency check

Usage

1
2
compute_cf(x, output = c("marker_names", "marker_callfreq"),
  missing_value = "??", call_threshold = NULL)

Arguments

x

A matrix. Genotype names are stored in rows whereas marker names are stored in columns.

output

Character vector with output options.

missing_value

Character vector providing the encoding of missing elements.

call_threshold

Numeric or complex vector specifying the call frequency threshold.

Value

If output is "marker_names" a character vector with marker names that have passed the quality check will be returned. If output is "marker_callfreq" a numeric vector with the call frequency at each marker locus will be returned.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 # Load a matrix with SNP genotypes encoded as numeric values
 data(marker_numeric)

 # Compute the call frequency
 compute_cf(marker_numeric, output = "marker_callfreq",
            missing_value = NA_real_)

 # Retrieve the marker names of all loci with a call frequency >= 0.9.
 compute_cf(marker_numeric, output = "marker_names",
            missing_value = NA_real_, call_threshold = 0.9)

mwesthues/sspredr documentation built on May 23, 2019, 10:56 a.m.