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.
Quick Start: Difference between revisions
Line 23: | Line 23: | ||
=Examples= | =Examples= | ||
==Calculate Allele frequencies== | |||
Assuming you have a list of bamfiles in in file: 'list.txt' and you want the genotype likelihoods for position 12500000 on chromosome 8. | Assuming you have a list of bamfiles in in file: 'list.txt' and you want the genotype likelihoods for position 12500000 on chromosome 8. | ||
Revision as of 22:42, 17 December 2013
This page contains some random examples that shows some aspect of the ANGSD program. There is also an old Tutorial, but this is somewhat outdated. We assume you will have SAMtools installed.
Download and prepare
First download some completely random small BAM files which contains some random region for some different chromosomes for 10 samples from the 1000genomes project. The file size is around 100megabytes.
wget http://popgen.dk/software/download/angsd/bams.tar.gz tar xf bams.tar.gz
This has made a folder called bams/, which contains our 10 samples. Now download and install angsd you can follow the guidelines at the Installation page which basicly says:
wget http://popgen.dk/software/download/angsd/angsd0.570.tar.gz tar xfz angsd0.570.tar.gz cd angsd0.570 make cd ..
We will also index the BAM files in case we need to do random access, for this we will use SAMtools.
for i in bams/*.bam;do samtools index $i;done
Examples
Calculate Allele frequencies
Assuming you have a list of bamfiles in in file: 'list.txt' and you want the genotype likelihoods for position 12500000 on chromosome 8.
./angsd -bam list.txt -GL 1 -r chr8:12500000 -out results -doGlf 1
This is using the SAMtools model for calculating genotype likelihoods (see genotype likelihoods for other models). Without the '-doGlf' parameter the genotype likelihoods will solely be estimated but will not be dumped. Therefore we also supply the '-doGlf 1' which will dump the genotype likelihoods as binary see GL outputs.