Debugging information to print out the Query tracks
This commit is contained in:
parent
d1b2b4ece9
commit
a5c65fc133
|
|
@ -25,6 +25,7 @@ package org.broadinstitute.sting.gatk.refdata.tracks;
|
||||||
|
|
||||||
import net.sf.samtools.SAMSequenceDictionary;
|
import net.sf.samtools.SAMSequenceDictionary;
|
||||||
import net.sf.samtools.util.CloseableIterator;
|
import net.sf.samtools.util.CloseableIterator;
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
import org.broad.tribble.FeatureCodec;
|
import org.broad.tribble.FeatureCodec;
|
||||||
import org.broad.tribble.FeatureSource;
|
import org.broad.tribble.FeatureSource;
|
||||||
import org.broadinstitute.sting.gatk.refdata.utils.FeatureToGATKFeatureIterator;
|
import org.broadinstitute.sting.gatk.refdata.utils.FeatureToGATKFeatureIterator;
|
||||||
|
|
@ -45,10 +46,11 @@ import java.io.IOException;
|
||||||
* the basics of what a reference metadata track must contain.
|
* the basics of what a reference metadata track must contain.
|
||||||
*/
|
*/
|
||||||
public class RMDTrack {
|
public class RMDTrack {
|
||||||
|
private final static Logger logger = Logger.getLogger(RMDTrackBuilder.class);
|
||||||
|
private final static boolean DEBUG = false;
|
||||||
|
|
||||||
// the basics of a track:
|
// the basics of a track:
|
||||||
private final Class type; // our type
|
private final Class type; // our type
|
||||||
private final Class recordType; // the underlying records that are produced by this track
|
|
||||||
private final String name; // the name
|
private final String name; // the name
|
||||||
private final File file; // the associated file we create the reader from
|
private final File file; // the associated file we create the reader from
|
||||||
|
|
||||||
|
|
@ -90,7 +92,6 @@ public class RMDTrack {
|
||||||
*/
|
*/
|
||||||
public RMDTrack(Class type, String name, File file, FeatureSource reader, SAMSequenceDictionary dict, GenomeLocParser genomeLocParser, FeatureCodec codec) {
|
public RMDTrack(Class type, String name, File file, FeatureSource reader, SAMSequenceDictionary dict, GenomeLocParser genomeLocParser, FeatureCodec codec) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.recordType = codec.getFeatureType();
|
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.file = file;
|
this.file = file;
|
||||||
this.reader = reader;
|
this.reader = reader;
|
||||||
|
|
@ -112,19 +113,8 @@ public class RMDTrack {
|
||||||
}
|
}
|
||||||
|
|
||||||
public CloseableIterator<GATKFeature> query(GenomeLoc interval) throws IOException {
|
public CloseableIterator<GATKFeature> query(GenomeLoc interval) throws IOException {
|
||||||
return new FeatureToGATKFeatureIterator(genomeLocParser,reader.query(interval.getContig(),interval.getStart(),interval.getStop()),this.getName());
|
if ( DEBUG ) logger.debug("Issuing query for %s: " + interval);
|
||||||
}
|
return new FeatureToGATKFeatureIterator(genomeLocParser, reader.query(interval.getContig(),interval.getStart(),interval.getStop()), this.getName());
|
||||||
|
|
||||||
public CloseableIterator<GATKFeature> query(GenomeLoc interval, boolean contained) throws IOException {
|
|
||||||
return new FeatureToGATKFeatureIterator(genomeLocParser,reader.query(interval.getContig(),interval.getStart(),interval.getStop()),this.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
public CloseableIterator<GATKFeature> query(String contig, int start, int stop) throws IOException {
|
|
||||||
return new FeatureToGATKFeatureIterator(genomeLocParser,reader.query(contig,start,stop),this.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
public CloseableIterator<GATKFeature> query(String contig, int start, int stop, boolean contained) throws IOException {
|
|
||||||
return new FeatureToGATKFeatureIterator(genomeLocParser,reader.query(contig,start,stop),this.getName());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void close() {
|
public void close() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue