Skip to content

Commit

Permalink
Update logic used in how to track novel site when no writer is used (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
bbimber authored Sep 26, 2023
1 parent af1902e commit 361e163
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ public void apply(List<VariantContext> variantContexts, ReferenceContext referen
// Site is novel:
if (refVariants == null || refVariants.isEmpty()) {
vcb.attribute(novelSiteAnnotationName, novelSiteAnnotationValue);
novelSites++;
writer.add(vcb.make());

if (novelSitesWriter != null) {
novelSites++;
novelSitesWriter.add(vcb.genotypes().make());
}
}
Expand Down Expand Up @@ -162,13 +162,13 @@ public void apply(List<VariantContext> variantContexts, ReferenceContext referen
if (!foundMatchingRef) {
vcb.attribute(novelSiteAnnotationName, novelSiteAnnotationValue);
isNovel = true;
novelSites++;
}

vc = vcb.make();
writer.add(vc);

if (isNovel && novelSitesWriter != null) {
novelSites++;
novelSitesWriter.add(vcb.genotypes().make());
}
}
Expand Down

0 comments on commit 361e163

Please sign in to comment.