Better error checking for missing .dict file.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@741 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
7161b8f927
commit
d35e20ce21
|
|
@ -67,7 +67,9 @@ public class IndexedFastaSequenceFile implements ReferenceSequenceFile {
|
||||||
dictionaryName = dictionaryName.substring(0, dictionaryName.lastIndexOf(".fasta"));
|
dictionaryName = dictionaryName.substring(0, dictionaryName.lastIndexOf(".fasta"));
|
||||||
dictionaryName += ".dict";
|
dictionaryName += ".dict";
|
||||||
final File dictionary = new File(dictionaryName);
|
final File dictionary = new File(dictionaryName);
|
||||||
if (dictionary.exists()) {
|
if (!dictionary.exists())
|
||||||
|
throw new PicardException("Unable to load .dict file. Dictionary is required for the indexed fasta reader.");
|
||||||
|
|
||||||
IoUtil.assertFileIsReadable(dictionary);
|
IoUtil.assertFileIsReadable(dictionary);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
@ -80,7 +82,6 @@ public class IndexedFastaSequenceFile implements ReferenceSequenceFile {
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
throw new PicardException("Could not open sequence dictionary file: " + dictionaryName, e);
|
throw new PicardException("Could not open sequence dictionary file: " + dictionaryName, e);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue