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 3: | Line 3: | ||
Many of the examples in the individual subpages are based on this test data set. The examples below are just some random examples. | 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= | =Download and prepare= | ||
First download some | First download some test data of random small BAM files which contains some regions from different chromosomes for 10 samples from the 1000genomes project. The file size is around 100megabytes. | ||
<pre> | <pre> | ||
wget http://popgen.dk/software/download/angsd/bams.tar.gz | wget http://popgen.dk/software/download/angsd/bams.tar.gz | ||
Line 24: | Line 24: | ||
We make a file containing a list of the locations of the 10 bamfiles | We make a file containing a list of the locations of the 10 bamfiles | ||
<pre> | <pre> | ||
ls bams/*.bam > | ls bams/*.bam > bam.filelist | ||
</pre> | </pre> | ||
Revision as of 11:54, 3 January 2014
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 test data of random small BAM files which contains some regions from 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 a list of the locations of the 10 bamfiles
ls bams/*.bam > bam.filelist
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