mkatari-bioinformatics-august-2013-gatknotes
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
mkatari-bioinformatics-august-2013-gatknotes [2014/10/09 13:16] – mkatari | mkatari-bioinformatics-august-2013-gatknotes [2016/08/17 08:37] (current) – mkatari | ||
---|---|---|---|
Line 12: | Line 12: | ||
module load bowtie2 | module load bowtie2 | ||
module load samtools | module load samtools | ||
+ | module load picard | ||
bowtie2-build PTC_Human.fasta PTC_Human | bowtie2-build PTC_Human.fasta PTC_Human | ||
samtools faidx PTC_Human.fasta | samtools faidx PTC_Human.fasta | ||
- | java -jar / | + | picard CreateSequenceDictionary \ |
| | ||
| | ||
Line 36: | Line 37: | ||
< | < | ||
- | bowtie2 -x PTC_Human -U Cohen.fastq -S Cohen.sam | + | bowtie2 -x PTC_Human -U Sample1.fastq -S Sample1.sam |
- | samtools view -bS Cohen.sam > Cohen.bam | + | samtools view -bS Sample1.sam > Sample1.bam |
+ | |||
+ | bowtie2 -x PTC_Human -U Sample2.fastq -S Sample2.sam | ||
+ | samtools view -bS Sample2.sam > Sample2.bam | ||
+ | |||
+ | bowtie2 -x PTC_Human -U Sample3.fastq -S Sample3.sam | ||
+ | samtools view -bS Sample3.sam > Sample3.bam | ||
+ | |||
+ | bowtie2 -x PTC_Human -U Sample4.fastq -S Sample4.sam | ||
+ | samtools view -bS Sample4.sam > Sample4.bam | ||
</ | </ | ||
Line 43: | Line 53: | ||
< | < | ||
- | mkdir /var/ | + | module load picard/1.133 |
- | mkdir / | + | |
+ | picard SortSam INPUT=Sample1.bam OUTPUT=Sample1.sorted.bam \ | ||
+ | SORT_ORDER=coordinate | ||
+ | |||
+ | picard SortSam INPUT=Sample2.bam OUTPUT=Sample2.sorted.bam \ | ||
+ | SORT_ORDER=coordinate | ||
+ | |||
+ | picard SortSam INPUT=Sample3.bam OUTPUT=Sample3.sorted.bam \ | ||
+ | SORT_ORDER=coordinate | ||
+ | |||
+ | picard SortSam INPUT=Sample4.bam OUTPUT=Sample4.sorted.bam \ | ||
+ | SORT_ORDER=coordinate | ||
- | java -Djava.io.tmpdir=/ | ||
- | | ||
- | | ||
- | | ||
- | |||
</ | </ | ||
Line 57: | Line 73: | ||
< | < | ||
+ | picard AddOrReplaceReadGroups \ | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
- | java -Djava.io.tmpdir=/ | + | picard AddOrReplaceReadGroups \ |
- | | + | |
- | | + | |
- | RGLB=Cohen \ | + | RGLB=Sample2 |
| | ||
| | ||
- | RGSM=Cohen | + | RGSM=Sample2 |
+ | |||
+ | picard AddOrReplaceReadGroups \ | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | picard AddOrReplaceReadGroups \ | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
</ | </ | ||
Line 70: | Line 111: | ||
< | < | ||
- | java -Djava.io.tmpdir=/ | + | picard MarkDuplicates \ |
- | | + | |
- | | + | |
- | | + | |
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | |||
+ | picard | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | picard | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | picard MarkDuplicates | ||
+ | | ||
+ | | ||
+ | | ||
| | ||
| | ||
Line 82: | Line 148: | ||
Index the files and realign them | Index the files and realign them | ||
< | < | ||
- | samtools index Cohen.dedup.bam | + | samtools index Sample1.dedup.bam |
+ | samtools index Sample2.dedup.bam | ||
+ | samtools index Sample3.dedup.bam | ||
+ | samtools index Sample4.dedup.bam | ||
# | # | ||
- | java -Xmx2g -Djava.io.tmpdir=/var/ | + | |
+ | module load gatk/3.3.0 | ||
+ | |||
+ | GenomeAnalysisTK \ | ||
-T RealignerTargetCreator \ | -T RealignerTargetCreator \ | ||
-R PTC_Human.fasta \ | -R PTC_Human.fasta \ | ||
- | | + | |
- | | + | |
+ | GenomeAnalysisTK \ | ||
+ | -T IndelRealigner \ | ||
+ | -R PTC_Human.fasta \ | ||
+ | -I Sample1.dedup.bam \ | ||
+ | | ||
+ | -o Sample1.dedup.realign.bam | ||
+ | |||
+ | GenomeAnalysisTK \ | ||
+ | -T RealignerTargetCreator \ | ||
+ | -R PTC_Human.fasta \ | ||
+ | -I Sample2.dedup.bam \ | ||
+ | -o Sample2forIndelRealigner.intervals | ||
+ | |||
+ | GenomeAnalysisTK \ | ||
+ | -T IndelRealigner \ | ||
+ | -R PTC_Human.fasta \ | ||
+ | -I Sample2.dedup.bam \ | ||
+ | | ||
+ | -o Sample2.dedup.realign.bam | ||
+ | |||
+ | |||
+ | GenomeAnalysisTK \ | ||
+ | -T RealignerTargetCreator \ | ||
+ | -R PTC_Human.fasta \ | ||
+ | -I Sample3.dedup.bam \ | ||
+ | -o Sample3forIndelRealigner.intervals | ||
- | | + | GenomeAnalysisTK \ |
+ | -T IndelRealigner \ | ||
+ | -R PTC_Human.fasta \ | ||
+ | -I Sample3.dedup.bam \ | ||
+ | -targetIntervals Sample3forIndelRealigner.intervals \ | ||
+ | -o Sample3.dedup.realign.bam | ||
+ | |||
+ | GenomeAnalysisTK | ||
+ | -T RealignerTargetCreator \ | ||
+ | -R PTC_Human.fasta \ | ||
+ | -I Sample4.dedup.bam \ | ||
+ | -o Sample4forIndelRealigner.intervals | ||
+ | |||
+ | |||
+ | GenomeAnalysisTK | ||
-T IndelRealigner \ | -T IndelRealigner \ | ||
-R PTC_Human.fasta \ | -R PTC_Human.fasta \ | ||
- | | + | |
- | -targetIntervals | + | |
- | | + | |
</ | </ | ||
Line 105: | Line 217: | ||
< | < | ||
- | java -Djava.io.tmpdir=/ | + | picard CleanSam \ |
- | | + | |
- | | + | |
</ | </ | ||
Line 113: | Line 225: | ||
< | < | ||
- | java -Djava.io.tmpdir=/ | + | picard MergeSamFiles \ |
- | | + | |
- | | + | INPUT=Sample2.dedup.realign.bam |
- | | + | |
+ | | ||
+ | | ||
- | samtools sort ShermanCohenMerged.bam ShermanCohenMerged.sorted | + | picard SortSam INPUT=AllMerged.bam OUTPUT=AllMerged.sorted.bam SORT_ORDER=coordinate |
+ | |||
+ | samtools index AllMerged.sorted.bam | ||
- | samtools index ShermanCohenMerged.sorted.bam | ||
</ | </ | ||
Line 127: | Line 242: | ||
< | < | ||
- | java -Djava.io.tmpdir=/ | + | GenomeAnalysisTK -T UnifiedGenotyper \ |
- | -T UnifiedGenotyper \ | + | |
- | | + | |
-R PTC_Human.fasta \ | -R PTC_Human.fasta \ | ||
| | ||
Line 146: | Line 260: | ||
If you would like to generate a table of from the vcf file use the following command | If you would like to generate a table of from the vcf file use the following command | ||
< | < | ||
- | java --Djava.io.tmpdir=/ | + | GenomeAnalysisTK \ |
- | -R PTC_Human.fasta | + | -R PTC_Human.fasta |
-T VariantsToTable \ | -T VariantsToTable \ | ||
-V PTC_human.gatk.vcf \ | -V PTC_human.gatk.vcf \ | ||
Line 158: | Line 272: | ||
< | < | ||
- | java -Xmx2g -jar / | + | GenomeAnalysisTK \ |
- | -R / | + | -R PTC_Human.fasta \ |
-T VariantFiltration \ | -T VariantFiltration \ | ||
- | -o namikonga_albert_filter.vcf \ | + | -o PTC_human.gatk.filter.vcf \ |
- | --variant | + | --variant |
- | --filterExpression "QD < 2.0 || MQ < 40.0 || FS > 60.0 || HaplotypeScore > | + | --filterExpression " |
- | --filterName | + | --filterName mannyfilter |
</ | </ | ||
+ | |||
+ | Good descriptions of the different information on vcf files [[https:// | ||
Finally to save the SNPs that passed your filter, you simply use the selectvariant tool. | Finally to save the SNPs that passed your filter, you simply use the selectvariant tool. | ||
Line 172: | Line 288: | ||
< | < | ||
- | java -Xmx2g -jar / | + | GenomeAnalysisTK \ |
-T SelectVariants \ | -T SelectVariants \ | ||
- | --variant | + | --variant |
- | -o namikonga_albert_filter_only.vcf \ | + | -o PTC_human.gatk.filter.only.vcf \ |
-ef \ | -ef \ | ||
- | -R / | + | -R PTC_Human.fasta |
</ | </ |
mkatari-bioinformatics-august-2013-gatknotes.1412860576.txt.gz · Last modified: 2014/10/09 13:16 by mkatari