use of au.edu.wehi.idsv.ProcessingContext in project gridss by PapenfussLab.
the class NonReferenceContigAssemblerTest method should_handle_ambigious_bases.
@Test
public void should_handle_ambigious_bases() {
ProcessingContext pc = getContext();
pc.getAssemblyParameters().k = 4;
pc.getAssemblyParameters().includePairAnchors = false;
List<SAMRecord> output = go(pc, true, NRRP(SES(1, 100), withSequence("AATAAGAGT", DP(1, 100, "9M", false, 1, 1, "9M", true))), NRRP(SES(1, 100), withSequence("AATGNGAGTC", DP(1, 101, "10M", false, 1, 1, "10M", true))));
assertEquals(1, output.size());
assertEquals("AATAAGAGTC" + "NN", S(output.get(0).getReadBases()));
}
use of au.edu.wehi.idsv.ProcessingContext in project gridss by PapenfussLab.
the class NonReferenceContigAssemblerTest method anchor_should_be_trimmed_at_max_length.
@Test
public void anchor_should_be_trimmed_at_max_length() {
ProcessingContext pc = getContext();
pc.getAssemblyParameters().k = 3;
List<SAMRecord> output = go(pc, true, SCE(FWD, withSequence("AAAAAAAAAT", Read(0, 1, "9M1S"))), SCE(FWD, withSequence("AAAAAAAAAT", Read(0, 2, "9M1S"))), SCE(FWD, withSequence("AAAAAAAAAT", Read(0, 3, "9M1S"))), SCE(FWD, withSequence("AAAAAAAAAT", Read(0, 4, "9M1S"))), SCE(FWD, withSequence("AAAAAAAAAT", Read(0, 5, "9M1S"))), SCE(FWD, withSequence("AAAAAAAAAT", Read(0, 6, "9M1S"))), SCE(FWD, withSequence("AAAAAAAAAT", Read(0, 7, "9M1S"))), SCE(FWD, withSequence("AAAAAAAAAT", Read(0, 8, "9M1S"))), SCE(FWD, withSequence("AAAAAAAAAT", Read(0, 9, "9M1S"))), SCE(FWD, withSequence("AAAAAAAAAT", Read(0, 10, "9M1S"))), SCE(FWD, withSequence("AAAAAAAAAT", Read(0, 11, "9M1S"))), SCE(FWD, withSequence("AAAAAAAAAT", Read(0, 12, "9M1S"))), SCE(FWD, withSequence("AAAAAAAAAT", Read(0, 13, "9M1S"))), SCE(FWD, withSequence("AAAAAAAAAT", Read(0, 14, "9M1S"))), SCE(FWD, withSequence("AATTTTTTTTT", Read(0, 18, "2M9S"))));
assertEquals("AAAAAAAAAAATTTTTTTTT", S(output.get(0).getReadBases()));
}
use of au.edu.wehi.idsv.ProcessingContext in project gridss by PapenfussLab.
the class NonReferenceContigAssemblerTest method should_assembly_UM_into_anchor.
@Test
public void should_assembly_UM_into_anchor() {
ProcessingContext pc = getContext();
pc.getAssemblyParameters().k = 4;
pc.getAssemblyParameters().includePairAnchors = true;
pc.getAssemblyParameters().pairAnchorMismatchIgnoreEndBases = 0;
SAMRecord[] rp = OEA(0, 100, "10M", true);
rp[0].setReadBases(B(S(RANDOM).substring(0, 10)));
rp[1].setReadBases(B(S(RANDOM).substring(2, 12)));
rp[1].setReadNegativeStrandFlag(true);
NonReferenceReadPair nrrp = NRRP(SES(1, 100), rp);
List<SAMRecord> output = go(pc, false, nrrp);
assertEquals(S(RANDOM).substring(0, 12), S(output.get(0).getReadBases()));
assertEquals(0, (int) output.get(0).getReferenceIndex());
assertEquals(100, output.get(0).getAlignmentStart());
assertEquals("10M2S", output.get(0).getCigarString());
}
use of au.edu.wehi.idsv.ProcessingContext 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()));
}
use of au.edu.wehi.idsv.ProcessingContext 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()));
}
Aggregations