Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report unfiltered variants in HTML output. #240

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading