From cafc245a43ff9a470218f7f119e580120c9f8716 Mon Sep 17 00:00:00 2001 From: Eric Banks Date: Thu, 27 Oct 2011 23:54:28 -0400 Subject: [PATCH] For some reason, a class of Codecs (including TableCodec) require that a GenomeLocParser be passed in to do the position processing. Why can't they just return a Feature with chr, start, stop? Isn't that the right thing? --- .../org/broadinstitute/sting/commandline/IntervalBinding.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/java/src/org/broadinstitute/sting/commandline/IntervalBinding.java b/public/java/src/org/broadinstitute/sting/commandline/IntervalBinding.java index 53525d27a..86ca6c2df 100644 --- a/public/java/src/org/broadinstitute/sting/commandline/IntervalBinding.java +++ b/public/java/src/org/broadinstitute/sting/commandline/IntervalBinding.java @@ -29,6 +29,7 @@ import org.broad.tribble.Feature; import org.broad.tribble.FeatureCodec; import org.broad.tribble.readers.AsciiLineReader; import org.broadinstitute.sting.gatk.GenomeAnalysisEngine; +import org.broadinstitute.sting.gatk.refdata.ReferenceDependentFeatureCodec; import org.broadinstitute.sting.gatk.refdata.tracks.FeatureManager; import org.broadinstitute.sting.utils.GenomeLoc; import org.broadinstitute.sting.utils.exceptions.UserException; @@ -83,6 +84,8 @@ public final class IntervalBinding { // TODO -- after ROD system cleanup, go through the ROD system so that we can handle things like gzipped files FeatureCodec codec = new FeatureManager().getByName(featureIntervals.getTribbleType()).getCodec(); + if ( codec instanceof ReferenceDependentFeatureCodec ) + ((ReferenceDependentFeatureCodec)codec).setGenomeLocParser(toolkit.getGenomeLocParser()); try { FileInputStream fis = new FileInputStream(new File(featureIntervals.getSource())); AsciiLineReader lineReader = new AsciiLineReader(fis);