use of au.edu.wehi.idsv.SequentialIdGenerator in project gridss by PapenfussLab.
the class PositionalAssemblerTest method anchor_should_not_overrun_contig_start.
@Test
public void anchor_should_not_overrun_contig_start() {
ProcessingContext pc = getContext();
AssemblyEvidenceSource aes = AES(pc);
pc.getAssemblyParameters().k = 4;
List<DirectedEvidence> input = new ArrayList<DirectedEvidence>();
input.add(SCE(FWD, withSequence("CGTAACCGGTTC", Read(0, 1, "1M2I4M5S"))));
ArrayList<SAMRecord> r = Lists.newArrayList(new PositionalAssembler(pc, aes, new SequentialIdGenerator("asm"), input.iterator()));
assertEquals(1, r.size());
assertEquals(1, r.get(0).getAlignmentStart());
}
use of au.edu.wehi.idsv.SequentialIdGenerator in project gridss by PapenfussLab.
the class PositionalAssemblerTest method anchor_should_not_overrun_contig_end.
@Test
public void anchor_should_not_overrun_contig_end() {
ProcessingContext pc = getContext();
AssemblyEvidenceSource aes = AES(pc);
pc.getAssemblyParameters().k = 4;
List<DirectedEvidence> input = new ArrayList<DirectedEvidence>();
input.add(SCE(BWD, withSequence("CGTAACCGGTTC", Read(0, 9996, "5S4M2I1M"))));
ArrayList<SAMRecord> r = Lists.newArrayList(new PositionalAssembler(pc, aes, new SequentialIdGenerator("asm"), input.iterator()));
assertEquals(1, r.size());
assertEquals(10000, r.get(0).getAlignmentEnd());
}
use of au.edu.wehi.idsv.SequentialIdGenerator in project gridss by PapenfussLab.
the class PositionalAssemblerTest method should_assemble_each_read_alignment_only_once.
@Test
public void should_assemble_each_read_alignment_only_once() {
ProcessingContext pc = getContext();
AssemblyEvidenceSource aes = AES(pc);
pc.getAssemblyParameters().k = 4;
String seq = "AACCGGTTAA";
List<DirectedEvidence> input = new ArrayList<DirectedEvidence>();
input.add(SCE(FWD, withSequence(seq, Read(0, 10, "5M5S"))[0]));
input.add(SCE(FWD, withSequence(seq, Read(0, 10, "5M5S"))[0]));
input.add(SCE(FWD, withSequence(seq, Read(0, 10, "5M5S"))[0]));
input.add(IE(withSequence(seq, Read(0, 10, "5M100D5M"))[0]));
input.add(IE(withSequence(seq, Read(0, 10, "5M100D5M"))[0]));
input.add(IE(withSequence(seq, Read(0, 10, "5M100D5M"))[0]));
input.sort(DirectedEvidenceOrder.ByStartEnd);
ArrayList<SAMRecord> r = Lists.newArrayList(new PositionalAssembler(pc, aes, new SequentialIdGenerator("asm"), input.iterator()));
assertEquals(2, ((int[]) r.get(0).getAttribute("sc"))[0]);
}
Aggregations