ANGSD: Analysis of next generation Sequencing Data
Latest tar.gz version is (0.938/0.939 on github), see Change_log for changes, and download it here.
PCA MDS: Difference between revisions
Line 45: | Line 45: | ||
;-minMinor [int] | ;-minMinor [int] | ||
Minimum observed minor alleles. The default in 0. If you do not use -doMajorMinor then the number of minor alleles are the sum of the 3 most uncommon alleles. | Minimum observed minor alleles. The default in 0. If you do not use -doMajorMinor then the number of minor alleles are the sum of the 3 most uncommon alleles. | ||
;--minFreq [float] | ;--minFreq [float] | ||
Minimum minor allele frequency. The default in 0. If you do not use -doMajorMinor then the frequency is the sum of the frequencies of the 3 most uncommon alleles. | Minimum minor allele frequency. The default in 0. If you do not use -doMajorMinor then the frequency is the sum of the frequencies of the 3 most uncommon alleles. | ||
;-output01 [int] | ;-output01 [int] | ||
output 0 and 1s instead of base | output the samples reads as 0 (for major) and 1s (for non major) instead of actual base | ||
;-maxMis [int] | |||
Maximum missing bases (per site) i.e. maximum number of uninformative individuals for the site | |||
-makeMatrix [int] | |||
prints out the pairwise IBS matrix. This is the avg. distance between pairs of individuals. Distance is zero if the base in the same and 1 otherwise. | |||
-doCov 0 print out the cov matrix | |||
==Use as a filter== | ==Use as a filter== |
Revision as of 15:32, 27 April 2016
single read sampling approach for PCA or MDS
This function is new and works from version 0.912 and in the latest developmental version from github
Brief Overview
./angsd -doIBS -> angsd version: 0.911-26-gf1cb0e0-dirty (htslib: 1.3-1-gc72ae90) build(Apr 27 2016 11:15:33) -> Analysis helpbox/synopsis information: -> Command: ../angsd/angsd -doIBS -> Wed Apr 27 12:38:35 2016 -------------- abcIBS.cpp: -doIBS 0 (Sampling strategies) 0: no IBS 1: (Sample single base) 2: (Concensus base) -doCounts 0 Must choose -doCount 1 Optional -minMinor 0 Minimum observed minor alleles -minFreq 0.000 Minimum minor allele frequency -output01 0 output 0 and 1s instead of based -maxMis -1 Maximum missing bases (per site) -doMajorMinor 0 use input files or data to select major and minor alleles -makeMatrix 0 print out the ibs matrix -doCov 0 print out the cov matrix
Options
- -doIBS [int]
Print a single base from each individual at each position. 1: random sampled read. 2: Consensus base
- doCounts [int]
Method requeres counting the different bases at each position. Therefore, -doCounts 1 must be used
- -doMajorMinor [int]
The covariance matrix can only be calculated for diallelic sites. Therefore, choose a methods for selecting the major and minor allele (see Inferring_Major_and_Minor_alleles). This can also be use if you only want to make this assumption for the IBS matrix or only want to print out bases that are either the major or minor.
- -minMinor [int]
Minimum observed minor alleles. The default in 0. If you do not use -doMajorMinor then the number of minor alleles are the sum of the 3 most uncommon alleles.
- --minFreq [float]
Minimum minor allele frequency. The default in 0. If you do not use -doMajorMinor then the frequency is the sum of the frequencies of the 3 most uncommon alleles.
- -output01 [int]
output the samples reads as 0 (for major) and 1s (for non major) instead of actual base
- -maxMis [int]
Maximum missing bases (per site) i.e. maximum number of uninformative individuals for the site
-makeMatrix [int] prints out the pairwise IBS matrix. This is the avg. distance between pairs of individuals. Distance is zero if the base in the same and 1 otherwise. -doCov 0 print out the cov matrix
Use as a filter
Sites with a p-value below the p-value threshold will be removed.
Output
This function will also print the results of the selected sites. If you choose -HWE_pval 1 then all sites (that pass other filters) will be outputted.
Example of output *.hwe.gz
Chromo Position Major Minor hweFreq Freq F LRT p-value 1 14000873 G A 0.282473 0.263594 0.674624 3.140936e+00 7.634997e-02 1 14015890 A G 0.283119 0.300032 0.999762 8.207572e+00 4.171594e-03 1 14018430 A C 0.276112 0.299817 0.675018 2.780118e+00 9.544113e-02 1 14033343 A G 0.295368 0.299442 0.999762 6.473824e+00 1.094747e-02 1 14037881 T A 0.306003 0.341598 -0.518384 3.178415e+00 7.461710e-02 1 14038946 T C 0.329113 0.333424 0.999775 6.925424e+00 8.497884e-03
Chromo is the chromosome
Position is the position Major is the major allele
Minor is the minor allele
hweFreq is the allele frequency assuming HWE (same as -doMaf 1)
Freq is the allele frequency without HWE assumption
F is the scale departure from HWE (inbreeding coefficient - see model)
LRT is the likelihood ratio statistic
p-value is the p-value based on a likelihood ratio test
Model
Probability of genotypes without assumption of HWE
- n
- total number of individuals
- X
- all sequencing data for a site
- f
- allele frequency
- F
- inbreeding coefficient*
- G
- true unobserved genotype
total likelihood
- NB! we allow for negative values of F in order to be able to detect any divination from HWE.