Search in sources :

Example 1 with AssemblyAttributes

use of au.edu.wehi.idsv.AssemblyAttributes 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 2 with AssemblyAttributes

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

the class PositionalAssemblerTest method should_set_assembly_direction.

@Test
public void should_set_assembly_direction() {
    ProcessingContext pc = getContext();
    pc.getAssemblyParameters().k = 4;
    pc.getAssemblyParameters().maxExpectedBreakendLengthMultiple = 10;
    List<DirectedEvidence> e = new ArrayList<>();
    // ACGTACGTACGTACGTACGT
    // 12345678901234567890
    // MMMM----MMMM
    // MMMM>>>>
    e.add(SCE(FWD, withSequence("ACGTCCGGACGG", Read(1, 1, "4M8S"))[0]));
    e.add(SCE(FWD, withSequence("ACGGTTGT", Read(1, 9, "4M4S"))[0]));
    e.sort(DirectedEvidenceOrder.ByStartEnd);
    ArrayList<SAMRecord> output = Lists.newArrayList(new PositionalAssembler(pc, AES(pc), new SequentialIdGenerator("asm"), e.iterator(), BreakendDirection.Forward));
    for (SAMRecord r : output) {
        assertEquals(BreakendDirection.Forward, new AssemblyAttributes(r).getAssemblyDirection());
    }
}
Also used : ProcessingContext(au.edu.wehi.idsv.ProcessingContext) DirectedEvidence(au.edu.wehi.idsv.DirectedEvidence) SAMRecord(htsjdk.samtools.SAMRecord) ArrayList(java.util.ArrayList) SequentialIdGenerator(au.edu.wehi.idsv.SequentialIdGenerator) AssemblyAttributes(au.edu.wehi.idsv.AssemblyAttributes) Test(org.junit.Test)

Aggregations

AssemblyAttributes (au.edu.wehi.idsv.AssemblyAttributes)2 ProcessingContext (au.edu.wehi.idsv.ProcessingContext)2 SAMRecord (htsjdk.samtools.SAMRecord)2 Test (org.junit.Test)2 DirectedEvidence (au.edu.wehi.idsv.DirectedEvidence)1 SequentialIdGenerator (au.edu.wehi.idsv.SequentialIdGenerator)1 SoftClipEvidence (au.edu.wehi.idsv.SoftClipEvidence)1 ArrayList (java.util.ArrayList)1