Skip to content

Commit 88f9ff7

Browse files
committed
Add pindel logging
1 parent 902702b commit 88f9ff7

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/analysis/PindelAnalysis.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,16 @@ public static File runPindel(AnalysisOutputImpl output, PipelineContext ctx, Rea
243243

244244
private static void parsePindelOutput(PipelineContext ctx, CSVWriter writer, File pindelFile, double minFraction, int minDepth, File gatkDepthFile) throws IOException
245245
{
246+
ctx.getLogger().info("inspecting file: " + pindelFile.getName());
247+
246248
if (!pindelFile.exists())
247249
{
250+
ctx.getLogger().debug("file does not exist: " + pindelFile.getPath());
248251
return;
249252
}
250253

254+
int totalPassing = 0;
255+
int totalFiltered = 0;
251256
try (BufferedReader reader = Readers.getReader(pindelFile))
252257
{
253258
String line;
@@ -259,6 +264,7 @@ private static void parsePindelOutput(PipelineContext ctx, CSVWriter writer, Fil
259264
int support = Integer.parseInt(tokens[8].split(" ")[1]);
260265
if (support < minDepth)
261266
{
267+
totalFiltered++;
262268
continue;
263269
}
264270

@@ -268,6 +274,7 @@ private static void parsePindelOutput(PipelineContext ctx, CSVWriter writer, Fil
268274
int depth = getGatkDepth(ctx, gatkDepthFile, contig, start);
269275
if (depth == 0)
270276
{
277+
totalFiltered++;
271278
continue;
272279
}
273280

@@ -280,9 +287,17 @@ private static void parsePindelOutput(PipelineContext ctx, CSVWriter writer, Fil
280287
int end = Integer.parseInt(tokens[5]);
281288
String type = tokens[1].split(" ")[0];
282289
writer.writeNext(new String[]{type, contig, String.valueOf(start), String.valueOf(end), String.valueOf(depth), String.valueOf(support), String.valueOf(pct), alt});
290+
totalPassing++;
291+
}
292+
else
293+
{
294+
totalFiltered++;
283295
}
284296
}
285297
}
298+
299+
ctx.getLogger().info("total filtered: " + totalFiltered);
300+
ctx.getLogger().info("total passing: " + totalPassing);
286301
}
287302
}
288303

0 commit comments

Comments
 (0)