barchart: Bar plot representation of an snmf Q-matrix

Description Usage Arguments Value Author(s) See Also Examples

Description

This function displays a bar plot/bar chart representation of the Q-matrix computed from an snmf run. The function can use a sort by Q option. See snmf.

Usage

1
barchart (object, K, run, sort.by.Q = TRUE, lab = FALSE, ...)

Arguments

object

an snmfProject object.

K

an integer value corresponding to number of ancestral populations.

run

an integer value. Usually the run number that minimizes the cross-entropy criterion.

sort.by.Q

a Boolean value indicating whether individuals should be sorted by their ancestry or not.

lab

a list of individual labels.

...

other parameters of the function barplot.default.

Value

A permutation of individual labels used in the sort.by.Q option (order). Displays the Q matrix.

Author(s)

Olivier Francois

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
33
# creation of a genotype file: genotypes.geno.
# 400 SNPs for 50 individuals.

data("tutorial")
write.geno(tutorial.R, "genotypes.geno")

################
# running snmf #
################

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

# get the cross-entropy value for each run 
ce <- cross.entropy(project.snmf, K = 4)

# select the run with the lowest cross-entropy value
best <- which.min(ce)

# plot the ancestry coefficients for the best run and K = 4 

my.colors <- c("tomato", "lightblue", "olivedrab", "gold")

barchart(project.snmf, K = 4, run = best, 
        border = NA, space = 0, col = my.colors, 
        xlab = "Individuals", ylab = "Ancestry proportions", 
        main = "Ancestry matrix") -> bp
        
axis(1, at = 1:length(bp$order), 
      labels = bp$order, las = 3, 
      cex.axis = .4)

Example output

[1] "genotypes.geno"
The project is saved into :
 genotypes.snmfProject 

To load the project, use:
 project = load.snmfProject("genotypes.snmfProject")

To remove the project, use:
 remove.snmfProject("genotypes.snmfProject")

[1] 958371504
[1] "*************************************"
[1] "*          create.dataset            *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)                 50
        -L (number of loci)                        400
        -s (seed random init)                      958371504
        -r (percentage of masked data)             0.05
        -x (genotype file in .geno format)         /work/tmp/genotypes.geno
        -o (output file in .geno format)           /work/tmp/genotypes.snmf/masked/genotypes_I.geno

 Write genotype file with masked data, /work/tmp/genotypes.snmf/masked/genotypes_I.geno:		OK.

[1] "*************************************"
[1] "* sNMF K = 4  repetition 1      *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)             50
        -L (number of loci)                    400
        -K (number of ancestral pops)          4
        -x (input file)                        /work/tmp/genotypes.snmf/masked/genotypes_I.geno
        -q (individual admixture file)         /work/tmp/genotypes.snmf/K4/run1/genotypes_r1.4.Q
        -g (ancestral frequencies file)        /work/tmp/genotypes.snmf/K4/run1/genotypes_r1.4.G
        -i (number max of iterations)          200
        -a (regularization parameter)          10
        -s (seed random init)                  94597613065904
        -e (tolerance error)                   1E-05
        -p (number of processes)               1
        - diploid

Read genotype file /work/tmp/genotypes.snmf/masked/genotypes_I.geno:		OK.


Main algorithm:
	[                                                                           ]
	[====================================]
Number of iterations: 96

Least-square error: 5468.100416
Write individual ancestry coefficient file /work/tmp/genotypes.snmf/K4/run1/genotypes_r1.4.Q:		OK.
Write ancestral allele frequency coefficient file /work/tmp/genotypes.snmf/K4/run1/genotypes_r1.4.G:	OK.

[1] "*************************************"
[1] "*    cross-entropy estimation       *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)         50
        -L (number of loci)                400
        -K (number of ancestral pops)      4
        -x (genotype file)                 /work/tmp/genotypes.geno
        -q (individual admixture)          /work/tmp/genotypes.snmf/K4/run1/genotypes_r1.4.Q
        -g (ancestral frequencies)         /work/tmp/genotypes.snmf/K4/run1/genotypes_r1.4.G
        -i (with masked genotypes)         /work/tmp/genotypes.snmf/masked/genotypes_I.geno
        - diploid

Cross-Entropy (all data):	 0.453066
Cross-Entropy (masked data):	 0.559319
The project is saved into :
 genotypes.snmfProject 

To load the project, use:
 project = load.snmfProject("genotypes.snmfProject")

To remove the project, use:
 remove.snmfProject("genotypes.snmfProject")

[1] 1740012072
[1] "*************************************"
[1] "*          create.dataset            *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)                 50
        -L (number of loci)                        400
        -s (seed random init)                      1740012072
        -r (percentage of masked data)             0.05
        -x (genotype file in .geno format)         /work/tmp/genotypes.geno
        -o (output file in .geno format)           /work/tmp/genotypes.snmf/masked/genotypes_I.geno

 Write genotype file with masked data, /work/tmp/genotypes.snmf/masked/genotypes_I.geno:		OK.

[1] "*************************************"
[1] "* sNMF K = 4  repetition 2      *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)             50
        -L (number of loci)                    400
        -K (number of ancestral pops)          4
        -x (input file)                        /work/tmp/genotypes.snmf/masked/genotypes_I.geno
        -q (individual admixture file)         /work/tmp/genotypes.snmf/K4/run2/genotypes_r2.4.Q
        -g (ancestral frequencies file)        /work/tmp/genotypes.snmf/K4/run2/genotypes_r2.4.G
        -i (number max of iterations)          200
        -a (regularization parameter)          10
        -s (seed random init)                  94598394706472
        -e (tolerance error)                   1E-05
        -p (number of processes)               1
        - diploid

Read genotype file /work/tmp/genotypes.snmf/masked/genotypes_I.geno:		OK.


Main algorithm:
	[                                                                           ]
	[=========================]
Number of iterations: 66

Least-square error: 5477.041325
Write individual ancestry coefficient file /work/tmp/genotypes.snmf/K4/run2/genotypes_r2.4.Q:		OK.
Write ancestral allele frequency coefficient file /work/tmp/genotypes.snmf/K4/run2/genotypes_r2.4.G:	OK.

[1] "*************************************"
[1] "*    cross-entropy estimation       *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)         50
        -L (number of loci)                400
        -K (number of ancestral pops)      4
        -x (genotype file)                 /work/tmp/genotypes.geno
        -q (individual admixture)          /work/tmp/genotypes.snmf/K4/run2/genotypes_r2.4.Q
        -g (ancestral frequencies)         /work/tmp/genotypes.snmf/K4/run2/genotypes_r2.4.G
        -i (with masked genotypes)         /work/tmp/genotypes.snmf/masked/genotypes_I.geno
        - diploid

Cross-Entropy (all data):	 0.453226
Cross-Entropy (masked data):	 0.587829
The project is saved into :
 genotypes.snmfProject 

To load the project, use:
 project = load.snmfProject("genotypes.snmfProject")

To remove the project, use:
 remove.snmfProject("genotypes.snmfProject")

[1] 1334902936
[1] "*************************************"
[1] "*          create.dataset            *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)                 50
        -L (number of loci)                        400
        -s (seed random init)                      1334902936
        -r (percentage of masked data)             0.05
        -x (genotype file in .geno format)         /work/tmp/genotypes.geno
        -o (output file in .geno format)           /work/tmp/genotypes.snmf/masked/genotypes_I.geno

 Write genotype file with masked data, /work/tmp/genotypes.snmf/masked/genotypes_I.geno:		OK.

[1] "*************************************"
[1] "* sNMF K = 4  repetition 3      *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)             50
        -L (number of loci)                    400
        -K (number of ancestral pops)          4
        -x (input file)                        /work/tmp/genotypes.snmf/masked/genotypes_I.geno
        -q (individual admixture file)         /work/tmp/genotypes.snmf/K4/run3/genotypes_r3.4.Q
        -g (ancestral frequencies file)        /work/tmp/genotypes.snmf/K4/run3/genotypes_r3.4.G
        -i (number max of iterations)          200
        -a (regularization parameter)          10
        -s (seed random init)                  94597989597336
        -e (tolerance error)                   1E-05
        -p (number of processes)               1
        - diploid

Read genotype file /work/tmp/genotypes.snmf/masked/genotypes_I.geno:		OK.


Main algorithm:
	[                                                                           ]
	[================]
Number of iterations: 44

Least-square error: 5437.926383
Write individual ancestry coefficient file /work/tmp/genotypes.snmf/K4/run3/genotypes_r3.4.Q:		OK.
Write ancestral allele frequency coefficient file /work/tmp/genotypes.snmf/K4/run3/genotypes_r3.4.G:	OK.

[1] "*************************************"
[1] "*    cross-entropy estimation       *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)         50
        -L (number of loci)                400
        -K (number of ancestral pops)      4
        -x (genotype file)                 /work/tmp/genotypes.geno
        -q (individual admixture)          /work/tmp/genotypes.snmf/K4/run3/genotypes_r3.4.Q
        -g (ancestral frequencies)         /work/tmp/genotypes.snmf/K4/run3/genotypes_r3.4.G
        -i (with masked genotypes)         /work/tmp/genotypes.snmf/masked/genotypes_I.geno
        - diploid

Cross-Entropy (all data):	 0.450695
Cross-Entropy (masked data):	 0.630775
The project is saved into :
 genotypes.snmfProject 

To load the project, use:
 project = load.snmfProject("genotypes.snmfProject")

To remove the project, use:
 remove.snmfProject("genotypes.snmfProject")

[1] 1773032917
[1] "*************************************"
[1] "*          create.dataset            *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)                 50
        -L (number of loci)                        400
        -s (seed random init)                      1773032917
        -r (percentage of masked data)             0.05
        -x (genotype file in .geno format)         /work/tmp/genotypes.geno
        -o (output file in .geno format)           /work/tmp/genotypes.snmf/masked/genotypes_I.geno

 Write genotype file with masked data, /work/tmp/genotypes.snmf/masked/genotypes_I.geno:		OK.

[1] "*************************************"
[1] "* sNMF K = 4  repetition 4      *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)             50
        -L (number of loci)                    400
        -K (number of ancestral pops)          4
        -x (input file)                        /work/tmp/genotypes.snmf/masked/genotypes_I.geno
        -q (individual admixture file)         /work/tmp/genotypes.snmf/K4/run4/genotypes_r4.4.Q
        -g (ancestral frequencies file)        /work/tmp/genotypes.snmf/K4/run4/genotypes_r4.4.G
        -i (number max of iterations)          200
        -a (regularization parameter)          10
        -s (seed random init)                  4607182420573050325
        -e (tolerance error)                   1E-05
        -p (number of processes)               1
        - diploid

Read genotype file /work/tmp/genotypes.snmf/masked/genotypes_I.geno:		OK.


Main algorithm:
	[                                                                           ]
	[=================================]
Number of iterations: 89

Least-square error: 5457.888087
Write individual ancestry coefficient file /work/tmp/genotypes.snmf/K4/run4/genotypes_r4.4.Q:		OK.
Write ancestral allele frequency coefficient file /work/tmp/genotypes.snmf/K4/run4/genotypes_r4.4.G:	OK.

[1] "*************************************"
[1] "*    cross-entropy estimation       *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)         50
        -L (number of loci)                400
        -K (number of ancestral pops)      4
        -x (genotype file)                 /work/tmp/genotypes.geno
        -q (individual admixture)          /work/tmp/genotypes.snmf/K4/run4/genotypes_r4.4.Q
        -g (ancestral frequencies)         /work/tmp/genotypes.snmf/K4/run4/genotypes_r4.4.G
        -i (with masked genotypes)         /work/tmp/genotypes.snmf/masked/genotypes_I.geno
        - diploid

Cross-Entropy (all data):	 0.453561
Cross-Entropy (masked data):	 0.551309
The project is saved into :
 genotypes.snmfProject 

To load the project, use:
 project = load.snmfProject("genotypes.snmfProject")

To remove the project, use:
 remove.snmfProject("genotypes.snmfProject")

[1] 542953344
[1] "*************************************"
[1] "*          create.dataset            *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)                 50
        -L (number of loci)                        400
        -s (seed random init)                      542953344
        -r (percentage of masked data)             0.05
        -x (genotype file in .geno format)         /work/tmp/genotypes.geno
        -o (output file in .geno format)           /work/tmp/genotypes.snmf/masked/genotypes_I.geno

 Write genotype file with masked data, /work/tmp/genotypes.snmf/masked/genotypes_I.geno:		OK.

[1] "*************************************"
[1] "* sNMF K = 4  repetition 5      *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)             50
        -L (number of loci)                    400
        -K (number of ancestral pops)          4
        -x (input file)                        /work/tmp/genotypes.snmf/masked/genotypes_I.geno
        -q (individual admixture file)         /work/tmp/genotypes.snmf/K4/run5/genotypes_r5.4.Q
        -g (ancestral frequencies file)        /work/tmp/genotypes.snmf/K4/run5/genotypes_r5.4.G
        -i (number max of iterations)          200
        -a (regularization parameter)          10
        -s (seed random init)                  94597197647744
        -e (tolerance error)                   1E-05
        -p (number of processes)               1
        - diploid

Read genotype file /work/tmp/genotypes.snmf/masked/genotypes_I.geno:		OK.


Main algorithm:
	[                                                                           ]
	[=========================]
Number of iterations: 67

Least-square error: 5448.288169
Write individual ancestry coefficient file /work/tmp/genotypes.snmf/K4/run5/genotypes_r5.4.Q:		OK.
Write ancestral allele frequency coefficient file /work/tmp/genotypes.snmf/K4/run5/genotypes_r5.4.G:	OK.

[1] "*************************************"
[1] "*    cross-entropy estimation       *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)         50
        -L (number of loci)                400
        -K (number of ancestral pops)      4
        -x (genotype file)                 /work/tmp/genotypes.geno
        -q (individual admixture)          /work/tmp/genotypes.snmf/K4/run5/genotypes_r5.4.Q
        -g (ancestral frequencies)         /work/tmp/genotypes.snmf/K4/run5/genotypes_r5.4.G
        -i (with masked genotypes)         /work/tmp/genotypes.snmf/masked/genotypes_I.geno
        - diploid

Cross-Entropy (all data):	 0.451827
Cross-Entropy (masked data):	 0.666003
The project is saved into :
 genotypes.snmfProject 

To load the project, use:
 project = load.snmfProject("genotypes.snmfProject")

To remove the project, use:
 remove.snmfProject("genotypes.snmfProject")

[1] 1937802772
[1] "*************************************"
[1] "*          create.dataset            *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)                 50
        -L (number of loci)                        400
        -s (seed random init)                      1937802772
        -r (percentage of masked data)             0.05
        -x (genotype file in .geno format)         /work/tmp/genotypes.geno
        -o (output file in .geno format)           /work/tmp/genotypes.snmf/masked/genotypes_I.geno

 Write genotype file with masked data, /work/tmp/genotypes.snmf/masked/genotypes_I.geno:		OK.

[1] "*************************************"
[1] "* sNMF K = 4  repetition 6      *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)             50
        -L (number of loci)                    400
        -K (number of ancestral pops)          4
        -x (input file)                        /work/tmp/genotypes.snmf/masked/genotypes_I.geno
        -q (individual admixture file)         /work/tmp/genotypes.snmf/K4/run6/genotypes_r6.4.Q
        -g (ancestral frequencies file)        /work/tmp/genotypes.snmf/K4/run6/genotypes_r6.4.G
        -i (number max of iterations)          200
        -a (regularization parameter)          10
        -s (seed random init)                  4547005792867354132
        -e (tolerance error)                   1E-05
        -p (number of processes)               1
        - diploid

Read genotype file /work/tmp/genotypes.snmf/masked/genotypes_I.geno:		OK.


Main algorithm:
	[                                                                           ]
	[===============]
Number of iterations: 41

Least-square error: 5479.404372
Write individual ancestry coefficient file /work/tmp/genotypes.snmf/K4/run6/genotypes_r6.4.Q:		OK.
Write ancestral allele frequency coefficient file /work/tmp/genotypes.snmf/K4/run6/genotypes_r6.4.G:	OK.

[1] "*************************************"
[1] "*    cross-entropy estimation       *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)         50
        -L (number of loci)                400
        -K (number of ancestral pops)      4
        -x (genotype file)                 /work/tmp/genotypes.geno
        -q (individual admixture)          /work/tmp/genotypes.snmf/K4/run6/genotypes_r6.4.Q
        -g (ancestral frequencies)         /work/tmp/genotypes.snmf/K4/run6/genotypes_r6.4.G
        -i (with masked genotypes)         /work/tmp/genotypes.snmf/masked/genotypes_I.geno
        - diploid

Cross-Entropy (all data):	 0.455871
Cross-Entropy (masked data):	 0.589988
The project is saved into :
 genotypes.snmfProject 

To load the project, use:
 project = load.snmfProject("genotypes.snmfProject")

To remove the project, use:
 remove.snmfProject("genotypes.snmfProject")

[1] 1493151524
[1] "*************************************"
[1] "*          create.dataset            *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)                 50
        -L (number of loci)                        400
        -s (seed random init)                      1493151524
        -r (percentage of masked data)             0.05
        -x (genotype file in .geno format)         /work/tmp/genotypes.geno
        -o (output file in .geno format)           /work/tmp/genotypes.snmf/masked/genotypes_I.geno

 Write genotype file with masked data, /work/tmp/genotypes.snmf/masked/genotypes_I.geno:		OK.

[1] "*************************************"
[1] "* sNMF K = 4  repetition 7      *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)             50
        -L (number of loci)                    400
        -K (number of ancestral pops)          4
        -x (input file)                        /work/tmp/genotypes.snmf/masked/genotypes_I.geno
        -q (individual admixture file)         /work/tmp/genotypes.snmf/K4/run7/genotypes_r7.4.Q
        -g (ancestral frequencies file)        /work/tmp/genotypes.snmf/K4/run7/genotypes_r7.4.G
        -i (number max of iterations)          200
        -a (regularization parameter)          10
        -s (seed random init)                  1493151524
        -e (tolerance error)                   1E-05
        -p (number of processes)               1
        - diploid

Read genotype file /work/tmp/genotypes.snmf/masked/genotypes_I.geno:		OK.


Main algorithm:
	[                                                                           ]
	[=======================]
Number of iterations: 61

Least-square error: 5476.770321
Write individual ancestry coefficient file /work/tmp/genotypes.snmf/K4/run7/genotypes_r7.4.Q:		OK.
Write ancestral allele frequency coefficient file /work/tmp/genotypes.snmf/K4/run7/genotypes_r7.4.G:	OK.

[1] "*************************************"
[1] "*    cross-entropy estimation       *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)         50
        -L (number of loci)                400
        -K (number of ancestral pops)      4
        -x (genotype file)                 /work/tmp/genotypes.geno
        -q (individual admixture)          /work/tmp/genotypes.snmf/K4/run7/genotypes_r7.4.Q
        -g (ancestral frequencies)         /work/tmp/genotypes.snmf/K4/run7/genotypes_r7.4.G
        -i (with masked genotypes)         /work/tmp/genotypes.snmf/masked/genotypes_I.geno
        - diploid

Cross-Entropy (all data):	 0.452084
Cross-Entropy (masked data):	 0.60964
The project is saved into :
 genotypes.snmfProject 

To load the project, use:
 project = load.snmfProject("genotypes.snmfProject")

To remove the project, use:
 remove.snmfProject("genotypes.snmfProject")

[1] 1128439139
[1] "*************************************"
[1] "*          create.dataset            *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)                 50
        -L (number of loci)                        400
        -s (seed random init)                      1128439139
        -r (percentage of masked data)             0.05
        -x (genotype file in .geno format)         /work/tmp/genotypes.geno
        -o (output file in .geno format)           /work/tmp/genotypes.snmf/masked/genotypes_I.geno

 Write genotype file with masked data, /work/tmp/genotypes.snmf/masked/genotypes_I.geno:		OK.

[1] "*************************************"
[1] "* sNMF K = 4  repetition 8      *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)             50
        -L (number of loci)                    400
        -K (number of ancestral pops)          4
        -x (input file)                        /work/tmp/genotypes.snmf/masked/genotypes_I.geno
        -q (individual admixture file)         /work/tmp/genotypes.snmf/K4/run8/genotypes_r8.4.Q
        -g (ancestral frequencies file)        /work/tmp/genotypes.snmf/K4/run8/genotypes_r8.4.G
        -i (number max of iterations)          200
        -a (regularization parameter)          10
        -s (seed random init)                  1128439139
        -e (tolerance error)                   1E-05
        -p (number of processes)               1
        - diploid

Read genotype file /work/tmp/genotypes.snmf/masked/genotypes_I.geno:		OK.


Main algorithm:
	[                                                                           ]
	[===================================]
Number of iterations: 93

Least-square error: 5457.741656
Write individual ancestry coefficient file /work/tmp/genotypes.snmf/K4/run8/genotypes_r8.4.Q:		OK.
Write ancestral allele frequency coefficient file /work/tmp/genotypes.snmf/K4/run8/genotypes_r8.4.G:	OK.

[1] "*************************************"
[1] "*    cross-entropy estimation       *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)         50
        -L (number of loci)                400
        -K (number of ancestral pops)      4
        -x (genotype file)                 /work/tmp/genotypes.geno
        -q (individual admixture)          /work/tmp/genotypes.snmf/K4/run8/genotypes_r8.4.Q
        -g (ancestral frequencies)         /work/tmp/genotypes.snmf/K4/run8/genotypes_r8.4.G
        -i (with masked genotypes)         /work/tmp/genotypes.snmf/masked/genotypes_I.geno
        - diploid

Cross-Entropy (all data):	 0.451802
Cross-Entropy (masked data):	 0.61466
The project is saved into :
 genotypes.snmfProject 

To load the project, use:
 project = load.snmfProject("genotypes.snmfProject")

To remove the project, use:
 remove.snmfProject("genotypes.snmfProject")

[1] 634541841
[1] "*************************************"
[1] "*          create.dataset            *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)                 50
        -L (number of loci)                        400
        -s (seed random init)                      634541841
        -r (percentage of masked data)             0.05
        -x (genotype file in .geno format)         /work/tmp/genotypes.geno
        -o (output file in .geno format)           /work/tmp/genotypes.snmf/masked/genotypes_I.geno

 Write genotype file with masked data, /work/tmp/genotypes.snmf/masked/genotypes_I.geno:		OK.

[1] "*************************************"
[1] "* sNMF K = 4  repetition 9      *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)             50
        -L (number of loci)                    400
        -K (number of ancestral pops)          4
        -x (input file)                        /work/tmp/genotypes.snmf/masked/genotypes_I.geno
        -q (individual admixture file)         /work/tmp/genotypes.snmf/K4/run9/genotypes_r9.4.Q
        -g (ancestral frequencies file)        /work/tmp/genotypes.snmf/K4/run9/genotypes_r9.4.G
        -i (number max of iterations)          200
        -a (regularization parameter)          10
        -s (seed random init)                  4929509137
        -e (tolerance error)                   1E-05
        -p (number of processes)               1
        - diploid

Read genotype file /work/tmp/genotypes.snmf/masked/genotypes_I.geno:		OK.


Main algorithm:
	[                                                                           ]
	[==================================]
Number of iterations: 90

Least-square error: 5454.829740
Write individual ancestry coefficient file /work/tmp/genotypes.snmf/K4/run9/genotypes_r9.4.Q:		OK.
Write ancestral allele frequency coefficient file /work/tmp/genotypes.snmf/K4/run9/genotypes_r9.4.G:	OK.

[1] "*************************************"
[1] "*    cross-entropy estimation       *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)         50
        -L (number of loci)                400
        -K (number of ancestral pops)      4
        -x (genotype file)                 /work/tmp/genotypes.geno
        -q (individual admixture)          /work/tmp/genotypes.snmf/K4/run9/genotypes_r9.4.Q
        -g (ancestral frequencies)         /work/tmp/genotypes.snmf/K4/run9/genotypes_r9.4.G
        -i (with masked genotypes)         /work/tmp/genotypes.snmf/masked/genotypes_I.geno
        - diploid

Cross-Entropy (all data):	 0.452119
Cross-Entropy (masked data):	 0.569406
The project is saved into :
 genotypes.snmfProject 

To load the project, use:
 project = load.snmfProject("genotypes.snmfProject")

To remove the project, use:
 remove.snmfProject("genotypes.snmfProject")

[1] 743103390
[1] "*************************************"
[1] "*          create.dataset            *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)                 50
        -L (number of loci)                        400
        -s (seed random init)                      743103390
        -r (percentage of masked data)             0.05
        -x (genotype file in .geno format)         /work/tmp/genotypes.geno
        -o (output file in .geno format)           /work/tmp/genotypes.snmf/masked/genotypes_I.geno

 Write genotype file with masked data, /work/tmp/genotypes.snmf/masked/genotypes_I.geno:		OK.

[1] "*************************************"
[1] "* sNMF K = 4  repetition 10      *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)             50
        -L (number of loci)                    400
        -K (number of ancestral pops)          4
        -x (input file)                        /work/tmp/genotypes.snmf/masked/genotypes_I.geno
        -q (individual admixture file)         /work/tmp/genotypes.snmf/K4/run10/genotypes_r10.4.Q
        -g (ancestral frequencies file)        /work/tmp/genotypes.snmf/K4/run10/genotypes_r10.4.G
        -i (number max of iterations)          200
        -a (regularization parameter)          10
        -s (seed random init)                  743103390
        -e (tolerance error)                   1E-05
        -p (number of processes)               1
        - diploid

Read genotype file /work/tmp/genotypes.snmf/masked/genotypes_I.geno:		OK.


Main algorithm:
	[                                                                           ]
	[=======================================]
Number of iterations: 103

Least-square error: 5478.247801
Write individual ancestry coefficient file /work/tmp/genotypes.snmf/K4/run10/genotypes_r10.4.Q:		OK.
Write ancestral allele frequency coefficient file /work/tmp/genotypes.snmf/K4/run10/genotypes_r10.4.G:	OK.

[1] "*************************************"
[1] "*    cross-entropy estimation       *"
[1] "*************************************"
summary of the options:

        -n (number of individuals)         50
        -L (number of loci)                400
        -K (number of ancestral pops)      4
        -x (genotype file)                 /work/tmp/genotypes.geno
        -q (individual admixture)          /work/tmp/genotypes.snmf/K4/run10/genotypes_r10.4.Q
        -g (ancestral frequencies)         /work/tmp/genotypes.snmf/K4/run10/genotypes_r10.4.G
        -i (with masked genotypes)         /work/tmp/genotypes.snmf/masked/genotypes_I.geno
        - diploid

Cross-Entropy (all data):	 0.454737
Cross-Entropy (masked data):	 0.53056
The project is saved into :
 genotypes.snmfProject 

To load the project, use:
 project = load.snmfProject("genotypes.snmfProject")

To remove the project, use:
 remove.snmfProject("genotypes.snmfProject")

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