Skip to content
Closed
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 @@ -409,7 +409,7 @@ public float pathogenicityScore() {

private float variantEffectScore() {
float variantEffectScore = VariantEffectPathogenicityScore.pathogenicityScoreOf(variantEffect);
if (this.isSymbolic()) {
if (this.isSymbolic() || Math.abs(this.changeLength()) >= 1000) {
// SvAnna scoring https://genomemedicine.biomedcentral.com/articles/10.1186/s13073-022-01046-6/tables/1
// | element contains v
// class | v contains t | v overlaps t | Coding or splice | UTR | Intronic | Promoter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,23 @@ void testSymbolicInsertionScores(String alt, VariantEffect variantEffect, float
assertThat(sv.pathogenicityScore(), equalTo(expected));
}

@ParameterizedTest
@CsvSource({
"CODING_SEQUENCE_VARIANT, 0.2",
"SPLICE_REGION_VARIANT, 0.9",
"CODING_TRANSCRIPT_VARIANT, 0.0",
"SEQUENCE_VARIANT, 0.0",
})
void testLargeNonSymbolicInsertionScores(VariantEffect variantEffect, float expected) {
// Non-symbolic insertions >= 1000bp are routed to the structural variant annotator and should
// receive SvAnna-based scoring, not the default SEQUENCE_VARIANT score of 0.0
String longAlt = "A".repeat(1001);
VariantEvaluation sv = newBuilder(2, 1, 1, "A", longAlt, 1000)
.variantEffect(variantEffect)
.build();
assertThat(sv.pathogenicityScore(), equalTo(expected));
}

@Test
public void testFailedFilterTypesDontContainPassedFilterTypes() {
Set<FilterType> expectedFilters = EnumSet.of(FAIL_FREQUENCY_RESULT.filterType());
Expand Down