use of au.edu.wehi.idsv.FixedSizeReadPairConcordanceCalculator in project gridss by PapenfussLab.
the class ExtractSVReadsTest method hasReadPairingConsistentWithReference_should_search_for_any_concordant_pair.
@Test
public void hasReadPairingConsistentWithReference_should_search_for_any_concordant_pair() {
FixedSizeReadPairConcordanceCalculator rpcc = new FixedSizeReadPairConcordanceCalculator(10, 20);
List<SAMRecord> list = Lists.newArrayList(DP(0, 1, "10M", true, 1, 1, "10M", false));
assertFalse(ExtractSVReads.hasReadPairingConsistentWithReference(rpcc, list));
// positions are consistent but they from alternate mappings of the same read
list.addAll(Lists.newArrayList(DP(0, 10, "10M", false, 2, 2, "10M", false)));
assertFalse(ExtractSVReads.hasReadPairingConsistentWithReference(rpcc, list));
list.addAll(Lists.newArrayList(DP(0, 20, "10M", false, 0, 10, "10M", false)));
assertTrue(ExtractSVReads.hasReadPairingConsistentWithReference(rpcc, list));
}
use of au.edu.wehi.idsv.FixedSizeReadPairConcordanceCalculator in project gridss by PapenfussLab.
the class ExtractSVReadsTest method hasReadPairingConsistentWithReference_should_use_primary_alignment_for_split_alignments.
@Test
public void hasReadPairingConsistentWithReference_should_use_primary_alignment_for_split_alignments() {
SAMRecord r = Read(0, 1, "5M5S");
r.setAttribute("SA", new ChimericAlignment(Read(1, 50, "10M")).toString());
r.setMateAlignmentStart(100);
r.setMateNegativeStrandFlag(true);
r.setMateReferenceIndex(1);
r.setReadPairedFlag(true);
r.setMateUnmappedFlag(false);
r.setSupplementaryAlignmentFlag(true);
Assert.assertTrue(ExtractSVReads.hasReadPairingConsistentWithReference(new FixedSizeReadPairConcordanceCalculator(0, 100), ImmutableList.of(r)));
}
Aggregations