Skip to content

Commit 902702b

Browse files
committed
Error checking on pindel parsing
1 parent f7a4052 commit 902702b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ public void processFilesRemote(List<SequenceOutputFile> inputFiles, JobContext c
248248
{
249249
writer.writeNext(new String[]{"ReadsetName", "OutputFileId", "ReadsetId", "Source", "Contig", "Start", "End", "Length", "Ref", "AltAllele", "GatkDepth", "LoFreqDepth", "AltCount", "AltAF"});
250250

251+
Set<Integer> analysesWithoutPindel = new HashSet<>();
251252
for (SequenceOutputFile so : inputFiles)
252253
{
253254
//This will error if the coverage file is not found. Perform check now to fail fast
@@ -337,6 +338,13 @@ public void processFilesRemote(List<SequenceOutputFile> inputFiles, JobContext c
337338
{
338339
if (line[0].equals("Type"))
339340
{
341+
if (line.length != 8)
342+
{
343+
ctx.getLogger().warn("Older version of pindel file found, skipping: " + pindelFile.getPath());
344+
analysesWithoutPindel.add(so.getAnalysis_id());
345+
break;
346+
}
347+
340348
continue;
341349
}
342350

@@ -379,8 +387,14 @@ else if ("I".equals(line[0]))
379387
else
380388
{
381389
ctx.getLogger().warn("Unable to find pindel file, expected: " + pindelFile.getPath());
390+
analysesWithoutPindel.add(so.getAnalysis_id());
382391
}
383392
}
393+
394+
if (!analysesWithoutPindel.isEmpty())
395+
{
396+
ctx.getLogger().error("Analysis missing pindel: " + StringUtils.join(analysesWithoutPindel, ";"));
397+
}
384398
}
385399
catch (IOException e)
386400
{

0 commit comments

Comments
 (0)