@@ -117,21 +117,27 @@ public Output performAnalysisPerSampleRemote(Readset rs, File inputBam, Referenc
117117
118118 int totalVariants = 0 ;
119119 int totalGT1 = 0 ;
120+ int totalGT50 = 0 ;
120121 int totalIndelGT1 = 0 ;
121122 try (VCFFileReader reader = new VCFFileReader (outputVcfSnpEff );CloseableIterator <VariantContext > it = reader .iterator ())
122123 {
123124 while (it .hasNext ())
124125 {
125126 VariantContext vc = it .next ();
126127 totalVariants ++;
127- if (vc .hasAttribute ("AF" ) && vc .getAttributeAsDouble ("AF" , 0.0 ) >= 0.01 )
128+ if (vc .hasAttribute ("AF" ) && vc .getAttributeAsDouble ("AF" , 0.0 ) > 0.01 )
128129 {
129130 totalGT1 ++;
130131 if (vc .hasAttribute ("INDEL" ))
131132 {
132133 totalIndelGT1 ++;
133134 }
134135 }
136+
137+ if (vc .hasAttribute ("AF" ) && vc .getAttributeAsDouble ("AF" , 0.0 ) > 0.5 )
138+ {
139+ totalGT50 ++;
140+ }
135141 }
136142 }
137143
@@ -163,8 +169,15 @@ public Output performAnalysisPerSampleRemote(Readset rs, File inputBam, Referenc
163169
164170 Interval intervalOfCurrentGap = null ;
165171
172+ int i = 0 ;
166173 while ((line = reader .readNext ()) != null )
167174 {
175+ i ++;
176+ if (i == 1 )
177+ {
178+ continue ;
179+ }
180+
168181 String [] tokens = line [0 ].split (":" );
169182 int depth = Integer .parseInt (line [1 ]);
170183
@@ -216,7 +229,7 @@ public Output performAnalysisPerSampleRemote(Readset rs, File inputBam, Referenc
216229
217230 consensusWrapper .execute (Arrays .asList ("/bin/bash" , script .getName (), inputBam .getPath (), referenceGenome .getWorkingFastaFile ().getPath (), mask .getPath ()));
218231
219- String description = String .format ("Total Variants: %s\n Total GT 1 PCT: %s\n Total Indel GT 1 PCT: %s" , totalVariants , totalGT1 , totalIndelGT1 );
232+ String description = String .format ("Total Variants: %s\n Total GT 1 PCT: %s\n Total GT 50 PCT: %s \n Total Indel GT 1 PCT: %s" , totalVariants , totalGT1 , totalGT50 , totalIndelGT1 );
220233 output .addSequenceOutput (outputVcfSnpEff , "LoFreq: " + rs .getName (), CATEGORY , rs .getReadsetId (), null , referenceGenome .getGenomeId (), description );
221234 output .addSequenceOutput (coverageOut , "Depth of Coverage: " + rs .getName (), "Depth of Coverage" , rs .getReadsetId (), null , referenceGenome .getGenomeId (), description );
222235
0 commit comments