calc_raw_geno_freq: Calculate genotype frequencies from raw SNP genotypes

Description Usage Arguments Value See Also Examples

View source: R/calc_raw_summaries.R

Description

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

Usage

1
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

calc_raw_maf(), calc_raw_het(), recode_snps()

Examples

1
2
3
4
5
6
7
8
## Not run: 
# load example data and calculate genotype probabilities
file <- paste0("https://raw.githubusercontent.com/rqtl/",
               "qtl2data/main/DOex/DOex.zip")
DOex <- read_cross2(file)
gfreq <- calc_raw_geno_freq(DOex)

## End(Not run)

qtl2 documentation built on Oct. 18, 2021, 1:06 a.m.