a couple of additions to the tests, plus a change to the artificial resource pool to support the queryContained flag
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1099 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
2c97c5e873
commit
0a16519aa2
|
|
@ -68,7 +68,11 @@ public class ArtificialResourcePool extends SAMIteratorPool {
|
|||
if (segment instanceof MappedStreamSegment && iterator instanceof ArtificialSAMQueryIterator) {
|
||||
ArtificialSAMQueryIterator queryIterator = (ArtificialSAMQueryIterator)iterator;
|
||||
MappedStreamSegment mappedSegment = (MappedStreamSegment)segment;
|
||||
queryIterator.queryContained(mappedSegment.locus.getContig(), (int)mappedSegment.locus.getStart(), (int)mappedSegment.locus.getStop());
|
||||
if (!this.queryOverlapping) {
|
||||
queryIterator.queryContained(mappedSegment.locus.getContig(), (int)mappedSegment.locus.getStart(), (int)mappedSegment.locus.getStop());
|
||||
} else {
|
||||
queryIterator.queryOverlapping(mappedSegment.locus.getContig(), (int)mappedSegment.locus.getStart(), (int)mappedSegment.locus.getStop());
|
||||
}
|
||||
return queryIterator;
|
||||
}
|
||||
else if (segment instanceof UnmappedStreamSegment) {
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ public class SAMByIntervalTest extends BaseTest {
|
|||
*/
|
||||
@Before
|
||||
public void doForEachTest() {
|
||||
|
||||
fl = new ArrayList<File>();
|
||||
|
||||
// sequence
|
||||
|
|
@ -122,7 +123,7 @@ public class SAMByIntervalTest extends BaseTest {
|
|||
*/
|
||||
@Test
|
||||
public void testSingleRead() {
|
||||
testRead(1,ArtificialSAMUtils.DEFAULT_READ_LENGTH,1);
|
||||
testRead(1,ArtificialSAMUtils.DEFAULT_READ_LENGTH,50);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -130,7 +131,7 @@ public class SAMByIntervalTest extends BaseTest {
|
|||
*/
|
||||
@Test
|
||||
public void testChromosome() {
|
||||
testRead(1, READ_COUNT, READ_COUNT -ArtificialSAMUtils.DEFAULT_READ_LENGTH+1); // +1 because we go from 1 up to 101
|
||||
testRead(1, READ_COUNT, READ_COUNT);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -138,7 +139,7 @@ public class SAMByIntervalTest extends BaseTest {
|
|||
*/
|
||||
@Test
|
||||
public void testMiddle() {
|
||||
testRead(20, READ_COUNT-20, READ_COUNT -ArtificialSAMUtils.DEFAULT_READ_LENGTH-40+2);
|
||||
testRead(20, READ_COUNT-20,61);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue