Post date: Aug 08, 2014 5:5:46 PM
I used GATK to perform local realignment around indels identified by bwa. The first command identifies these regions needing local realignment:
cd /home/A01963476/data/timema/timema_wgrs/assembliesExperiment/
java -Xmx12g -jar /rc/tools/free/redhat_6_x86_64/gatk-3.1.1/GenomeAnalysisTK.jar -nt 8 -T RealignerTargetCreator -R /labs/evolution/data/timema/draft_genome/draft0.3/mod_lg_timemaGenome.fasta -I aln_5_219_68110_unique.bam -o aln_5_219_68110_unique.intervals
Here nt 8 denotes 8 threads. You could do this with multiple bam files at once all included in a text file, i.e., bams.list, but this is VERY VERY SLOW, so I realigned one bam file = individual x lane at a time.
The second command performs the actual realignment:
cd /home/A01963476/data/timema/timema_wgrs/assembliesExperiment/
java -Xmx8g -jar /rc/tools/free/redhat_6_x86_64/gatk-3.1.1/GenomeAnalysisTK.jar -T IndelRealigner -R /labs/evolution/data/timema/draft_genome/draft0.3/mod_lg_timemaGenome.fasta -I aln_4_232_66562_unique.bam -targetIntervals aln_4_232_66562_unique.intervals -LOD 4.0 -o realn_4_232_66562_unique.bam
Here the LOD scores thresholds of 4.0 means that the new alignment must be four times better than the old alignment. This last command is currently running on all 2056 bam files on the dorc cluster.