Better error message for unknown reference file extension.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5359 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
depristo 2011-03-02 17:52:16 +00:00
parent bef83b8b09
commit c152ef4339
1 changed files with 3 additions and 0 deletions

View File

@ -25,6 +25,7 @@
package org.broadinstitute.sting.gatk.datasources.reference;
import net.sf.picard.reference.ReferenceSequenceFileFactory;
import org.broadinstitute.sting.utils.exceptions.ReviewedStingException;
import net.sf.picard.reference.FastaSequenceIndexBuilder;
import net.sf.picard.sam.CreateSequenceDictionary;
@ -179,6 +180,8 @@ public class ReferenceDataSource implements ReferenceDataSourceProgressListener
index = new CachingIndexedFastaSequenceFile(fastaFile);
} catch (IllegalArgumentException e) {
throw new UserException.CouldNotReadInputFile(fastaFile, "Could not read reference sequence. The FASTA must have one of the following extensions: " + ReferenceSequenceFileFactory.FASTA_EXTENSIONS.toString(), e);
}
catch (Exception e) {
throw new UserException.CouldNotReadInputFile(fastaFile, e);