use of au.edu.wehi.idsv.DirectedEvidence 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]);
}
use of au.edu.wehi.idsv.DirectedEvidence in project gridss by PapenfussLab.
the class SupportNodeIteratorTest method scrp.
public static List<DirectedEvidence> scrp(int k, String sequence, int minFragSize, int maxFragSize) {
SAMEvidenceSource ses = SES(minFragSize, maxFragSize);
byte[] qual = new byte[sequence.length()];
for (int i = 0; i < qual.length; i++) {
qual[i] = (byte) i;
}
List<DirectedEvidence> input = new ArrayList<DirectedEvidence>();
for (int i = 1; i <= 100; i++) {
input.add(SCE(FWD, ses, withQual(qual, withSequence(sequence, Read(0, i, "1S4M6S")))));
input.add(SCE(BWD, ses, withQual(qual, withSequence(sequence, Read(0, i, "1S4M6S")))));
input.add(NRRP(ses, withQual(qual, withSequence(sequence, DP(0, i, "1S9M1S", false, 1, 1, "11M", true)))));
input.add(NRRP(ses, withQual(qual, withSequence(sequence, DP(0, i, "1S9M1S", false, 1, 1, "11M", false)))));
}
Collections.sort(input, DirectedEvidence.ByStartEnd);
return input;
}
Aggregations