Rev Picard with performance enhancements.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3615 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
0cafd3d642
commit
003dd4de3e
|
|
@ -2,6 +2,8 @@ package org.broadinstitute.sting.utils.sam;
|
|||
|
||||
import net.sf.samtools.SAMFileReader;
|
||||
import net.sf.samtools.SAMRecord;
|
||||
import net.sf.samtools.SAMRecordIterator;
|
||||
import net.sf.samtools.SAMFileHeader;
|
||||
import net.sf.samtools.util.CloseableIterator;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
|
@ -51,7 +53,7 @@ public class ArtificialSAMFileReader extends SAMFileReader {
|
|||
* @{inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public CloseableIterator<SAMRecord> query(final String sequence, final int start, final int end, final boolean contained) {
|
||||
public SAMRecordIterator query(final String sequence, final int start, final int end, final boolean contained) {
|
||||
GenomeLoc region = GenomeLocParser.createGenomeLoc(sequence, start, end);
|
||||
List<SAMRecord> coveredSubset = new ArrayList<SAMRecord>();
|
||||
|
||||
|
|
@ -62,17 +64,25 @@ public class ArtificialSAMFileReader extends SAMFileReader {
|
|||
}
|
||||
|
||||
final Iterator<SAMRecord> iterator = coveredSubset.iterator();
|
||||
return new CloseableIterator<SAMRecord>() {
|
||||
return new SAMRecordIterator() {
|
||||
public boolean hasNext() { return iterator.hasNext(); }
|
||||
public SAMRecord next() { return iterator.next(); }
|
||||
public void close() {}
|
||||
public void remove() { iterator.remove(); }
|
||||
public void remove() { iterator.remove(); }
|
||||
public SAMRecordIterator assertSorted(SAMFileHeader.SortOrder sortOrder) { return this; }
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public CloseableIterator<SAMRecord> iterator() {
|
||||
return StingSAMIteratorAdapter.adapt( new Reads( Collections.<File>emptyList() ), reads.iterator() );
|
||||
public SAMRecordIterator iterator() {
|
||||
return new SAMRecordIterator() {
|
||||
private final Iterator<SAMRecord> iterator = reads.iterator();
|
||||
public boolean hasNext() { return iterator.hasNext(); }
|
||||
public SAMRecord next() { return iterator.next(); }
|
||||
public void close() {}
|
||||
public void remove() { iterator.remove(); }
|
||||
public SAMRecordIterator assertSorted(SAMFileHeader.SortOrder sortOrder) { return this; }
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
|
|||
@Test
|
||||
public void testOtherFormat() {
|
||||
HashMap<String, String> e = new HashMap<String, String>();
|
||||
e.put( "GLF", "ddb1074b6f4a0fd1e15e4381476f1055" );
|
||||
e.put( "GLF", "b3d463eb0b7e59604296747e1eb7103c" );
|
||||
e.put( "GELI_BINARY", "764a0fed1b3cf089230fd91f3be9c2df" );
|
||||
|
||||
for ( Map.Entry<String, String> entry : e.entrySet() ) {
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -1,3 +1,3 @@
|
|||
<ivy-module version="1.0">
|
||||
<info organisation="edu.mit.broad" module="picard-private-parts" revision="1432" status="integration" publication="20100616174700" />
|
||||
<info organisation="edu.mit.broad" module="picard-private-parts" revision="1443" status="integration" publication="20100622171000" />
|
||||
</ivy-module>
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
<ivy-module version="1.0">
|
||||
<info organisation="net.sf" module="picard" revision="1.22.448" status="release" />
|
||||
</ivy-module>
|
||||
Binary file not shown.
|
|
@ -0,0 +1,3 @@
|
|||
<ivy-module version="1.0">
|
||||
<info organisation="net.sf" module="picard" revision="1.24.465" status="release" />
|
||||
</ivy-module>
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
<ivy-module version="1.0">
|
||||
<info organisation="net.sf" module="sam" revision="1.22.448" status="release" />
|
||||
</ivy-module>
|
||||
Binary file not shown.
|
|
@ -0,0 +1,3 @@
|
|||
<ivy-module version="1.0">
|
||||
<info organisation="net.sf" module="sam" revision="1.24.465" status="release" />
|
||||
</ivy-module>
|
||||
Loading…
Reference in New Issue