Description Usage Arguments Value Author(s) See Also Examples
Read the output file from lfmm
. This is an internal function.
Zscores of a run can be accessed using the function z.scores
.
1 | read.zscore(input.file)
|
input.file |
a character string containing a path to the output of |
R |
A matrix containing the |
Eric Frichot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ### Example of analyses using lfmm ###
data("tutorial")
# creation of the genotype file, genotypes.lfmm.
# It contains 400 SNPs for 50 individuals.
write.lfmm(tutorial.R, "genotypes.lfmm")
# creation of the environment file, gradient.env.
# It contains 1 environmental variable for 40 individuals.
write.env(tutorial.C, "gradients.env")
################
# runs of lfmm #
################
# main options, K: (the number of latent factors),
# CPU: the number of CPUs.
# Toy runs with K = 3 and 2 repetitions.
# around 15 seconds per run.
project = NULL
project = lfmm("genotypes.lfmm", "gradients.env", K = 3,
iterations = 6000, burnin = 3000, project = "new")
res = read.zscore("./genotypes_gradients.lfmm/K3/run1/genotypes_r1_s1.3.zscore")
|
[1] "genotypes.lfmm"
[1] "gradients.env"
The project is saved into :
genotypes_gradients.lfmmProject
To load the project, use:
project = load.lfmmProject("genotypes_gradients.lfmmProject")
To remove the project, use:
remove.lfmmProject("genotypes_gradients.lfmmProject")
[1] "********************************"
[1] "* K = 3 repetition 1 d = 1 *"
[1] "********************************"
Summary of the options:
-n (number of individuals) 50
-L (number of loci) 400
-K (number of latent factors) 3
-o (output file) genotypes_gradients.lfmm/K3/run1/genotypes_r1
-i (number of iterations) 6000
-b (burnin) 3000
-s (seed random init) 1386086602
-p (number of processes (CPU)) 1
-x (genotype file) genotypes.lfmm
-v (variable file) gradients.env
-D (number of covariables) 1
-d (the dth covariable) 1
Read variable file:
gradients.env OK.
Read genotype file:
genotypes.lfmm OK.
<<<<
Analyse for variable 1
Start of the Gibbs Sampler algorithm.
[ ]
[===========================================================================]
End of the Gibbs Sampler algorithm.
ED:20000.13739 DIC: 19999.46653
The statistics for the run are registered in:
genotypes_gradients.lfmm/K3/run1/genotypes_r1_s1.3.dic.
The zscores for variable 1 are registered in:
genotypes_gradients.lfmm/K3/run1/genotypes_r1_s1.3.zscore.
The columns are: zscores, -log10(p-values), p-values.
-------------------------
The execution for variable 1 worked without error.
>>>>
The project is saved into :
genotypes_gradients.lfmmProject
To load the project, use:
project = load.lfmmProject("genotypes_gradients.lfmmProject")
To remove the project, use:
remove.lfmmProject("genotypes_gradients.lfmmProject")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.