Catch underlying file system problems that get masked as Tribble index errors. There's also a quick patch to the HMS that isn't really the ultimate fix needed; Mark and I will review at a later point.

This commit is contained in:
Eric Banks 2012-07-18 15:11:38 -04:00
parent 4c730542f0
commit 9af2cfe283
2 changed files with 11 additions and 2 deletions

View File

@ -35,6 +35,7 @@ import org.broadinstitute.sting.gatk.arguments.GATKArgumentCollection;
import org.broadinstitute.sting.gatk.refdata.tracks.FeatureManager; import org.broadinstitute.sting.gatk.refdata.tracks.FeatureManager;
import org.broadinstitute.sting.gatk.walkers.Attribution; import org.broadinstitute.sting.gatk.walkers.Attribution;
import org.broadinstitute.sting.gatk.walkers.Walker; import org.broadinstitute.sting.gatk.walkers.Walker;
import org.broadinstitute.sting.utils.exceptions.ReviewedStingException;
import org.broadinstitute.sting.utils.exceptions.UserException; import org.broadinstitute.sting.utils.exceptions.UserException;
import org.broadinstitute.sting.utils.help.*; import org.broadinstitute.sting.utils.help.*;
import org.broadinstitute.sting.utils.text.TextFormattingUtils; import org.broadinstitute.sting.utils.text.TextFormattingUtils;
@ -120,9 +121,13 @@ public class CommandLineGATK extends CommandLineExecutable {
if ( message.indexOf("Too many open files") != -1 ) if ( message.indexOf("Too many open files") != -1 )
exitSystemWithUserError(new UserException.TooManyOpenFiles()); exitSystemWithUserError(new UserException.TooManyOpenFiles());
// Malformed BAM looks like a SAM file // malformed BAM looks like a SAM file
if ( message.indexOf("Cannot use index file with textual SAM file") != -1 ) if ( message.indexOf("Cannot use index file with textual SAM file") != -1 )
exitSystemWithSamError(t); exitSystemWithSamError(t);
// can't close tribble index when writing
if ( message.indexOf("Unable to close index for") != -1 )
exitSystemWithUserError(new UserException(t.getCause().getMessage()));
} }
/** /**

View File

@ -6,11 +6,11 @@ import org.broadinstitute.sting.gatk.datasources.providers.ShardDataProvider;
import org.broadinstitute.sting.gatk.datasources.reads.Shard; import org.broadinstitute.sting.gatk.datasources.reads.Shard;
import org.broadinstitute.sting.gatk.io.ThreadLocalOutputTracker; import org.broadinstitute.sting.gatk.io.ThreadLocalOutputTracker;
import org.broadinstitute.sting.gatk.traversals.TraversalEngine; import org.broadinstitute.sting.gatk.traversals.TraversalEngine;
import org.broadinstitute.sting.gatk.walkers.LocusWalker;
import org.broadinstitute.sting.gatk.walkers.Walker; import org.broadinstitute.sting.gatk.walkers.Walker;
import org.broadinstitute.sting.utils.exceptions.ReviewedStingException; import org.broadinstitute.sting.utils.exceptions.ReviewedStingException;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
/** /**
* User: hanna * User: hanna
* Date: Apr 29, 2009 * Date: Apr 29, 2009
@ -79,6 +79,10 @@ public class ShardTraverser implements Callable {
microScheduler.reportShardTraverseTime(endTime-startTime); microScheduler.reportShardTraverseTime(endTime-startTime);
return accumulator; return accumulator;
} catch(Throwable t) {
// Notify that an exception has occurred
microScheduler.handleException(new ExecutionException(t));
throw new RuntimeException(t);
} finally { } finally {
synchronized(this) { synchronized(this) {
complete = true; complete = true;