Description Usage Arguments Details Value Author(s) References Examples
Estimating g2 from larger datasets, such as SNPs
1 2 
genotypes 

nperm 
number or permutations for to estimate a pvalue 
nboot 
number of bootstraps to estimate a confidence interval 
boot_over 
Bootstrap over individuals by specifying "inds" and over loci with "loci". Defaults to "ind". 
CI 
confidence interval (default to 0.95) 
parallel 
Default is FALSE. If TRUE, bootstrapping and permutation tests are parallelized 
ncores 
Specify number of cores to use for parallelization. By default, all available cores are used. 
verbose 
If FALSE, nothing will be printed to show the status of bootstraps and permutations. 
Calculates g2 from SNP datasets. Use convert_raw to convert raw genotypes (with 2 columns per locus) into the required format
g2_snps returns an object of class "inbreed". The functions 'print' and 'plot' are used to print a summary and to plot the distribution of bootstrapped g2 values and CI.
An 'inbreed' object from g2_snps
is a list containing the following components:
call 
function call. 
g2 
g2 value 
p_val 
p value from permutation test 
g2_permut 
g2 values from permuted genotypes 
g2_boot 
g2 values from bootstrap samples 
CI_boot 
confidence interval from bootstrap distribution 
se_boot 
standard error of g2 from bootstraps 
nobs 
number of observations 
nloc 
number of markers 
Martin A. Stoffel (martin.adam.stoffel@gmail.com) & Mareike Esser (messer@techfak.unibielefeld.de)
Hoffman, J.I., Simpson, F., David, P., Rijks, J.M., Kuiken, T., Thorne, M.A.S., Lacey, R.C. & Dasmahapatra, K.K. (2014) Highthroughput sequencing reveals inbreeding depression in a natural population. Proceedings of the National Academy of Sciences of the United States of America, 111: 37753780. Doi: 10.1073/pnas.1318945111
1 2 3 4 5 6 7 8 9 10 11  # load SNP genotypes in 0 (homozygous), 1 (heterozygous), NA (missing) format.
# low number of bootstraps and permutations for computational reasons.
data(mouse_snps)
(g2_mouse < g2_snps(mouse_snps, nperm = 10, nboot = 10, CI = 0.95, boot_over = "loci"))
# parallelized version for more bootstraps or permutations
## Not run:
(g2_mouse < g2_snps(mouse_snps, nperm = 1000, nboot = 1000,
CI = 0.95, parallel = TRUE, ncores = 4))
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.