Skip to content

Commit c2147e2

Browse files
committed
Debug merge lofreq VCFs
1 parent f2cc58e commit c2147e2

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

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

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -261,26 +261,24 @@ public void processFilesRemote(List<SequenceOutputFile> inputFiles, JobContext c
261261
//NOTE: deletions spanning this site can also be included, with a start position ahead of this.
262262
try (CloseableIterator<VariantContext> it = reader.query(site.getLeft(), site.getRight(), site.getRight()))
263263
{
264-
if (!it.hasNext())
264+
while (it.hasNext())
265265
{
266-
continue;
267-
}
266+
VariantContext vc = it.next();
267+
if (vc.getAttribute("AF") == null)
268+
{
269+
continue;
270+
}
268271

269-
VariantContext vc = it.next();
270-
if (vc.getAttribute("AF") == null)
271-
{
272-
continue;
273-
}
272+
if (vc.getStart() > site.getRight())
273+
{
274+
ctx.getLogger().error("Site located after start: " + site.getRight());
275+
ctx.getLogger().error(vc.toStringWithoutGenotypes());
276+
ctx.getLogger().error(so.getFile().getPath());
277+
}
274278

275-
if (vc.getStart() > site.getRight())
276-
{
277-
ctx.getLogger().error("Site located after start: " + site.getRight());
278-
ctx.getLogger().error(vc.toStringWithoutGenotypes());
279-
ctx.getLogger().error(so.getFile().getPath());
279+
//NOTE: the start position of this SiteAndAlleles might differ from the VC
280+
siteToAllele.get(key).addSite(vc, ctx.getLogger());
280281
}
281-
282-
//NOTE: the start position of this SiteAndAlleles might differ from the VC
283-
siteToAllele.get(key).addSite(vc, ctx.getLogger());
284282
}
285283
}
286284
}

0 commit comments

Comments
 (0)