![]() |
GATK SNP calling complete workflow
Hi All,
I wolud like to consult my GATK workflow for a pair end Illumina data. Generally I'm calling SNPs using following steps: Code:
bwa aln -t 4 hg19.fa seq1.fastq > 1.sai The exome intervals I've gained using UCSC Table Browser http://genome.ucsc.edu/cgi-bin/hgTables?command=start I'm not sure if I'm doing it in a correct way. Is my way compact enough? What about yours workflows? Are your steps look simillar? Should I use more GATK subprograms to obtain more accurate results? Thanks in advance for suggestions :) |
The Mills and 1000G gold standard indels are a very stringently curated list of indels. For the purposes of indel realignment in GATK you probably want one or more of the broader sets from the GATK bundle instead, though which ones I'm not completely sure.
Overall though, your workflow looks fine. Bear in mind though, that it will only call SNPs and not indels (but since you're calling your output file resultSNPs I assume you know that already). |
Is the order of funtions important?
Does this: Code:
FixMateInformation Code:
SortSam |
Rocketknight indeed I didn't want indels, but now I need it. Do you know which option should I use to obtain a final file with SNPs and Indels?
|
Yep, the only line you need to change is UnifiedGenotyper. Add the option -glm BOTH and the output VCF file will have SNPs and indels in it. Note that if you want to do Variant Quality Score Recalibration you'll have to do some things differently if you're recalibrating indels too.
|
Some indel positions are off in dbsnp135_b37.vcf. How do u deal with them??:confused:
|
"The exome intervals I've gained using UCSC Table Browser http://genome.ucsc.edu/cgi-bin/hgTables?command=start"
Can you tell me how to get the exome intervals as you have referred |
Quote:
|
Hi I am facing some problems with the Local realignment step around the indels, I am using the marked bam file after the PCR duplicate marking step but I am getting the following error
##### ERROR MESSAGE: Invalid command line: Cannot process the provided BAM file(s) because they were not indexed. The GATK does offer limited processing of unindexed BAMs in --unsafe mode, but this GATK feature is currently unsupported. I donot see such errors in the forums. Is it that after marknig the PCR duplicates the bam files needs to be sorted and indexed again? or just indexing and running the target realigner step will be sufficient? Am using the GATK version 2.3 am sure its not a serious problem but am not being able to troubleshoot it. I am trying to get a bit stringent in this local indel realignment so for more specificity am actually using the DBSNP137.vcf , 1000G indel vcf and the Mills and 1000 G gold standard vcf. Please guide me about this. I am using the GATK for the first time and trying to develop a pipeline. Below is the command line am using for this step java -Xmx14g -jar /data/PGP/gmelloni/GenomeAnalysisTK-2.3-4-g57ea19f/GenomeAnalysisTK.jar -R /scratch/GT/vdas/test_exome/exome/hg19.fa -I SRR062634_marked.sorted.bam -T RealignerTargetCreator -known /scratch/GT/vdas/test_exome/exome/databases/dbsnp_137.hg19.vcf -known /scratch/GT/vdas/test_exome/exome/databases/1000G_phase1.indels.hg19.vcf -known /scratch/GT/vdas/test_exome/exome/databases/Mills_and_1000G_gold_standard.indels.hg19.vcf -o SRR062634_marked.sorted.bam.inervals -S LENIENT |
@vd4mindia: I don't know, maybe try to index it. You shoud have in your directory files SRR062634_marked.sorted.bam and SRR062634_marked.sorted.bai.
If this won't help I'm not able to solve this issue. |
I thought fixMate is no longer required by the GATK pipeline? And if you want to perform the fixMate then sortSam, you can run FixMate with the SO options in SortSam, then your output will be automatically sorted in one go. It is also a good idea to always include Create_Index=TRUE in the pipeline to make sure you have the index for every steps just to be safe
|
@thedamian,
Yes I fixed it , I indexed it again and then made the call and the local realignment step is running now. But i need some inputs for the base quality recalibration step. In the above thread this step is written as below java -Xmx5g -jar GenomeAnalysisTK.jar -nt 4 -T CountCovariates -l INFO -R hg19.fa -I realigned.bam -cov ReadGroupCovariate -cov QualityScoreCovariate -cov CycleCovariate -cov DinucCovariate -recalFile recalFile -knownSites dbsnp_135.hg19.vcf Since during my Realigner Target Creator step I used dbSNP_137.vcf for known sites I should be using the same as well for the Base quality step right? java -Xmx14g -jar /data/PGP/gmelloni/GenomeAnalysisTK-2.3-4-g57ea19f/GenomeAnalysisTK.jar -R /scratch/GT/vdas/test_exome/exome/hg19.fa -I SRR062634_marked.sorted.bam -T RealignerTargetCreator -known /scratch/GT/vdas/test_exome/exome/databases/dbsnp_137.hg19.vcf -known /scratch/GT/vdas/test_exome/exome/databases/1000G_phase1.indels.hg19.vcf -known /scratch/GT/vdas/test_exome/exome/databases/Mills_and_1000G_gold_standard.indels.hg19.vcf -o SRR062634_marked.sorted.bam.inervals -S LENIENT As you can see the known sites /scratch/GT/vdas/test_exome/exome/databases/dbsnp_137.hg19.vcf So my script for this step should be For the Base calibrator( i see some place its written count covariates, which should I do) any suggestion but am following base calibrator below is the command java -Xmx14g -jar /data/PGP/gmelloni/GenomeAnalysisTK-2.3-4-g57ea19f/GenomeAnalysisTK.jar -nt 8 -T BaseRecalibrator -R /scratch/GT/vdas/test_exome/exome/hg19.fa -knownSites /scratch/GT/vdas/test_exome/exome/databases/dbsnp_137.hg19.vcf -I SRR062634.realigned.bam -o SRR062634.realigned.recal.csv -cov ReadGroupCovariate -cov QualityScoreCovariate -cov CycleCovariate -cov ContextCovariate -S LENIENT for table recalibration java -Xmx14g -jar /data/PGP/gmelloni/GenomeAnalysisTK-2.3-4-g57ea19f/GenomeAnalysisTK.jar -T TableRecalibration -R /scratch/GT/vdas/test_exome/exome/hg19.fa -I SRR062634.realigned.bam -o SRR062634.realigned.bam.recal.bam -BQSR SRR062634.realigned.recal.csv -S LENIENT Please let me know if this looks correct or not? |
Yes @choishingwan I checked and the fixmate step is retired and am not using it but I have another query in the above line please let me know and share your views
|
@vd4mindia: From your code, I guess you are running GATK version before 2.6 right? You are right about using the dbsnp137. From the look of it it seems correct. In case if you want to use the latest gatk, you can refer to the following site: http://gatkforums.broadinstitute.org...se-2-0-retired
Personally, I use the following code if it helps: Quote:
|
@thedamain,
I need some information about the exomes.bed file which you are using. I see that most of the pipelines say that they generate it from the UCSC genome browser to restrict the output to exonic sequences, is there any specific cut off that must be used to generate this bed file for the hg19 ref gene or a simple selection will do? or do i have to specify some extra bp addition for both end to catch the splice sites? Please let me know. On what criteria is the bed file selected or it is just a representation bed file of the whole ref genome restricted only to the exonic regions? Please let me know |
@choishingwan ,
Thanks for your prompt reply. I would like to tell you that I am using the version 2.3 not the 2.7 one so is it wrong to use the DBSNP_137.vcf file with that? I hope this should not be a problem for the GATK toolkit to work with the latest DBSNP file right as this is just the upated data set also in a step I see you have used the print reads command and it is usually done when you merge all you samples together for and generate a single bam file and then try to call the SNP and INDEL but since am just developing a new pipeline with a test sample from the 1000 G project I have only one sample ( paired-end) where am trying to understand each step of the pipeline and so that once I have my samples I can use that pipeline on them. Please can you clarify the the doubts about the print reads step or can I use the below script when am not merging all the samples together and use Table Recalibrator ava -Xmx14g -jar /data/PGP/gmelloni/GenomeAnalysisTK-2.3-4-g57ea19f/GenomeAnalysisTK.jar -T TableRecalibration -R /scratch/GT/vdas/test_exome/exome/hg19.fa -I SRR062634.realigned.bam -o SRR062634.realigned.bam.recal.bam -BQSR SRR062634.realigned.recal.csv -S LENIENT |
There's definitely no problem in using the latest dbsnp file with the old gatk pipeline. As for the print read problem, I think that's when the version different take place. In my case, in the latest gatk program, the recalibrate will not produce a new bam file as with 2.3, instead it produce a file to use for printread to print the recalibrated file. As for your question regarding merging the file. From my experience, it is unnecessary as you can input multiple files for unifiedgenotyper using multiple -I. Though I think it is advised to call all samples together ( not sure if that's the case if the capture kit are different / the sequencing platform for each sample is different, hope someone can answer that for me)
Side note, if you are doing exome sequencing, you should get the bed file from the company stating the capture area and you won't need to make one yourself. |
@choishingwan
I guess then I can use the option of TableRecalibration, I am yet to run it , if it produces a bam file good enough else I will use the print read option which will surely produce a bam file. As for multiple sample with merged bam file, I will be getting my samples say (4 samples are sequenced in one lane) then I guess I might have to use the merged bam file concept or might simply work with individual samples and during the unified genotyper I can use all of them together (what do you think). My sample for project will be 2 Tumor and 2 IPSC from the same 2 tumors. So it is 2 tumors from 2 different patients and their respective IPSC lines and I will try to work it out to find the SNP INDELs SNVs that will confer that the mutations between tumor and IPSC are same so that they have same genetic background but then in that case during the SNP INDEL calling using unified genotyper is it advisable to use all the recaliberated bam files from 4 samples to call together and get the SNP and INDELS right? Any thoughts on this? Bedfile query: This is what I was worried about regarding the bed file, as for the test analysis I am doing I can recreate a bed file myself from the genome browser for testing my analysis? Let me know your thoughts on this. |
From my memory, you should be able to get a bam file from the TableRecalibration. From what I understand, you only have to merge samples (as in, really merge samples into one single bam file) when you sequence the same sample on multiple lane. You can refer to the following:
http://gatkforums.broadinstitute.org...he-same-sample And also the best practice link that I have previously attached. According to my labmates, they said merging the bam file made it difficult to analyse downstream as it will be a huge file (e.g. 4 6GB bam merged will become ~24GB). All in all, I'd really recommend you reading the best practice guide from GATK, they cover most stuff you need to know. As for the bed file, it is just for removing SNPs in areas that shouldn't be captured by the kit. So most of the time, you should focus only on the capture areas. However, if you don't have that information and couldn't get it from the people, then you can consider using only the exome part from the UCSC. I have never tried that but I guess you can, my recommendation is to always get the capture information from the people and make sure you know what you are working with. |
All times are GMT -8. The time now is 06:13 AM. |
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2021, vBulletin Solutions, Inc.