6.6 inbreeding
Estimating the inbreeding coefficient {#inbreeding}
inbreeding infers the global inbreeding coefficient ๐น from a population sample
using Reversible-Jump Markov Chain Monte Carlo (RJ-MCMC). It infers the following model parameters :
๐น: the global inbreeding coefficient.withInbreeding: whether there is inbreeding.๐: the allele frequencies (per locus).isPolymorph: for each locus ๐, whether it is polymorphic. If a locus is polymorphic, then
\[{p_{l} \sim Beta(๐พ)}, else \\ {p_{l} = 0}\]
log(๐พ): the logarithm of the parameter of the symmetric Beta distribution on polymorphic loci.๐: the fraction of polymorphic loci.
6.6.1 Parameters
6.6.1.1 Input
--vcf \*_majorMinor.vcf.gz |
a multi-sample VCF file (e.g.ย created by majorMinor). Must contain GL or PL fields. |
Optional
--samples samples.txt |
a .txt file with a subset of samples from the VCF file (one sample per line). Note : if your VCF file contains multiple populations, and you would like to estimate the inbreeding coefficient per population, you will need to create one sample file per population (containing only the relevant samples) and then run inbreeding with each of these separately. |
6.6.1.2 Specific Parameters
| Parameter | Description | Default |
|---|---|---|
--iterations value |
Specify the number of MCMC iterations. | 10000 |
--burnin value |
Specify the number of MCMC iterations in each burnin round. | 1000 |
--numBurnin value |
Specify the number of burnin rounds. | 10 |
--thinning value |
Specify to write every nth iteration (excluding burnin) to the result file. | 10 |
--stateFile fileName |
Write the state of the MCMC to file. | disabled |
--initVals fileName |
Initialize values and jump sizes from the state of a previous MCMC run as written by --stateFile. Can be used to re-start an MCMC. |
disabled |
--writeBurnin |
write burnin values | disabled |
--probMovingToModelNoF value |
Propose move to model without F with indicated probability. numeric_value must be between 0 and 1 (inclusive). | 0.1 |
--probMovingToModelP0 value |
Propose move to monomorphic model with indicated probability. numeric_value must be between 0 and 1 (inclusive). | 0.1 |
--lambdaF value |
Set ๐ of exponential distribution for the proposal of new F when jumping to F-Model. |
100 |
--lambdaP value |
Set ๐ of exponential distribution for the proposal of new ๐ when jumping to polymorphic model. |
100 |
6.6.1.3 Engine
6.6.2 Output
| *F_meanVar.txt | .txt the posterior mean (first row) and the posterior variance (second row) of ๐น and withInbreeding. The parameter withInbreeding reflects the posterior probability that the population in question is inbred. For example, if the posterior mean of withInbreeding = 1.0, we are 100% sure that there is inbreeding. |
| *F_trace.txt | .txt file with the thinned MCMC chain (trace). Contains the MCMC samples of ๐น and withInbreeding. |
| *p_meanVar.txt | .txt file with the posterior mean (first row) and the posterior variance (second row) of ๐, isPolymorph, log(๐พ) and ๐. |
| *p_trace.txt | .txt file with all parameters associated with the allele frequency. Contains the MCMC samples of ๐, isPolymorph, log(๐พ) and ๐. |
| _config.txt | .txt file with configurations of the run. |
6.6.3 Usage Example
# Simulate 5 samples in HardyโWeinberg Equilibrium and write vcf file
atlas simulate --vcf --type HW --sampleSize 3
# Calculate inbreeding coefficient
# Use only 1 burnin and 200 iterations for speed (keep the default values for real data)
atlas inbreeding --vcf ATLAS_simulations.vcf.gz --numBurnin 1 --iterations 200