From 00722e19bc7c64560af81601f0d88289855a3541 Mon Sep 17 00:00:00 2001 From: depristo Date: Tue, 7 Apr 2009 22:19:54 +0000 Subject: [PATCH] The system now requires a dictionary file for a fasta file, or it throws an error. You can't just operate without a sequence dictionary any longer. We will transition to a GenomeLoc system that assumes a dictionary is available. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@319 348d0f76-0448-11de-a6fe-93d51630548a --- .../sting/gatk/traversals/TraversalEngine.java | 9 ++++----- java/src/org/broadinstitute/sting/utils/Utils.java | 11 ++++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/java/src/org/broadinstitute/sting/gatk/traversals/TraversalEngine.java b/java/src/org/broadinstitute/sting/gatk/traversals/TraversalEngine.java index bac4159d9..d1147a6f1 100755 --- a/java/src/org/broadinstitute/sting/gatk/traversals/TraversalEngine.java +++ b/java/src/org/broadinstitute/sting/gatk/traversals/TraversalEngine.java @@ -399,11 +399,10 @@ public abstract class TraversalEngine { //this.refFile = ReferenceSequenceFileFactory.getReferenceSequenceFile(refFileName); this.refFile = new FastaSequenceFile2(refFileName); // todo: replace when FastaSequenceFile2 is in picard this.refIter = new ReferenceIterator(this.refFile); -// if (!GenomeLoc.setupRefContigOrdering(this.refFile)) { -// // We couldn't process the reference contig ordering, fail since we need it -// logger.fatal(String.format("We couldn't load the contig dictionary associated with %s. At the current time we require this dictionary file to efficiently access the FASTA file. In the near future this program will automatically construct the dictionary for you and save it down.", refFileName)); -// throw new RuntimeException("We couldn't load the contig dictionary associated with " + refFileName + ". At the current time we require this dictionary file to efficiently access the FASTA file. In the near future this program will automatically construct the dictionary for you and save it down."); -// } + if (!GenomeLoc.setupRefContigOrdering(this.refFile)) { + // We couldn't process the reference contig ordering, fail since we need it + Utils.scareUser(String.format("We couldn't load the contig dictionary associated with %s. At the current time we require this dictionary file to efficiently access the FASTA file. Please use /seq/software/picard/current/bin/CreateSequenceDictionary.jar to create a sequence dictionary for your file", refFileName)); + } } } diff --git a/java/src/org/broadinstitute/sting/utils/Utils.java b/java/src/org/broadinstitute/sting/utils/Utils.java index 64d2b6738..4b931d0bf 100755 --- a/java/src/org/broadinstitute/sting/utils/Utils.java +++ b/java/src/org/broadinstitute/sting/utils/Utils.java @@ -35,11 +35,12 @@ public class Utils { } public static void scareUser(final String msg) { - logger.fatal(String.format("********************************************************************************")); - logger.fatal(String.format("* ERROR:")); - logger.fatal(String.format("*")); - logger.fatal(String.format("* %s", msg)); - logger.fatal(String.format("********************************************************************************")); + System.out.printf("********************************************************************************%n"); + System.out.printf("* ERROR:%n"); + System.out.printf("*%n"); + System.out.printf("* %s%n", msg); + System.out.printf("********************************************************************************%n"); + logger.fatal(msg); throw new RuntimeException(msg); }