Skip to content

Commit

Permalink
Merge pull request #240 from TheJacksonLaboratory/report-unfiltered-v…
Browse files Browse the repository at this point in the history
…ariants-in-html

Report unfiltered variants in HTML output.
  • Loading branch information
ielis committed Feb 26, 2024
2 parents e153242 + 999424a commit 5c65e77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ public void write(AnalysisResults results, OutputOptions outputOptions) {
// Limit performing of the expensive DB lookups to several dozens of variants that will be reported
// in the report, and not to the entire variant corpus
List<String> visualizations = variantLandscapes.stream()
.filter(s -> s.variant().numberOfAltReads() >= analysisParameters.minAltReadSupport()
&& s.variant().passedFilters()
.filter(s -> s.variant().passedFilters()
&& !Double.isNaN(s.variant().svPriority().getPriority()))
.filter(v -> !(v.variant() instanceof GenomicBreakendVariant) || !doNotReportBreakends)
.limit(outputOptions.nVariantsToReport())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ private static Function<FullSvannaVariant, Optional<VariantContext>> addInfoFiel
VariantContext vc = sv.variantContext();
if (vc == null) {
GenomicVariant gv = sv.genomicVariant();
LogUtils.logDebug(LOGGER, "Cannot write VCF line for variant '{}' because variant context is missing. {}:{}{}>{}",
LOGGER.debug("Cannot write VCF line for variant '{}' because variant context is missing. {}:{}{}>{}",
gv.id(), gv.contig().name(), gv.startOnStrandWithCoordinateSystem(gv.strand(), CoordinateSystem.oneBased()), gv.ref(), gv.alt());
return Optional.empty();
}

VariantContextBuilder builder = new VariantContextBuilder(vc);
if (svPriority == null || Double.isNaN(svPriority.getPriority()))
return Optional.of(builder.make());
return Optional.of(vc);

VariantContextBuilder builder = new VariantContextBuilder(vc);
return Optional.of(builder.attribute(SVANNA_PSV_FIELD_NAME, svPriority.getPriority())
.make());
};
Expand Down

0 comments on commit 5c65e77

Please sign in to comment.