From a5c65fc133db34228acd4e5b8cb0ba1c9a43f037 Mon Sep 17 00:00:00 2001 From: Mark DePristo Date: Sun, 28 Aug 2011 18:54:49 -0400 Subject: [PATCH] Debugging information to print out the Query tracks --- .../sting/gatk/refdata/tracks/RMDTrack.java | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/public/java/src/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrack.java b/public/java/src/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrack.java index ba1ca674e..a97f3211c 100644 --- a/public/java/src/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrack.java +++ b/public/java/src/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrack.java @@ -25,6 +25,7 @@ package org.broadinstitute.sting.gatk.refdata.tracks; import net.sf.samtools.SAMSequenceDictionary; import net.sf.samtools.util.CloseableIterator; +import org.apache.log4j.Logger; import org.broad.tribble.FeatureCodec; import org.broad.tribble.FeatureSource; 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. */ public class RMDTrack { + private final static Logger logger = Logger.getLogger(RMDTrackBuilder.class); + private final static boolean DEBUG = false; // the basics of a track: 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 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) { this.type = type; - this.recordType = codec.getFeatureType(); this.name = name; this.file = file; this.reader = reader; @@ -112,19 +113,8 @@ public class RMDTrack { } public CloseableIterator query(GenomeLoc interval) throws IOException { - return new FeatureToGATKFeatureIterator(genomeLocParser,reader.query(interval.getContig(),interval.getStart(),interval.getStop()),this.getName()); - } - - public CloseableIterator query(GenomeLoc interval, boolean contained) throws IOException { - return new FeatureToGATKFeatureIterator(genomeLocParser,reader.query(interval.getContig(),interval.getStart(),interval.getStop()),this.getName()); - } - - public CloseableIterator query(String contig, int start, int stop) throws IOException { - return new FeatureToGATKFeatureIterator(genomeLocParser,reader.query(contig,start,stop),this.getName()); - } - - public CloseableIterator query(String contig, int start, int stop, boolean contained) throws IOException { - return new FeatureToGATKFeatureIterator(genomeLocParser,reader.query(contig,start,stop),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 void close() {