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

From angsd
Revision as of 22:49, 17 December 2013 by Thorfinn (talk | contribs)
Jump to navigation Jump to search

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.

Many of the examples in the individual subpages are based on this test data set. The examples below are just some random examples.

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.