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
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] 1 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 [int]
1 print out the covariance matrix.
Output
This function will print the sampled based *ibs.gz.
Example of output *.ibs.gz with -doMajorMinor and -output01 1
chr pos major minor ind0 ind1 ind2 ind3 ind4 ind5 ind6 ind7 1 14000873 A G 0 1 1 1 1 1 1 1 14001018 C T 0 1 1 1 1 1 1 1 14001867 G A 0 1 1 1 1 0 1 1 14002342 T C 1 1 1 1 1 -1 1 1 14002422 T A 0 1 1 1 1 0 -1 1 14003581 T C 0 1 1 1 1 1 1 1 14004623 C T 0 1 1 1 1 0 1 1 14006543 T G 0 -1 1 1 1 0 1 1 14007493 G A 0 0 1 -1 1 0 1 1 14007558 T C 0 0 1 1 -1 -1 1 1 14007649 A G 0 1 1 1 1 0 1 1 14008269 A G 1 1 0 -1 1 -1 1
Example of output *.ibs.gz with -doMajorMinor>0 and -output01 0
chr pos major minor ind0 ind1 ind2 ind3 ind4 ind5 ind6 ind7 1 13116 G T N G T T N G N T 1 13118 G A N G A A N G N A 1 14930 A G G G G A N N A N 1 15211 T G N G T G N N N G 1 54490 A G N G N G N N N N 1 54716 T C T C C C T N N N 1 58814 A G N G N G G G N N 1 62777 T A N N A N A A A N 1 63268 C T N T N T C N T N 1 63671 A G N G N N G G G N 1 69428 G T N G T N N T T N 1 69761 T A A A T A N A N N
Example of output *.ibs.gz with -doMajorMinor 0 and -output01 0
chr pos major ind0 ind1 ind2 ind3 ind4 ind5 ind6 ind7 ind8 1 13116 T N G T T N G N T T 1 13118 A N G A A N G N A A 1 14930 A G G G A N N A N G 1 15211 G N G T G N N N G G 1 54490 G N G N G N N N N A 1 54716 C T C C C T N N N C 1 58814 G N G N G G G N N G 1 62777 A N N A N A A A N A 1 63268 T N T N T C N T N N 1 63336 C C C C C C N C N N 1 63671 G N G N N G G G N N
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.