Skip to content

Commit

Permalink
tools: Fix normalization of variants wiht ins seq. (cherry-pick from 9…
Browse files Browse the repository at this point in the history
…41cb51) #TASK-6266
  • Loading branch information
j-coll committed Jul 11, 2024
1 parent 228e478 commit 6d83ad3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1394,6 +1394,8 @@ private Variant newVariant(Variant variant, VariantKeyFields keyFields, Structur
normalizedVariant.getSv().setCiStartRight(sv.getCiStartRight());
normalizedVariant.getSv().setCiEndLeft(sv.getCiEndLeft());
normalizedVariant.getSv().setCiEndRight(sv.getCiEndRight());
normalizedVariant.getSv().setLeftSvInsSeq(sv.getLeftSvInsSeq());
normalizedVariant.getSv().setRightSvInsSeq(sv.getRightSvInsSeq());

// Variant will never have CopyNumber, because the Alternate is normalized from <CNxx> to <CNV>
normalizedVariant.getSv().setCopyNumber(keyFields.getCopyNumber());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,14 @@ public void testNormalizeSvToIndel() throws NonStandardCompliantSampleField {

}

@Test
public void testNormalizeWithInsSeq() throws NonStandardCompliantSampleField {
Variant variant = new Variant("1:799984<800001<800022:-:ACCACACCCACACAACACACA...TGTGGTGTGTGTGGTGTG");
Variant normVar = new VariantNormalizer().normalize(Collections.singletonList(variant), false).get(0);
assertEquals(variant, normVar);
assertEquals(variant.toString(), normVar.toString());
}

@Test
public void testNormalizeBND() throws NonStandardCompliantSampleField {
normalizeBnd(newVariant(101, 100, "", ".[9:10["), newVariant(100, 99, "A", "A[chr9:10["));
Expand Down

0 comments on commit 6d83ad3

Please sign in to comment.