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 29: | Line 29: | ||
=Examples= | =Examples= | ||
==Calculate Allele frequencies== | ==Calculate Allele frequencies== | ||
Assuming you have a list of bamfiles in in file: 'list' and you want the MAF using all reads and inferring the major and minor from the GL, we will use SAMtools genotype likelihoods, and will allow for 5 threads: See details on [[Allele Frequencies]]j, [[Major Minor]] and [[Genotype | Assuming you have a list of bamfiles in in file: 'list' and you want the MAF using all reads and inferring the major and minor from the GL, we will use SAMtools genotype likelihoods, and will allow for 5 threads: See details on [[Allele Frequencies]]j, [[Major Minor]] and [[Genotype Likelihoods]]. | ||
<div class="toccolours mw-collapsible mw-collapsed"> | <div class="toccolours mw-collapsible mw-collapsed"> |
Revision as of 17:18, 19 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.
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
We make a file containing the location of the 10 barflies
ls bams/*.bam >list
Examples
Calculate Allele frequencies
Assuming you have a list of bamfiles in in file: 'list' and you want the MAF using all reads and inferring the major and minor from the GL, we will use SAMtools genotype likelihoods, and will allow for 5 threads: See details on Allele Frequenciesj, Major Minor and Genotype Likelihoods.
./angsd0.570/angsd -b list -GL 1 -doMajorMinor 1 -doMaf 2 -P 5
-> angsd version: 0.570 build(Dec 17 2013 22:33:58) -> No '-out' argument given, output files will be called 'angsdput' -> Parsing 10 number of samples -> Printing at chr: 20 pos:14031904 chunknumber 900 -> Done reading data waiting for calculations to finish -> Calling destroy -> Done waiting for threads -> Output filenames: ->"angsdput.arg" ->"angsdput.mafs.gz" -> Thu Dec 19 17:12:42 2013 -> Arguments and parameters for all analysis are located in .arg file [ALL done] cpu-time used = 83.03 sec