Merged bug fix from Stable into Unstable
This commit is contained in:
commit
2c3176eb80
|
|
@ -256,7 +256,7 @@ public class BAMScheduler implements Iterator<FilePointer> {
|
||||||
// Naive algorithm: find all elements in current contig for proper schedule creation.
|
// Naive algorithm: find all elements in current contig for proper schedule creation.
|
||||||
List<GenomeLoc> lociInContig = new LinkedList<GenomeLoc>();
|
List<GenomeLoc> lociInContig = new LinkedList<GenomeLoc>();
|
||||||
for(GenomeLoc locus: loci) {
|
for(GenomeLoc locus: loci) {
|
||||||
if(dataSource.getHeader().getSequence(locus.getContig()).getSequenceIndex() == lastReferenceSequenceLoaded)
|
if(!GenomeLoc.isUnmapped(locus) && dataSource.getHeader().getSequence(locus.getContig()).getSequenceIndex() == lastReferenceSequenceLoaded)
|
||||||
lociInContig.add(locus);
|
lociInContig.add(locus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,28 @@ public class IntervalIntegrationTest extends WalkerTest {
|
||||||
executeTest("testUnmappedReadInclusion",spec);
|
executeTest("testUnmappedReadInclusion",spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testMixedMappedAndUnmapped() {
|
||||||
|
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||||
|
"-T PrintReads" +
|
||||||
|
" -I " + validationDataLocation + "MV1994.bam" +
|
||||||
|
" -R " + validationDataLocation + "Escherichia_coli_K12_MG1655.fasta" +
|
||||||
|
" -L Escherichia_coli_K12:4630000-4639675" +
|
||||||
|
" -L unmapped" +
|
||||||
|
" -U",
|
||||||
|
0, // two output files
|
||||||
|
Collections.<String>emptyList());
|
||||||
|
|
||||||
|
// our base file
|
||||||
|
File baseOutputFile = createTempFile("testUnmappedReadInclusion",".bam");
|
||||||
|
spec.setOutputFileLocation(baseOutputFile);
|
||||||
|
spec.addAuxFile("083ef1e9ded868e0d12c05a1354c0319",createTempFileFromBase(baseOutputFile.getAbsolutePath()));
|
||||||
|
spec.addAuxFile("fa90ff91ac0cc689c71a3460a3530b8b", createTempFileFromBase(baseOutputFile.getAbsolutePath().substring(0,baseOutputFile.getAbsolutePath().indexOf(".bam"))+".bai"));
|
||||||
|
|
||||||
|
executeTest("testUnmappedReadInclusion",spec);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test(enabled = false)
|
@Test(enabled = false)
|
||||||
public void testUnmappedReadExclusion() {
|
public void testUnmappedReadExclusion() {
|
||||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue