NgsAdmix: Difference between revisions

From software
Jump to navigation Jump to search
 
(84 intermediate revisions by 4 users not shown)
Line 1: Line 1:
This will contain the program called NGSadmix, which is a very nice tool for finding admixture. It is based on genotype likelihoods or genotype probabilities.
NGSadmix is a tool for estimating individual admixture proportions from NGS data. It is based on genotype likelihoods and works well for medium and low coverage NGS data.  
It is a fancy multithreaded c/c++ program
It is a fancy multithreaded c/c++ program which makes it useful for large datasets.


=Installation=
The strengths of NGSadmix is that it takes the uncertainty introduced in NGS sequencing data into account when inferring an individual's ancestry by using genotype likelihoods that considers the uncertainty caused by unobserved genotypes.


<pre>
As with the other existing software, ADMIXTURE and STRUCTURE, NGSadmix can detect admixture recent enough to cause structure in the population in terms of differing allele frequencies. Historical admixture events after which many generations has passed in the population, leaves no signature in terms of systematic differences in allele frequencies between individuals.
wget popgen.dk/software/NGSadmix/ngsadmix32.cpp  
 
g++ ngsadmix32.cpp -O3 -lpthread -lz -o NGSadmix
 
</pre>
[[File:NgsAdmix.png|thumb]]
 
The method was published in 2013 and can be found here: [http://www.ncbi.nlm.nih.gov/pubmed/24026093]
 
 
 
==Download and Installation==
 
NGSadmix can be installed independently or as a part of ANGSD.
 
====NGSadmix Independent Installation====
 
1. Login to your server using ssh on your terminal window.
 
2. Create the directory where you will install your software and enter it, such as
:<code>mkdir ~/Software</code>
:<code>cd ~/Software</code>
 
3. Download the source code:
:<code>wget https://raw.githubusercontent.com/ANGSD/angsd/master/misc/ngsadmix32.cpp </code>
 
4. Configure, Compile and Install:
:<code>g++ ngsadmix32.cpp -O3 -lpthread -lz -o NGSadmix</code>
 
====NGSadmix Installation from ANGSD====
 
:NGSadmix is part of the package ANGSD. To install ANGSD, please follow the instructions here [http://popgen.dk/angsd/index.php/Installation]
 
 
 
====Older versions====
The previous versions of NGSadmix can be found here: [http://popgen.dk/software/download/NGSadmix/].
The first stable version of NGSadmix is ngsadmix32 from June 25., 2013
:Version Log:
:* v32 june 25-2013; modified code such that it now compiles on OSX
:* v31 june 24-2013; First public version.
 
==Quick start==
:<code> ./NGSadmix -likes inputBeagleFile.gz -K 3 -o outFileName -P 10  </code>
 
* '''-likes''' beagle file of genotype likelihoods
* '''-K''' number of clusters
* '''-o''' prefix of output file names
* '''-P''' Number of threads used
 
==Parameters==
 
All parameters are set using '''-par value'''.
For example, to get additional information, you would write '''-printInfo 1'''.


=Input Files=
<pre>./NGSadmix  </pre>
The current input files are the widely used beagle inputfiles, or beagle imputed outputfiles [http://faculty.washington.edu/browning/beagle/beagle.html]. We recommend [[ANGSD]] for easy transformation of Next-generation sequencing data to beagle format.


=Options=
<pre>
./NGSadmix
Arguments:
Arguments:
-likes Beagle likelihood filename
 
-K Number of ancestral populations
::'''-likes''' .beagle format filename with genotype likelihoods
 
::'''-K''' Number of ancestral populations
 
Optional:
Optional:
-fname Ancestral population frequencies
 
-qname Admixture proportions
::'''-fname''' Ancestral population frequencies
-outfiles Prefix for output files
 
-printInfo print ID and mean maf for the SNPs that were analysed
::'''-qname''' Admixture proportions
 
::'''-outfiles''' Prefix for output files
 
::'''-printInfo''' print ID and mean maximum allele frequency (maf) for the SNPs that were analysed
 
Setup:
Setup:
-seed Seed for initial guess in EM
-P Number of threads
-method If 0 no acceleration of EM algorithm
-misTol Tolerance for considering site as missing
Stop chriteria:
-tolLike50 Loglikelihood difference in 50 iterations
-tol Tolerance for convergence
-dymBound Use dymamic boundaries (1: yes (default) 0: no)
-maxiter Maximum number of EM iterations
Filtering
-minMaf Minimum minor allele frequency
-minLrt Minimum likelihood ratio value for maf>0
-minInd Minumum number of informative individuals


</pre>
::'''-seed''' Seed for initial guess in EM algorithm (a number lower than 1M is preferred).
=Output Files=
::The same seed can be used to reproduce the analysis, and 3 different seeds can be used to test convergence.
Program outputs 3 files.
 
::'''-P''' Number of threads
 
::'''-method''' 0 indicates no acceleration of EM algorithm. Please refer to the paper for more information.
 
::'''-misTol''' Tolerance for considering a site as missing. Default = 0.05.
::To include high quality genotypes only, increase this value (for example, 0.9)
 
Stop criteria:
 
::'''-tolLike50''' Loglikelihood difference in 50 iterations. Default= 0.1
 
::'''-tol''' Tolerance for convergence. Default = 1x10<sup>-5</sup>. Use maller values for higher accuracy.
::It's the maximum squared difference of F and Q (please refer to the paper for formula).
 
::'''-dymBound''' Use dymamic boundaries (1: yes (default) 0: no).


#  PREFIX.log
#  PREFIX.fopt.gz
# PREFIX.qopt


* The log file contains log information of the run. Commandline used for running the program, what the likelihood is every 50 iterations, and finally how long it took to do the run.
::'''-maxiter''' Maximum number of EM iterations. Default = 2000 (high value).
::In case it doesn't converge, this value needs to be higher.


* The fopt.gz file is an compressed file, which contains an estimate of the frequency for each site for all populations.
Filtering:


* The qopt file contains the admixture proportions for all individuals.
::'''-minMaf''' Minimum minor allele frequency. Default = 5%


Examples of the output files are found below.
::'''-minLrt''' Minimum likelihood ratio value for maf>0. Default = 0


::'''-minInd''' Minumum number of informative individuals. Default = 0
::It only keeps sites where there is at least x # of individuals with NGS data.


==Log file==
==Input File==
<div class="toccolours mw-collapsible mw-collapsed">
Contents of the file log file
<pre class="mw-collapsible-content">
-> Dumping file: tskSim/tsk6GL.beagle.s1.log
-> Dumping file: tskSim/tsk6GL.beagle.s1.filter
Input: lname=tskSim/tsk6GL.beagle nPop=3, fname=(null) qname=(null) outfiles=tskSim/tsk6GL.beagle.s1
Setup: seed=1 nThreads=10 method=1
Convergence: maxIter=2000 tol=0.000000 tolLike50=0.010000 dymBound=0
Filters: misTol=0.050000 minMaf=0.000000 minLrt=0.000000 minInd=0
Input file has dim: nsites=100000 nind=75
Input file has dim (AFTER filtering): nsites=100000 nind=75
iter[start] like is=9299805.984931
iter[50] like is=-6531138.892608 thres=0.002800
iter[100] like is=-6528710.773349 thres=0.001289
iter[150] like is=-6528405.896951 thres=0.001211
iter[200] like is=-6528306.803820 thres=0.000420
iter[250] like is=-6528277.160993 thres=0.000546
iter[300] like is=-6528271.925055 thres=0.000033
iter[350] like is=-6528271.177692 thres=0.000008
iter[400] like is=-6528270.876315 thres=0.000005
iter[450] like is=-6528270.772894 thres=0.000140
iter[500] like is=-6528270.747721 thres=0.000002
iter[550] like is=-6528270.740654 thres=0.000002
Convergence achived because log likelihooditer difference for 50 iteraction is less than 0.010000
best like=-6528270.740654 after 550 iterations
-> Dumping file: tskSim/tsk6GL.beagle.s1.qopt
-> Dumping file: tskSim/tsk6GL.beagle.s1.fopt.gz
[ALL done] cpu-time used = 671.82 sec
[ALL done] walltime used = 114.00 sec
</pre>
</div>


==fopt file==
The input file contains genotype likelihoods in a .beagle file format [http://faculty.washington.edu/browning/beagle/beagle.html].
<div class="toccolours mw-collapsible mw-collapsed">
and can be compressed with gzip.
Contents of the fopt file
=== BAM files  ===
<pre class="mw-collapsible-content">
If you have BAM files you can use [[ANGSD]] to produce genotype likelihoods in .beagle format. Please
...
see [http://www.popgen.dk/angsd/index.php/Beagle_input Creation of Beagle files with ANGSD]
0.75331646167520038837 0.51190946588401886608 0.50134051056701267601
0.99999999900000002828 0.80165850924934911603 0.97470665326916294813
0.99999999900000002828 0.89560828888972687789 0.88062641752218895341
0.99999999900000002828 0.99999999900000002828 0.86109994249930577048
0.70560445653074521655 0.78994686954000448154 0.93076614062025020413
0.99999999900000002828 0.88878537780630872955 0.92662857068149151463
0.05322676762098016434 0.22871739860812340117 0.17394852600322696645
0.00000000100000000000 0.27428885137150410545 0.19029599645013275944
0.57086006389212373691 0.42232596591112880891 0.74080063581586474974
0.77359733910003525281 0.47380864146016693494 0.72073560889718923939
0.49946404159405927148 0.21684946347150244050 0.15201985942558055021
0.41802171086717271331 0.55490556205954566504 0.85691127728452165524
0.77095213528720529794 0.60074618451005279418 0.70219544996184157792
0.26517850405564091787 0.48500265408436060710 0.85432254709914456914
0.80055081986260245852 0.74423201242010783574 0.87110476762969968334
0.30563054476851375663 0.05233529475348827620 0.25911912824038613179
0.51084997710733415222 0.62263692178557350498 0.50738250264097506381
0.64790272562679740442 0.91230541484222271720 0.73015721390331478347
0.07124629651164265942 0.37896482494356753534 0.29218012479334326548
0.00000000100000000000 0.26969100790961914038 0.28395781874856029781
0.97074775756045073027 0.79093498372643300520 0.64006920058897498471
0.64661948716978157048 0.84130009558421925409 0.76730057769159087933
0.86990900887920663553 0.79410745692063922085 0.69416721874359499367
0.34956069940263900797 0.27773038429396151860 0.25923476721423144298
0.77739744690560164120 0.51272232330145017798 0.53888718200036844763
0.35431569298041332150 0.20022780744715171219 0.43176580786072032980
0.91858160919413811563 0.99999999900000002828 0.93584179237779097082
0.90339823126358831384 0.94729687041528465308 0.84358671720630329371
0.87068129661127857677 0.65267891763324525911 0.59315740612546075106
0.24102496839012735319 0.42777100607917967201 0.39594098602469629533
0.99999999900000002828 0.99999999900000002828 0.78549330115836857313
0.15386277372522660922 0.18035502891341426146 0.26583557049163752950
0.22456748943597096280 0.25110807159057474403 0.17244618960511531869
0.74816053649164548922 0.54769319158907958656 0.44532166240679449398
0.76350303696805599252 0.86547244122202959815 0.94111974586621383043
0.40940400475566068872 0.67767095908245833513 0.40793761498610620064
0.85389765162910868934 0.78901563183853873351 0.93614065916219291186
0.54108661985898742763 0.61895909938546000983 0.88522763262549941654
0.99051495581855464323 0.78855843624128341141 0.77646441702623147929
0.51133721761171413434 0.74521610846562824637 0.32689774480116673416
0.66618479413060949224 0.67891474309775079465 0.80762116232856140385
0.81793598261160704865 0.77752326447671193943 0.95349025244041396565
0.82120324647844433752 0.99999999900000002828 0.89800731971059466474
...
</pre>
</div>
There is currently no way to know the position of the lines of the fopt file if some sites have been flltered from the analysis (-minMaf, minInd, minLRT etc)


==fopt file==
=== VCF files ===
<div class="toccolours mw-collapsible mw-collapsed">
If you already have made a VCF file that contains genotype likehood information then it should be possible to convert .vcf files with genotype likelihoods to .beagle file via vcftools [https://vcftools.github.io/man_latest.html]
Contents of the qopt file # cat tsk3GL.beagle.s2.qopt
<pre class="mw-collapsible-content">
0.00000000099999999999 0.99999999800000005656 0.00000000099999999999
0.00000000099999999999 0.99999999799999994554 0.00000000099999999999
0.00000000099999999999 0.99999999799999994554 0.00000000099999999999
0.00000000099999999998 0.99999999799999994554 0.00000000099999999998
0.00000000099999999999 0.99999999800000005656 0.00000000099999999999
0.00000000099999999999 0.99999999799999994554 0.00000000099999999999
0.00000000099999999998 0.99999999800000005656 0.00000000099999999998
0.00000000099999999998 0.99999999800000005656 0.00000000099999999998
0.00000000099999999999 0.99999999799999994554 0.00000000099999999999
0.00000000099999999998 0.99999999799999994554 0.00000000099999999998
0.00000000099999999999 0.00000000099999999999 0.99999999800000005656
0.00000000099999999999 0.00000000099999999999 0.99999999800000005656
0.00000000099999999999 0.00000000099999999999 0.99999999800000005656
0.00000000099999999999 0.00000000099999999999 0.99999999800000005656
0.00000000099999999999 0.00000000099999999999 0.99999999800000005656
0.00000000100000000000 0.00000000100000000000 0.99999999800000005656
0.00000000100000000000 0.00000000100000000000 0.99999999799999994554
0.00000000099999999999 0.00000000099999999999 0.99999999799999994554
0.00000000099999999999 0.00000000099999999999 0.99999999800000005656
0.00000000099999999998 0.00000000099999999998 0.99999999800000005656
0.99999999799999994554 0.00000000099999999998 0.00000000099999999998
0.99999999799999994554 0.00000000099999999999 0.00000000099999999999
0.99999999800000005656 0.00000000099999999998 0.00000000099999999998
0.99999999800000005656 0.00000000099999999999 0.00000000099999999999
0.99999999799999994554 0.00000000099999999998 0.00000000099999999998
0.99999999800000005656 0.00000000099999999997 0.00000000099999999997
0.99999999799999994554 0.00000000099999999998 0.00000000099999999998
0.99999999799999994554 0.00000000099999999998 0.00000000099999999998
0.99999999800000005656 0.00000000099999999998 0.00000000099999999998
0.99999999800000005656 0.00000000099999999998 0.00000000099999999998
0.44943768488869317856 0.41637900975786718005 0.13418330535343961363
0.47186367326154465829 0.42914964755124906937 0.09898667918720621683
0.46619918726700892986 0.38687204966896221459 0.14692876306402888331
0.46354437118930408301 0.40881857587008219035 0.12763705294061369888
0.45264535107721121099 0.41651331006337249940 0.13084133885941623410
0.40932662855941681634 0.36477521833198955914 0.22589815310859343023
0.39608002688940713298 0.36869218630330241604 0.23522778680729045098
0.39304099203400788554 0.36663653899437026462 0.24032246897162179433
0.39911937105983025242 0.37389960053391524397 0.22698102840625450360
0.39092771268619924685 0.35969519959821749655 0.24937708771558322884
0.34274262701666824427 0.33331325906604786224 0.32394411391728383798
0.34622392335992407952 0.31117372685925065445 0.34260234978082515500
0.36985984530580445773 0.28437303864342194926 0.34576711605077359302
0.34804143030185941132 0.33320171229649653277 0.31875685740164411142
0.32407237526064275324 0.34027116723473044280 0.33565645750462674846
0.28469849506708616582 0.30226647920831278826 0.41303502572460099040
0.31135738016083241986 0.28468835604445524856 0.40395426379471233158
0.30218663019413083415 0.25900355534445085315 0.43880981446141842373
0.31011059343113106523 0.27004727407307288489 0.41984213249579616090
0.29539308688690751881 0.26676206410012109904 0.43784484901297143766
0.25367119636935991922 0.23716915741045718757 0.50915964622018294872
0.24505013582826862262 0.26225101108896364810 0.49269885308276778479
0.23718598793000850167 0.27299881774859108274 0.48981519432140036008
0.24951870566854128519 0.24237250904076637625 0.50810878529069236631
0.23352168811501466950 0.27256392034385162892 0.49391439154113375709
0.22072760551069600665 0.18807146366485538724 0.59120093082444857835
0.20165105305591241036 0.21322142854316492033 0.58512751840092280808
0.19519805052535590950 0.15138471360822350342 0.65341723586642053156
0.19534378883681183248 0.20162790752303333397 0.60302830364015480580
0.20238951172887570396 0.22222668638306158906 0.57538380188806270699
0.15279240264333296406 0.14309387185793090436 0.70411372549873607607
0.16100786962332866437 0.13804093967765596052 0.70095119069901545839
0.15236995575600070785 0.15690823378806481592 0.69072181045593450399
0.13511175034410827234 0.17826273138113590822 0.68662551827475581945
0.15053185641660885019 0.13684961152751642932 0.71261853205587477600
0.08227475031000705541 0.11820319734260385791 0.79952205234738904505
0.10752144811289739146 0.10824453011896040255 0.78423402176814216435
0.05058595423834794796 0.13728840870228020687 0.81212563705937179659
0.08815267889176078842 0.15395244513438488543 0.75789487597385429840
0.10406527302537364743 0.09764688441014507392 0.79828784256448126477
0.04451783049237752893 0.00000000100000000000 0.95548216850762246466
0.00159304110901842245 0.00000000100000000000 0.99840695789098143909
0.02104265004540380873 0.10109817256862485557 0.87785917738597141202
0.00000000100000000000 0.00000000100000000000 0.99999999800000005656
0.00000075082077831480 0.00121780838207670200 0.99878144079714503700
</pre>
</div>


=Plot results=
Use R
<pre>
<pre>
admix<-t(as.matrix(read.table("tsk48GL.beagle.gz.s1.qopt")))
vcftools --vcf input.vcf --out test --BEAGLE-GL --chr 1,2
barplot(admix,col=1:3,space=0,border=NA)
</pre>
</pre>
[[File:wikires1.png|thumb|Infered IBD sharing across a chromosome for a sib pair estimated using affy 500k data]]
Chromosome has to be specified.
 
You can also use bcftools' [https://samtools.github.io/bcftools/bcftools.html] 'query' option for generating a .beagle file from a .vcf file.
 
==Output Files==
The analysis performed by NGSadmix produces 4 files:
 
* Log likelihood of the estimates: a .log file that summarizes the run. The Command line used for running the program, what the likelihood is every 50 iterations, and finally how long it took to do the run.
 
* Estimated allele frequency: a zipped .fopt file, that contains an estimate of the allele frequency in each of the 3 assumed ancestral populations. There is a line for each locus.
 
* Estimated admixture proportions: a .qopt file, that contains an estimate of the individual's ancestry proportion (admixture) from each of the three assumed ancestral populations for all individuals. There is a line for each individual.
 
==Run command example==
 
Download the input file
::<code>wget popgen.dk/software/download/NGSadmix/data/input.gz</code>
 
Execute NGSadmix
::<code>./NGSadmix -likes input.gz -K 3 -P 4 -o myoutfiles -minMaf 0.05</code>
 
::Input file = input.gz
::Ancestral Populations K=3
::Computer cores = 4 (-P 4).
::Output prefix = myoutfiles (-o myoutfiles)
::SNPs with MAF > 5%  (-minMaf 0.05)
 
===Detailed Examples and Tutorial===
 
Please refer to the tutorial's page [http://www.popgen.dk/software/index.php/NgsAdmixTutorial]
 
==Citation==
 
http://www.genetics.org/content/early/2013/09/03/genetics.113.154138.full.pdf
 
Skotte, L., Korneliussen, T. S., & Albrechtsen, A. (2013). Estimating individual admixture proportions from next generation sequencing data. Genetics, 195(3), 693–702. doi:10.1534/genetics.113.154138


=log=
:<u>'''Bibtex'''</u>
* v32 june 25-2013; modified code such that it now compiles on OSX
:% 24026093
* v31 june 24-2013; First public version.
:@Article{pmid24026093,
:  Author="Skotte, L.  and Korneliussen, T. S.  and Albrechtsen, A. ",
:  Title="{{E}stimating {I}ndividual {A}dmixture {P}roportions from {N}ext {G}eneration {S}equencing {D}ata}",
:  Journal="Genetics",
:  Year="2013",
:  Pages=" ",
:  Month="Sep"
:}

Latest revision as of 14:09, 23 July 2019

NGSadmix is a tool for estimating individual admixture proportions from NGS data. It is based on genotype likelihoods and works well for medium and low coverage NGS data. It is a fancy multithreaded c/c++ program which makes it useful for large datasets.

The strengths of NGSadmix is that it takes the uncertainty introduced in NGS sequencing data into account when inferring an individual's ancestry by using genotype likelihoods that considers the uncertainty caused by unobserved genotypes.

As with the other existing software, ADMIXTURE and STRUCTURE, NGSadmix can detect admixture recent enough to cause structure in the population in terms of differing allele frequencies. Historical admixture events after which many generations has passed in the population, leaves no signature in terms of systematic differences in allele frequencies between individuals.


The method was published in 2013 and can be found here: [1]


Download and Installation

NGSadmix can be installed independently or as a part of ANGSD.

NGSadmix Independent Installation

1. Login to your server using ssh on your terminal window.

2. Create the directory where you will install your software and enter it, such as

mkdir ~/Software
cd ~/Software

3. Download the source code:

wget https://raw.githubusercontent.com/ANGSD/angsd/master/misc/ngsadmix32.cpp

4. Configure, Compile and Install:

g++ ngsadmix32.cpp -O3 -lpthread -lz -o NGSadmix

NGSadmix Installation from ANGSD

NGSadmix is part of the package ANGSD. To install ANGSD, please follow the instructions here [2]


Older versions

The previous versions of NGSadmix can be found here: [3]. The first stable version of NGSadmix is ngsadmix32 from June 25., 2013

Version Log:
  • v32 june 25-2013; modified code such that it now compiles on OSX
  • v31 june 24-2013; First public version.

Quick start

./NGSadmix -likes inputBeagleFile.gz -K 3 -o outFileName -P 10
  • -likes beagle file of genotype likelihoods
  • -K number of clusters
  • -o prefix of output file names
  • -P Number of threads used

Parameters

All parameters are set using -par value. For example, to get additional information, you would write -printInfo 1.

./NGSadmix  

Arguments:

-likes .beagle format filename with genotype likelihoods
-K Number of ancestral populations

Optional:

-fname Ancestral population frequencies
-qname Admixture proportions
-outfiles Prefix for output files
-printInfo print ID and mean maximum allele frequency (maf) for the SNPs that were analysed

Setup:

-seed Seed for initial guess in EM algorithm (a number lower than 1M is preferred).
The same seed can be used to reproduce the analysis, and 3 different seeds can be used to test convergence.
-P Number of threads
-method 0 indicates no acceleration of EM algorithm. Please refer to the paper for more information.
-misTol Tolerance for considering a site as missing. Default = 0.05.
To include high quality genotypes only, increase this value (for example, 0.9)

Stop criteria:

-tolLike50 Loglikelihood difference in 50 iterations. Default= 0.1
-tol Tolerance for convergence. Default = 1x10-5. Use maller values for higher accuracy.
It's the maximum squared difference of F and Q (please refer to the paper for formula).
-dymBound Use dymamic boundaries (1: yes (default) 0: no).


-maxiter Maximum number of EM iterations. Default = 2000 (high value).
In case it doesn't converge, this value needs to be higher.

Filtering:

-minMaf Minimum minor allele frequency. Default = 5%
-minLrt Minimum likelihood ratio value for maf>0. Default = 0
-minInd Minumum number of informative individuals. Default = 0
It only keeps sites where there is at least x # of individuals with NGS data.

Input File

The input file contains genotype likelihoods in a .beagle file format [4]. and can be compressed with gzip.

BAM files

If you have BAM files you can use ANGSD to produce genotype likelihoods in .beagle format. Please see Creation of Beagle files with ANGSD

VCF files

If you already have made a VCF file that contains genotype likehood information then it should be possible to convert .vcf files with genotype likelihoods to .beagle file via vcftools [5]

vcftools --vcf input.vcf --out test --BEAGLE-GL --chr 1,2

Chromosome has to be specified.

You can also use bcftools' [6] 'query' option for generating a .beagle file from a .vcf file.

Output Files

The analysis performed by NGSadmix produces 4 files:

  • Log likelihood of the estimates: a .log file that summarizes the run. The Command line used for running the program, what the likelihood is every 50 iterations, and finally how long it took to do the run.
  • Estimated allele frequency: a zipped .fopt file, that contains an estimate of the allele frequency in each of the 3 assumed ancestral populations. There is a line for each locus.
  • Estimated admixture proportions: a .qopt file, that contains an estimate of the individual's ancestry proportion (admixture) from each of the three assumed ancestral populations for all individuals. There is a line for each individual.

Run command example

Download the input file

wget popgen.dk/software/download/NGSadmix/data/input.gz

Execute NGSadmix

./NGSadmix -likes input.gz -K 3 -P 4 -o myoutfiles -minMaf 0.05
Input file = input.gz
Ancestral Populations K=3
Computer cores = 4 (-P 4).
Output prefix = myoutfiles (-o myoutfiles)
SNPs with MAF > 5% (-minMaf 0.05)

Detailed Examples and Tutorial

Please refer to the tutorial's page [7]

Citation

http://www.genetics.org/content/early/2013/09/03/genetics.113.154138.full.pdf

Skotte, L., Korneliussen, T. S., & Albrechtsen, A. (2013). Estimating individual admixture proportions from next generation sequencing data. Genetics, 195(3), 693–702. doi:10.1534/genetics.113.154138

Bibtex
% 24026093
@Article{pmid24026093,
Author="Skotte, L. and Korneliussen, T. S. and Albrechtsen, A. ",
Title="{{E}stimating {I}ndividual {A}dmixture {P}roportions from {N}ext {G}eneration {S}equencing {D}ata}",
Journal="Genetics",
Year="2013",
Pages=" ",
Month="Sep"
}