@@ -42,16 +42,18 @@ ezMethodGatkRnaHaplotyper = function(input=NA, output=NA, param=NA){
42
42
ezSystem(' mv local.bam withRg.bam' )
43
43
}
44
44
45
+ ezSystem(" samtools index withRg.bam" )
45
46
cmd = paste(gatkCall , " SplitNCigarReads" ,
46
47
" -R" , genomeSeq ,
47
48
" -I" , " withRg.bam" ,
48
49
" -L" , exomeInterVals ,
49
50
# # this is the default! "-rf ReassignOneMappingQuality -RMQF 255 -RMQT 60 -U ALLOW_N_CIGAR_READS",
50
51
" -O splitNtrim.bam" )
51
52
ezSystem(cmd )
52
-
53
+ ezSystem(" samtools index splitNtrim.bam" )
54
+
53
55
# BaseRecalibration is done only if known sites are available
54
- if (param $ knownSitesAvailable ){
56
+ if (file.exists( dbsnpFile ) ){
55
57
cmd = paste(gatkCall , " BaseRecalibrator" ,
56
58
" -R" , genomeSeq ,
57
59
" -I splitNtrim.bam" ,
@@ -68,13 +70,15 @@ ezMethodGatkRnaHaplotyper = function(input=NA, output=NA, param=NA){
68
70
" --add-output-sam-program-record" ,
69
71
" --bqsr-recal-file recal.table" ,
70
72
" --output recal.bam" )
73
+ ezSystem(cmd )
71
74
} else {
72
75
ezSystem(' mv splitNtrim.bam recal.bam' )
73
76
}
77
+ ezSystem(" samtools index recal.bam" )
74
78
75
79
# ########## haplotyping
76
80
outputFile = basename(output $ getColumn(" GVCF" ))# paste0(sampleName, ".g.vcf.gz")
77
- cmd = paste(gatkCal ,' HaplotypeCaller' ,
81
+ cmd = paste(gatkCall ,' HaplotypeCaller' ,
78
82
" -R" , genomeSeq ,
79
83
" -I recal.bam" ,
80
84
" -L" , exomeInterVals ,
0 commit comments