Search in sources :

Example 1 with SoftClipEvidence

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

the class NonReferenceContigAssemblerTest method should_call_simple_bwd_SC.

@Test
public void should_call_simple_bwd_SC() {
    ProcessingContext pc = getContext();
    pc.getAssemblyParameters().k = 4;
    SoftClipEvidence sce = SCE(BWD, withSequence("ACGTGGTCGACC", Read(0, 10, "6S6M")));
    List<SAMRecord> output = go(pc, true, sce);
    assertEquals(1, output.size());
    assertEquals("ACGTGGTCGACC", S(output.get(0).getReadBases()));
    assertEquals("6S6M", output.get(0).getCigarString());
    assertEquals(0, (int) output.get(0).getReferenceIndex());
    assertEquals(10, output.get(0).getAlignmentStart());
}
Also used : ProcessingContext(au.edu.wehi.idsv.ProcessingContext) SoftClipEvidence(au.edu.wehi.idsv.SoftClipEvidence) SAMRecord(htsjdk.samtools.SAMRecord) Test(org.junit.Test)

Example 2 with SoftClipEvidence

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

the class NonReferenceContigAssemblerTest method should_set_assembly_attributes.

@Test
public void should_set_assembly_attributes() {
    ProcessingContext pc = getContext();
    pc.getAssemblyParameters().k = 4;
    SoftClipEvidence sce = SCE(FWD, withSequence("ACGTGGTCGACC", Read(0, 5, "6M6S")));
    List<SAMRecord> output = go(pc, true, sce);
    AssemblyAttributes attr = new AssemblyAttributes(output.get(0));
    assertNotNull(attr);
    assertEquals(1, attr.getAssemblySupportCount());
}
Also used : ProcessingContext(au.edu.wehi.idsv.ProcessingContext) SoftClipEvidence(au.edu.wehi.idsv.SoftClipEvidence) SAMRecord(htsjdk.samtools.SAMRecord) AssemblyAttributes(au.edu.wehi.idsv.AssemblyAttributes) Test(org.junit.Test)

Example 3 with SoftClipEvidence

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

the class NonReferenceContigAssemblerTest method should_call_overlapping_SC.

@Test
public void should_call_overlapping_SC() {
    // 12345678901234567890
    // ACGTGGCTCGACC
    // ------
    // ------
    ProcessingContext pc = getContext();
    pc.getAssemblyParameters().k = 4;
    SoftClipEvidence fwd = SCE(BWD, withSequence("ACGTGGCTCGACC", Read(0, 8, "7S6M")));
    SoftClipEvidence bwd = SCE(FWD, withSequence("ACGTGGCTCGACC", Read(0, 1, "6M7S")));
    List<SAMRecord> output = go(pc, true, fwd, bwd);
    assertEquals(1, output.size());
    assertEquals("6M1I1D6M", output.get(0).getCigarString());
}
Also used : ProcessingContext(au.edu.wehi.idsv.ProcessingContext) SoftClipEvidence(au.edu.wehi.idsv.SoftClipEvidence) SAMRecord(htsjdk.samtools.SAMRecord) Test(org.junit.Test)

Example 4 with SoftClipEvidence

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

the class NonReferenceContigAssemblerTest method should_handle_sc_repeated_kmers.

@Test
public void should_handle_sc_repeated_kmers() {
    ProcessingContext pc = getContext();
    pc.getAssemblyParameters().k = 4;
    SoftClipEvidence sce = SCE(FWD, withSequence("TTTTTTTTTTTT", Read(0, 5, "6M6S")));
    List<SAMRecord> output = go(pc, true, sce);
    assertEquals(1, output.size());
    assertEquals("TTTTTTTTTTTT", S(output.get(0).getReadBases()));
}
Also used : ProcessingContext(au.edu.wehi.idsv.ProcessingContext) SoftClipEvidence(au.edu.wehi.idsv.SoftClipEvidence) SAMRecord(htsjdk.samtools.SAMRecord) Test(org.junit.Test)

Example 5 with SoftClipEvidence

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

the class NonReferenceContigAssemblerTest method should_call_simple_fwd_RP.

@Test
public void should_call_simple_fwd_RP() {
    ProcessingContext pc = getContext();
    pc.getAssemblyParameters().k = 4;
    SAMEvidenceSource ses = SES(100, 200);
    DiscordantReadPair e = (DiscordantReadPair) NRRP(ses, withSequence("ACGTGGTCGACC", DP(0, 50, "12M", true, 1, 1, "12M", false)));
    List<SAMRecord> output = go(pc, true, e);
    assertEquals(1, output.size());
    SoftClipEvidence ass = SoftClipEvidence.create(AES(ses), FWD, output.get(0));
    assertEquals(e.getBreakendSummary().localBreakend(), ass.getBreakendSummary());
    assertEquals("ACGTGGTCGACC", S(ass.getBreakendSequence()));
    assertEquals("", S(ass.getAnchorSequence()));
}
Also used : ProcessingContext(au.edu.wehi.idsv.ProcessingContext) SoftClipEvidence(au.edu.wehi.idsv.SoftClipEvidence) SAMRecord(htsjdk.samtools.SAMRecord) SAMEvidenceSource(au.edu.wehi.idsv.SAMEvidenceSource) 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