Search in sources :

Example 21 with SoftClipEvidence

use of au.edu.wehi.idsv.SoftClipEvidence in project gridss by PapenfussLab.

the class PathNodeIteratorTest method should_handle_repeated_kmers.

@Test
public void should_handle_repeated_kmers() {
    SoftClipEvidence sce = SCE(FWD, withSequence("TTTTTTTTTTTTTTTT", Read(0, 5, "6M10S")));
    DirectedEvidence rp = NRRP(SES(10, 200), withSequence("CCCCCCCCCC", DP(0, 25, "10M", true, 1, 1, "10M", false)));
    List<KmerPathNode> result = asCheckedKPN(4, 100, sce, rp);
    assertCompleteGraph(result, 4);
    // SC: ref repeat; nonref repeat
    // RP: single width starting kmer <-> repeat cycle <-> single width ending kmer
    assertEquals(5, result.size());
}
Also used : SoftClipEvidence(au.edu.wehi.idsv.SoftClipEvidence) DirectedEvidence(au.edu.wehi.idsv.DirectedEvidence) Test(org.junit.Test)

Example 22 with SoftClipEvidence

use of au.edu.wehi.idsv.SoftClipEvidence in project gridss by PapenfussLab.

the class PathNodeIteratorTest method should_assemble_adjacent_sc_rp.

@Test
public void should_assemble_adjacent_sc_rp() {
    SoftClipEvidence sc = SCE(FWD, withSequence("GTGGTCGACC", Read(0, 50, "4M6S")));
    DiscordantReadPair rp = (DiscordantReadPair) NRRP(SES(10, 200), withSequence("GACCT", DP(0, 25, "5M", true, 1, 1, "5M", false)));
    List<KmerPathNode> result = asCheckedKPN(5, 1000, sc, rp);
    assertCompleteGraph(result, 5);
    assertEquals(2, result.size());
    assertEquals(1, result.stream().mapToInt(n -> n.next().size()).sum());
    assertEquals(1, result.stream().mapToInt(n -> n.prev().size()).sum());
}
Also used : SoftClipEvidence(au.edu.wehi.idsv.SoftClipEvidence) DiscordantReadPair(au.edu.wehi.idsv.DiscordantReadPair) Test(org.junit.Test)

Aggregations

SoftClipEvidence (au.edu.wehi.idsv.SoftClipEvidence)22 Test (org.junit.Test)22 SAMRecord (htsjdk.samtools.SAMRecord)14 ProcessingContext (au.edu.wehi.idsv.ProcessingContext)12 DiscordantReadPair (au.edu.wehi.idsv.DiscordantReadPair)10 DirectedEvidence (au.edu.wehi.idsv.DirectedEvidence)3 IntermediateFilesTest (au.edu.wehi.idsv.IntermediateFilesTest)2 NonReferenceReadPair (au.edu.wehi.idsv.NonReferenceReadPair)2 ImmutableList (com.google.common.collect.ImmutableList)2 Lists (com.google.common.collect.Lists)2 SortOrder (htsjdk.samtools.SAMFileHeader.SortOrder)2 BufferedWriter (java.io.BufferedWriter)2 File (java.io.File)2 FileWriter (java.io.FileWriter)2 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)2 List (java.util.List)2 Collectors (java.util.stream.Collectors)2 Assert.assertEquals (org.junit.Assert.assertEquals)2 Assert.assertTrue (org.junit.Assert.assertTrue)2