use of au.edu.wehi.idsv.vcf.VcfFilter in project gridss by PapenfussLab.
the class StructuralVariationCallBuilder method applyFilters.
public VariantContextDirectedEvidence applyFilters(VariantContextDirectedEvidence variant) {
List<VcfFilter> filters = processContext.getVariantCallingParameters().calculateBreakendFilters(variant);
if (variant instanceof VariantContextDirectedBreakpoint) {
filters.addAll(processContext.getVariantCallingParameters().calculateBreakpointFilters((VariantContextDirectedBreakpoint) variant));
}
if (!filters.isEmpty()) {
VariantContextBuilder builder = new VariantContextBuilder(variant);
for (VcfFilter f : filters) {
builder.filter(f.filter());
}
variant = (VariantContextDirectedEvidence) IdsvVariantContext.create(processContext, variant.source, builder.make());
}
return variant;
}
use of au.edu.wehi.idsv.vcf.VcfFilter in project gridss by PapenfussLab.
the class VariantCallingConfiguration method calculateBreakpointFilters.
public List<VcfFilter> calculateBreakpointFilters(VariantContextDirectedBreakpoint call) {
List<VcfFilter> filters = Lists.newArrayList();
BreakpointSummary bp = call.getBreakendSummary();
if (call.getEventSize() != null && call.getEventSize() < minSize) {
// over 90% of events are small. Since most SV analysis excludes such events
// we allow the default output
filters.add(VcfFilter.SMALL_EVENT);
}
if (bp.couldBeReferenceAllele() && call.getUntemplatedSequence().length() == 0) {
filters.add(VcfFilter.REFERENCE_ALLELE);
}
if (call.getBreakpointQual() < minScore || call.getBreakpointEvidenceCount() == 0) {
filters.add(VcfFilter.LOW_BREAKPOINT_SUPPORT);
}
if (call.getBreakpointEvidenceCountAssembly() == 0 && call.getBreakpointEvidenceCountReadPair() + call.getBreakpointEvidenceCountSoftClip() == 1) {
filters.add(VcfFilter.SINGLE_SUPPORT);
}
return filters;
}
Aggregations