Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

calc_raw_geno_freq

Calculate genotype frequencies from raw SNP genotypes


Description

Calculate genotype frequencies from raw SNP genotypes, by individual or by marker

Usage

calc_raw_geno_freq(cross, by = c("individual", "marker"), cores = 1)

Arguments

cross

Object of class "cross2". For details, see the R/qtl2 developer guide.

by

Indicates whether to summarize by individual or by marker.

cores

Number of CPU cores to use, for parallel calculations. (If 0, use parallel::detectCores().) Alternatively, this can be links to a set of cluster sockets, as produced by parallel::makeCluster().

Value

A matrix of genotypes frequencies with 3 columns (AA, AB, and BB) and with rows being either individuals or markers.

See Also

Examples

## Not run: 
# load example data and calculate genotype probabilities
file <- paste0("https://raw.githubusercontent.com/rqtl/",
               "qtl2data/master/DOex/DOex.zip")
DOex <- read_cross2(file)
gfreq <- calc_raw_geno_freq(DOex)

## End(Not run)

qtl2

Quantitative Trait Locus Mapping in Experimental Crosses

v0.24
GPL-3
Authors
Karl W Broman [aut, cre] (<https://orcid.org/0000-0002-4914-6671>), R Core Team [ctb]
Initial release
2020-12-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.