Search in sources :

Example 16 with SoftClipEvidence

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

the class NonReferenceContigAssemblerTest method should_call_overlapping_sc_rp.

@Test
public void should_call_overlapping_sc_rp() {
    ProcessingContext pc = getContext();
    pc.getAssemblyParameters().k = 4;
    SoftClipEvidence sce = SCE(FWD, withSequence("ACGTGGTCGACC", Read(0, 50, "6M6S")));
    DiscordantReadPair e = (DiscordantReadPair) NRRP(SES(10, 200), withSequence("GACCTCTACT", DP(0, 25, "10M", true, 1, 1, "10M", false)));
    List<SAMRecord> output = go(pc, true, sce, e);
    assertEquals(1, output.size());
    assertEquals("ACGTGGTCGACCTCTACT", S(output.get(0).getReadBases()));
}
Also used : ProcessingContext(au.edu.wehi.idsv.ProcessingContext) SoftClipEvidence(au.edu.wehi.idsv.SoftClipEvidence) SAMRecord(htsjdk.samtools.SAMRecord) DiscordantReadPair(au.edu.wehi.idsv.DiscordantReadPair) Test(org.junit.Test)

Example 17 with SoftClipEvidence

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

the class NonReferenceContigAssemblerTest method should_call_simple_fwd_SC.

@Test
public void should_call_simple_fwd_SC() {
    ProcessingContext pc = getContext();
    pc.getAssemblyParameters().k = 4;
    SoftClipEvidence sce = SCE(FWD, withSequence("ACGTGGTCGACC", Read(0, 5, "6M6S")));
    List<SAMRecord> output = go(pc, true, sce);
    assertEquals(1, output.size());
    assertEquals("ACGTGGTCGACC", S(output.get(0).getReadBases()));
    assertEquals("6M6S", output.get(0).getCigarString());
    assertEquals(0, (int) output.get(0).getReferenceIndex());
    assertEquals(5, 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 18 with SoftClipEvidence

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

the class NonReferenceContigAssemblerTest method should_truncate_anchored_polyA_expansion_fwd.

@Test
public void should_truncate_anchored_polyA_expansion_fwd() {
    ProcessingContext pc = getContext();
    pc.getAssemblyParameters().k = 4;
    SoftClipEvidence sce = SCE(FWD, withSequence("GTACAAAA", Read(0, 10, "4M4S")));
    DiscordantReadPair dp = (DiscordantReadPair) NRRP(SES(11, 100), withSequence("CAAAAT", DP(0, 1, "6M", true, 1, 1, "6M", false)));
    List<SAMRecord> output = go(pc, true, sce, dp);
    assertEquals(1, output.size());
    assertEquals("GTACAAAA", S(output.get(0).getReadBases()));
}
Also used : ProcessingContext(au.edu.wehi.idsv.ProcessingContext) SoftClipEvidence(au.edu.wehi.idsv.SoftClipEvidence) SAMRecord(htsjdk.samtools.SAMRecord) DiscordantReadPair(au.edu.wehi.idsv.DiscordantReadPair) Test(org.junit.Test)

Example 19 with SoftClipEvidence

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

the class NonReferenceContigAssemblerTest method should_call_simple_bwd_RP.

@Test
public void should_call_simple_bwd_RP() {
    ProcessingContext pc = getContext();
    pc.getAssemblyParameters().k = 4;
    MockSAMEvidenceSource ses = SES(100, 200);
    DiscordantReadPair e = (DiscordantReadPair) NRRP(ses, withSequence("ACGTGGTCGACC", DP(0, 450, "12M", false, 1, 1, "12M", true)));
    List<SAMRecord> output = go(pc, true, e);
    assertEquals(1, output.size());
    SoftClipEvidence ass = SoftClipEvidence.create(AES(ses), BWD, 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) DiscordantReadPair(au.edu.wehi.idsv.DiscordantReadPair) Test(org.junit.Test)

Example 20 with SoftClipEvidence

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

the class NonReferenceContigAssemblerTest method should_call_multiple_nonoverlapping_contigs.

@Test
public void should_call_multiple_nonoverlapping_contigs() {
    ProcessingContext pc = getContext();
    pc.getAssemblyParameters().k = 4;
    SoftClipEvidence sce = SCE(FWD, withSequence("ACGTGGTCGACC", Read(0, 5, "6M6S")));
    DiscordantReadPair e = (DiscordantReadPair) NRRP(SES(100, 200), withSequence("GACCTCTACT", DP(0, 25, "10M", true, 1, 1, "10M", false)));
    List<SAMRecord> output = go(pc, true, sce, e);
    assertEquals(2, output.size());
    assertEquals("ACGTGGTCGACC", S(output.get(0).getReadBases()));
    assertEquals("NN" + "GACCTCTACT", S(output.get(1).getReadBases()));
}
Also used : ProcessingContext(au.edu.wehi.idsv.ProcessingContext) SoftClipEvidence(au.edu.wehi.idsv.SoftClipEvidence) SAMRecord(htsjdk.samtools.SAMRecord) 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