Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Annovar comes pre-packaged with human auxiliary data which is updated by the authors on a regular basis. It is a well-constructed package in that there is one core program annotate_variation.pl which can perform a variety of different types of annotation AND download the reference databases required, but the .

The authors have also included a wrapper script summarize_anovar.pl which runs a fairly comprehensive set of annotations automatically.

This next exercise will give you some idea of how Annovar works; we've taken the liberty of writing the bash script annovar_pipe.sh around the existing summarize_annovar.pl wrapper (a wrapper within a wrapper - a common trick) to even further simplify the process for this course.

Exercise:

First, look at the code for our annovar_pipe.sh command. Here is an easy one-liner to cat the contents of a script (note ` is a back-tick, not apostrophe):

Code Block
Launch Annovar on six vcf files: the first line simply creates the "commands" file
titlePrint annovar_pipe.sh

cat `which annovar_pipe.sh`

This script simply does a format conversion and then calls summarize_annovar.pl. Now let's run it on all the vcf files - you could simply edit the commands file and type in the 6 lines, or you can use this fancier command line that calls Perl to custom-create the 6 command lines needed and put them straight into commands:

Code Block
titleCreate the "commands" file to run annovar on six vcf files - use Perl to extract the sample name and mapper so the log files have meaningful, but shorter, names
ls $BI/ngs_course/human_variation/N*.vcf | \
  perl -n -e 'chomp; $_=~/(NA\d+).*(sam|GATK)/; print "annovar_pipe.sh $_ >$1.$2.log 2>&1\n";' \
  > commands
Code Block
titleCreate the submission script and submit
launcher_creator.py -l annovar.sge -n annovar -t 00:30:00 -j commands
qsub annovar.sge

...