genome_wide_threshold_1D: Calculate a genome-wide significance threshold for the...

View source: R/genome_wide_threshold_1D.R

genome_wide_threshold_1DR Documentation

Calculate a genome-wide significance threshold for the single-variant scan


This function uses permutation testing to calculate a genome-wide significance threshold for the single-variant scan. Two user-defined thresholds are calculated: the lower threshold (higher alpha) can be used to determine which variants will be used in the pairwise scan. The higher threshold (lower alpha) is used to determine which variants are used as covariates in the pairwise scan. In each permutation, the phenotype or eigentrait is shuffled and all markers are retested with the permuted phenotype. The regression coefficients are collected from each permutation and the extreme value distribution is used to determine thresholds for the user-defined alpha values.


  n_perm = 100,
  scan_what = c("eigentraits", "raw_traits"),
  ref_allele = NULL,
  alpha = c(0.01, 0.05),
  run_parallel = FALSE,
  n_cores = 4,
  verbose = FALSE



a Cape object


a genotype object.


The number of permutations to perform. The default is 100.


A character value that uniquely specifies whether the eigentraits or phenotypes should be scanned. Options are "eigentraits" or "raw_traits".


Cape requires that one of the alleles in the population be selected as a reference allele. The effects of all alleles are then reported as the effects relative to the reference allele. In the DO population B represents the C57BL/6J (B6) mouse. Because this strain is considered the standard strain, the default reference allele is B. If another allele has a positive effect, it means that it increases the given phenotype relative to that in the B6 mouse. Any other allele can be selected as the reference allele simply by specifying it with this argument.


The alpha value(s) used to calculate significance levels. This should be a vector of any length of numerical values between 0 and 1. The default is a vector of length two: c(0.01, 0.05).


Indicates the model family of the phenotypes. This can be either "gaussian" or "binomial".


A logical value indicating whether the process should be run in parallel. Defaults to FALSE.


integer number of cores to use if running in parallel


A logical value indicating whether to print progress to the screen. Defaults to FALSE.


Returns a vector the same length as alpha indicating the thresholds for each value of alpha.

cape documentation built on May 20, 2022, 1:06 a.m.