Skip to content

Commit 4ec5fba

Browse files
committed
Improved logging for lofreq merge
1 parent 37b042f commit 4ec5fba

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,15 @@ public void processFilesRemote(List<SequenceOutputFile> inputFiles, JobContext c
332332
{
333333
writer.writeNext(new String[]{"ReadsetName", "OutputFileId", "ReadsetId", "Contig", "Start", "End", "Ref", "AltAlleles", "GatkDepth", "LoFreqDepth", "RefAF", "AltAFs", "NonRefCount", "AltCounts"});
334334

335+
int siteIdx = 0;
335336
for (Pair<String, Integer> site : whitelistSites)
336337
{
338+
siteIdx++;
339+
if (siteIdx % 1000 == 0)
340+
{
341+
ctx.getLogger().info("positions written: " + siteIdx);
342+
}
343+
337344
for (SequenceOutputFile so : inputFiles)
338345
{
339346
VCFFileReader reader = getReader(so.getFile());
@@ -490,9 +497,10 @@ public void processFilesRemote(List<SequenceOutputFile> inputFiles, JobContext c
490497
totalAltDepth += dp;
491498

492499
double adjAF = (double)dp / lofreqDepth;
493-
if (Math.abs(adjAF - af) > 0.01)
500+
double diff = Math.abs(adjAF - af);
501+
if (diff > 0.01)
494502
{
495-
ctx.getLogger().error("Significant AF adjustment: " + line.get(0) + "/" + line.get(4) + "/" + a + "/" + af + "/" + adjAF);
503+
ctx.getLogger().error("Significant AF adjustment: readset: " + line.get(0) + " / site: " + line.get(4) + " / allele: " + a + " / AF: " + af + " / New AF" + adjAF + " / diff: " + diff + " / gatk depth: " + gatkDepth + " / lofreq depth: " + lofreqDepth);
496504
}
497505

498506
totalAltAf += adjAF;

0 commit comments

Comments
 (0)