snmf_pvalues: P-values for snmf population differentiation tests

Description Usage Arguments Value Author(s) References See Also Examples

Description

Returns a vector of p-values computed from an snmf run.

Usage

1
snmf.pvalues (object, genomic.control, lambda, ploidy, entropy, fisher, K, run)

Arguments

object

An snmfProject object.

genomic.control

A Boolean value. If TRUE, the p-values are automatically calibrated using genomic control. If FALSE, the p-values are calculated by rescaling the chi-squared test statistics using the lambda parameter.

lambda

A numeric value. The lambda value is used as an inflation factor to rescale the chi-squared statistics in the computation of p-values. This option requires that genomic.control = FALSE. The default value of lambda is equal to 1.0 (no rescaling).

ploidy

An integer value among 1 or 2. Tests are implemented for haploids and diploids (to be extended to polypoids).

entropy

A Boolean value. If TRUE, the run of minimum entropy is used for computing the p-values.

fisher

A Boolean value. If TRUE, F-distributions are used to test the null-hypothesis, Chi-squared otherwise.

K

An integer value. The number of genetic clusters.

run

An integer for the run number used the computation of p-values (by default, the minimum entropy run).

Value

p.values

A vector of p-values for each locus for the population differentiation test.

GIF

The inflation factor value used in the test.

Author(s)

Olivier Francois

References

Martins, H., Caye, K., Luu, K., Blum, M. G. B., Francois, O. (2016). Identifying outlier loci in admixed and in continuous populations using ancestral population differentiation statistics. Molecular Ecology, 25(20), 5029-5042.

See Also

snmf

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
### Example of analyses using snmf ###

data("tutorial")
# creation of a genotype file, "genotypes.lfmm".
# The data contain 400 SNPs for 50 individuals.
write.geno(tutorial.R, "genotypes.geno")


################
# snmf runs    #
################

# main options, K: the number of ancestral populations, 
#        entropy: cross-entropy criterion, 
#        CPU: the number of CPUs.

project.snmf = snmf("genotypes.geno", 
                    K = 4, 
                    entropy = TRUE,
                    ploidy = 2,
                    repetitions = 10,
                    project = "new")

# genome scan using adjusted p-values (genomic control method)

p = snmf.pvalues(project.snmf, entropy = TRUE, ploidy = 2, K = 4)
p$GIF

par(mfrow = c(2,1))
hist(p$pvalues, col = "orange")

plot(-log10(p$pvalues), pch = 19, col = "blue", cex = .7)

LEA documentation built on Nov. 8, 2020, 8:19 p.m.