use of au.edu.wehi.idsv.BreakpointSummary in project gridss by PapenfussLab.
the class VariantCallingConfigurationTest method full_margin_should_apply_to_interchromosomal_events.
@Test
public void full_margin_should_apply_to_interchromosomal_events() {
VariantCallingConfiguration config = new VariantCallingConfiguration(getDefaultConfig());
config.breakendMargin = 100;
assertEquals(new BreakpointSummary(0, FWD, 1000, 900, 1100, 1, FWD, 1000, 900, 1100), config.withMargin(new BreakpointSummary(0, FWD, 1000, 1, FWD, 1000)));
}
use of au.edu.wehi.idsv.BreakpointSummary in project gridss by PapenfussLab.
the class BreakpointHomologyTest method no_homology.
@Test
public void no_homology() {
InMemoryReferenceSequenceFile ref = new InMemoryReferenceSequenceFile(new String[] { "0", "1" }, new byte[][] { B("CCCCCCCCCCCC"), B("TTTTTTTTTTTTTTTTTTTTTTTT") });
// >
// <
BreakpointHomology bh = BreakpointHomology.calculate(ref, new BreakpointSummary(0, FWD, 6, 1, BWD, 7), "", 100, 10);
assertEquals(0, bh.getLocalHomologyLength());
assertEquals(0, bh.getRemoteHomologyLength());
}
use of au.edu.wehi.idsv.BreakpointSummary in project gridss by PapenfussLab.
the class BreakpointHomologyTest method should_report_homology_up_to_max_distance_away.
@Test
public void should_report_homology_up_to_max_distance_away() {
InMemoryReferenceSequenceFile ref = new InMemoryReferenceSequenceFile(new String[] { "0", "1" }, new byte[][] { B("CCCAATGGGCCCTTTTTTTTTTTTTTTTTTT"), B("TTTAATGGGAAAGGGGGGGGGGGGGGGGGGG") });
// >
// <
BreakpointHomology bh = BreakpointHomology.calculate(ref, new BreakpointSummary(0, FWD, 6, 1, BWD, 7), "", 1, 5);
assertEquals(1, bh.getLocalHomologyLength());
assertEquals(1, bh.getRemoteHomologyLength());
}
use of au.edu.wehi.idsv.BreakpointSummary in project gridss by PapenfussLab.
the class BreakpointHomologyTest method should_require_exact_remote_breakpoint.
@Test(expected = IllegalArgumentException.class)
public void should_require_exact_remote_breakpoint() {
InMemoryReferenceSequenceFile ref = new InMemoryReferenceSequenceFile(new String[] { "0", "1" }, new byte[][] { B("CCCAATGGGCCC"), B("TTTAATGGGAAA") });
// >
// <
BreakpointHomology.calculate(ref, new BreakpointSummary(0, FWD, 6, 6, 6, 1, BWD, 7, 7, 8), "", 100, 0);
}
use of au.edu.wehi.idsv.BreakpointSummary in project gridss by PapenfussLab.
the class TruthAnnotatorTest method match_should_allow_novel_base_insertions_to_match_reference.
/*
* If the bases we insert match the reference bases adjacent to the breakend, then we'll allow
* matches to those additional reference bases
*/
@Test
public void match_should_allow_novel_base_insertions_to_match_reference() {
// forward
assertTrue(TruthAnnotator.matches(new BreakpointSummary(new BreakendSummary(0, FWD, 1), new BreakendSummary(0, BWD, 10)), new BreakendSummary(0, FWD, 1), 4, 4));
assertTrue(TruthAnnotator.matches(new BreakpointSummary(new BreakendSummary(0, FWD, 1), new BreakendSummary(0, BWD, 10)), new BreakendSummary(0, FWD, 2), 4, 3));
assertTrue(TruthAnnotator.matches(new BreakpointSummary(new BreakendSummary(0, FWD, 1), new BreakendSummary(0, BWD, 10)), new BreakendSummary(0, FWD, 3), 4, 2));
assertTrue(TruthAnnotator.matches(new BreakpointSummary(new BreakendSummary(0, FWD, 1), new BreakendSummary(0, BWD, 10)), new BreakendSummary(0, FWD, 4), 4, 1));
assertTrue(TruthAnnotator.matches(new BreakpointSummary(new BreakendSummary(0, FWD, 1), new BreakendSummary(0, BWD, 10)), new BreakendSummary(0, FWD, 5), 4, 0));
// backward
assertTrue(TruthAnnotator.matches(new BreakpointSummary(new BreakendSummary(0, FWD, 1), new BreakendSummary(0, BWD, 10)), new BreakendSummary(0, BWD, 10), 4, 4));
assertTrue(TruthAnnotator.matches(new BreakpointSummary(new BreakendSummary(0, FWD, 1), new BreakendSummary(0, BWD, 10)), new BreakendSummary(0, BWD, 9), 4, 3));
assertTrue(TruthAnnotator.matches(new BreakpointSummary(new BreakendSummary(0, FWD, 1), new BreakendSummary(0, BWD, 10)), new BreakendSummary(0, BWD, 8), 4, 2));
assertTrue(TruthAnnotator.matches(new BreakpointSummary(new BreakendSummary(0, FWD, 1), new BreakendSummary(0, BWD, 10)), new BreakendSummary(0, BWD, 7), 4, 1));
assertTrue(TruthAnnotator.matches(new BreakpointSummary(new BreakendSummary(0, FWD, 1), new BreakendSummary(0, BWD, 10)), new BreakendSummary(0, BWD, 6), 4, 0));
assertTrue(TruthAnnotator.matches(new BreakpointSummary(new BreakendSummary(0, BWD, 2), new BreakendSummary(0, FWD, 10)), new BreakendSummary(0, BWD, 1), 4, 3));
assertTrue(TruthAnnotator.matches(new BreakpointSummary(new BreakendSummary(0, BWD, 2), new BreakendSummary(0, FWD, 10)), new BreakendSummary(0, FWD, 11), 4, 3));
// breakpoint should allow margin on either side
assertTrue(TruthAnnotator.matches(new BreakpointSummary(new BreakendSummary(0, FWD, 1), new BreakendSummary(0, BWD, 10)), new BreakpointSummary(new BreakendSummary(0, FWD, 1), new BreakendSummary(0, BWD, 10)), 4, 4));
assertTrue(TruthAnnotator.matches(new BreakpointSummary(new BreakendSummary(0, FWD, 1), new BreakendSummary(0, BWD, 10)), new BreakpointSummary(new BreakendSummary(0, FWD, 2), new BreakendSummary(0, BWD, 10)), 4, 3));
assertTrue(TruthAnnotator.matches(new BreakpointSummary(new BreakendSummary(0, FWD, 1), new BreakendSummary(0, BWD, 10)), new BreakpointSummary(new BreakendSummary(0, FWD, 1), new BreakendSummary(0, BWD, 9)), 4, 3));
assertTrue(TruthAnnotator.matches(new BreakpointSummary(new BreakendSummary(0, FWD, 1), new BreakendSummary(0, BWD, 10)), new BreakpointSummary(new BreakendSummary(0, FWD, 1), new BreakendSummary(0, BWD, 6)), 4, 0));
assertTrue(TruthAnnotator.matches(new BreakpointSummary(new BreakendSummary(0, FWD, 1), new BreakendSummary(0, BWD, 10)), new BreakpointSummary(new BreakendSummary(0, FWD, 2), new BreakendSummary(0, BWD, 7)), 4, 0));
assertTrue(TruthAnnotator.matches(new BreakpointSummary(new BreakendSummary(0, FWD, 1), new BreakendSummary(0, BWD, 10)), new BreakpointSummary(new BreakendSummary(0, FWD, 3), new BreakendSummary(0, BWD, 8)), 4, 0));
assertTrue(TruthAnnotator.matches(new BreakpointSummary(new BreakendSummary(0, FWD, 1), new BreakendSummary(0, BWD, 10)), new BreakpointSummary(new BreakendSummary(0, FWD, 4), new BreakendSummary(0, BWD, 9)), 4, 0));
assertTrue(TruthAnnotator.matches(new BreakpointSummary(new BreakendSummary(0, FWD, 1), new BreakendSummary(0, BWD, 10)), new BreakpointSummary(new BreakendSummary(0, FWD, 5), new BreakendSummary(0, BWD, 10)), 4, 0));
}
Aggregations