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:
aaron 2009-06-25 18:30:32 +00:00
parent 2c97c5e873
commit 0a16519aa2
2 changed files with 9 additions and 4 deletions

View File

@ -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) {

View File

@ -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);
}