From f5c295b6b233d080fbd618371e812721e07c5316 Mon Sep 17 00:00:00 2001 From: aaron Date: Thu, 9 Sep 2010 17:56:36 +0000 Subject: [PATCH] add a little bit of documentation to the RMD track builder and wrap any exceptions thrown in tribble with the file source and line that caused the error. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4243 348d0f76-0448-11de-a6fe-93d51630548a --- .../tracks/builders/TribbleRMDTrackBuilder.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/builders/TribbleRMDTrackBuilder.java b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/builders/TribbleRMDTrackBuilder.java index c036e596f..51c9b8306 100644 --- a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/builders/TribbleRMDTrackBuilder.java +++ b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/builders/TribbleRMDTrackBuilder.java @@ -107,6 +107,12 @@ public class TribbleRMDTrackBuilder extends PluginManager implemen return new TribbleTrack(targetClass, name, inputFile, pair.first, pair.second, createCodec(targetClass, name)); } + /** + * create a tribble feature reader class, given the target class and the input file + * @param targetClass the target class, of a Tribble Codec type + * @param inputFile the input file, that corresponds to the feature type + * @return a pair of + */ public Pair createFeatureReader(Class targetClass, File inputFile) { return createFeatureReader(targetClass, "anonymous", inputFile); } @@ -147,6 +153,12 @@ public class TribbleRMDTrackBuilder extends PluginManager implemen } } + /** + * add a name to the codec, if it takes one + * @param targetClass the class to create a codec for + * @param name the name to assign this codec + * @return the feature codec itself + */ private FeatureCodec createCodec(Class targetClass, String name) { FeatureCodec codex = this.createByType(targetClass); if ( codex instanceof NameAwareCodec )