use of au.edu.wehi.idsv.picard.BufferedReferenceSequenceFile in project gridss by PapenfussLab.
the class SplitReadRealignerTest method should_realign_multiple_times.
/**
* TODO: Requires an aligner that will align 4 separate 100bp parts of a 400bp read
*/
// @Test
// @Category(ExternalAlignerTests.class)
public void should_realign_multiple_times() throws IOException {
ExternalProcessStreamingAligner aligner = new ExternalProcessStreamingAligner(SamReaderFactory.make(), ExternalAlignerTests.COMMAND_LINE, ExternalAlignerTests.REFERENCE, 4);
BufferedReferenceSequenceFile lookup = new BufferedReferenceSequenceFile(ReferenceSequenceFileFactory.getReferenceSequenceFile(ExternalAlignerTests.REFERENCE));
ProcessingContext pc = new ProcessingContext(new FileSystemContext(testFolder.getRoot(), 500000), ExternalAlignerTests.REFERENCE, lookup, Lists.newArrayList(), getConfig(testFolder.getRoot()));
SplitReadRealigner srr = new SplitReadRealigner(pc);
SAMFileHeader header = new SAMFileHeader();
header.setSequenceDictionary(lookup.getSequenceDictionary());
header.setSortOrder(SortOrder.coordinate);
SAMRecord r = new SAMRecord(header);
r.setReferenceIndex(0);
r.setAlignmentStart(1399998);
r.setCigarString("301S103M");
r.setReadBases(B("GGATATATAGGGATAGAAGCTTGAATAGTCTGGACATATATTTGTATTGAAATACAAATGTAAGATTTCAGTTAATCAATTTAAACATTTTTATTTTCAAGGGCTTCCAGCGTCCACTTCCTACGGCAAGCAGGAGGAGACAAGCGCCACCCTGCGCTCGCGGAGCCGACCCCGGCTCTCCCCTCCCGTGGCCGCAGGGGTCTGACAGAAAGGGGTCACTAATCTACTTGGCCTTTTGAGGACTGATCCTTAAGAATAATTTTTTTTTTTTTATGATCTTGAAGGCTGAGAAGTATTAGAGTAGGTTTTTTTCTCCTTCATAAGGCCAGATTCTTCTTTCTGTCACAGATTTCAAGTCCCCGCCTCAGCAGCCTTTCACTGTCAGTTCTTTCTCACGTGACCCT"));
r.setBaseQualities(B("?????BBBB@DEDDDDGGGGGEIEHIHEFHIHIIEHHIEIIIIIIEHII?HHFHHHHDIHIHEHHFIIBCHI=GHIH@HFCEIGIHIDHHHGCIIHDHHFA?????BBBB@DEDDDDGGGGGEIEHIHEFHIHIIEHHIEIIIIIIEHII?HHFHHHHDIHIHEHHFIIBCHI=GHIH@HFCEIGIHIDHHHGCIIHDHHFA?????BBBB@DEDDDDGGGGGEIEHIHEFHIHIIEHHIEIIIIIIEHII?HHFHHHHDIHIHEHHFIIBCHI=GHIH@HFCEIGIHIDHHHGCIIHDHHFA?????BBBB@DEDDDDGGGGGEIEHIHEFHIHIIEHHIEIIIIIIEHII?HHFHHHHDIHIHEHHFIIBCHI=GHIH@HFCEIGIHIDHHHGCIIHDHHFA"));
r.setReadName("four_way_split_read");
createBAM(input, header, r);
srr.createSupplementaryAlignments(aligner, input, output);
List<SAMRecord> list = getRecords(output);
assertEquals(4, list.size());
}
Aggregations