Fix for GATK run report ids:
mOVsxGfDiiSMxVs2PPTVjzYTVbizlD6e f9kUHUADFsZ0LiTGxRL5zPmq9kZcA4cQ 8eGHWJFAlBVmgxwPi3sMd1RmiN2PwHOf iLhvHWveypKb2F8vKS5irHylc3pYvlOb HDttXKUMEVoPrvVeWrH7E0htxYyNydMx plus a bit of cleanup of custom exceptions in the sharding system. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4330 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
20b38b38f3
commit
8f75d88519
|
|
@ -113,7 +113,8 @@ public class SAMDataSource implements SimpleDataSource {
|
|||
readerIDs = reads.getSAMReaderIDs();
|
||||
for (SAMReaderID readerID : reads.getSAMReaderIDs()) {
|
||||
if (!readerID.samFile.canRead())
|
||||
throw new SimpleDataSourceLoadException("SAMDataSource: Unable to load file: " + readerID.samFile.getName());
|
||||
throw new UserException.CouldNotReadInputFile(readerID.samFile,"file is not present or user does not have appropriate permissions. " +
|
||||
"Please check that the file is present and readable and try again.");
|
||||
}
|
||||
|
||||
resourcePool = new SAMResourcePool(Integer.MAX_VALUE);
|
||||
|
|
|
|||
|
|
@ -32,6 +32,6 @@ public interface SimpleDataSource extends Serializable {
|
|||
* @param shard the region
|
||||
* @return an iterator of the appropriate type, that is limited by the region
|
||||
*/
|
||||
public Iterator seek(Shard shard) throws SimpleDataSourceLoadException;
|
||||
public Iterator seek(Shard shard);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,39 +0,0 @@
|
|||
package org.broadinstitute.sting.gatk.datasources.simpleDataSources;
|
||||
|
||||
import org.broadinstitute.sting.utils.exceptions.ReviewedStingException;
|
||||
|
||||
/**
|
||||
*
|
||||
* User: aaron
|
||||
* Date: Apr 6, 2009
|
||||
* Time: 4:21:58 PM
|
||||
*
|
||||
* The Broad Institute
|
||||
* SOFTWARE COPYRIGHT NOTICE AGREEMENT
|
||||
* This software and its documentation are copyright 2009 by the
|
||||
* Broad Institute/Massachusetts Institute of Technology. All rights are reserved.
|
||||
*
|
||||
* This software is supplied without any warranty or guaranteed support whatsoever. Neither
|
||||
* the Broad Institute nor MIT can be responsible for its use, misuse, or functionality.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @author aaron
|
||||
* @version 1.0
|
||||
* @date Apr 6, 2009
|
||||
* <p/>
|
||||
* Class SimpleDataSourceLoadException
|
||||
* <p/>
|
||||
* Generate this on a simple data source load exception
|
||||
*/
|
||||
public class SimpleDataSourceLoadException extends ReviewedStingException {
|
||||
public SimpleDataSourceLoadException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
|
||||
public SimpleDataSourceLoadException(String msg,Throwable throwable) {
|
||||
super(msg,throwable);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
package org.broadinstitute.sting.gatk.datasources.simpleDataSources;
|
||||
|
||||
|
||||
|
||||
import org.broadinstitute.sting.utils.exceptions.ReviewedStingException;
|
||||
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 The Broad Institute
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use,
|
||||
* copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @author aaron
|
||||
* @version 1.0
|
||||
* @date Apr 1, 2009
|
||||
* <p/>
|
||||
* Class SimpleDataSourceSplitFailure
|
||||
* <p/>
|
||||
* an exception that get's thrown if we can't split up a data source appropriately
|
||||
*/
|
||||
public class SimpleDataSourceSplitException extends ReviewedStingException {
|
||||
public SimpleDataSourceSplitException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -11,6 +11,7 @@ import org.broadinstitute.sting.gatk.iterators.StingSAMIterator;
|
|||
import org.broadinstitute.sting.gatk.ReadProperties;
|
||||
import org.broadinstitute.sting.utils.GenomeLocParser;
|
||||
import org.broadinstitute.sting.utils.GenomeLoc;
|
||||
import org.broadinstitute.sting.utils.exceptions.UserException;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
|
@ -116,9 +117,9 @@ public class SAMBAMDataSourceUnitTest extends BaseTest {
|
|||
}
|
||||
}
|
||||
}
|
||||
catch (SimpleDataSourceLoadException e) {
|
||||
catch (UserException.CouldNotReadInputFile e) {
|
||||
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
|
||||
fail("testLinearBreakIterateAll: We Should get a SimpleDataSourceLoadException");
|
||||
fail("testLinearBreakIterateAll: We Should get a UserException.CouldNotReadInputFile exception");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -162,9 +163,9 @@ public class SAMBAMDataSourceUnitTest extends BaseTest {
|
|||
datum.close();
|
||||
}
|
||||
}
|
||||
catch (SimpleDataSourceLoadException e) {
|
||||
catch (UserException.CouldNotReadInputFile e) {
|
||||
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
|
||||
fail("testLinearBreakIterateAll: We Should get a SimpleDataSourceLoadException");
|
||||
fail("testLinearBreakIterateAll: We Should get a UserException.CouldNotReadInputFile exception");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -201,9 +202,9 @@ public class SAMBAMDataSourceUnitTest extends BaseTest {
|
|||
datum.close();
|
||||
}
|
||||
}
|
||||
catch (SimpleDataSourceLoadException e) {
|
||||
catch (UserException.CouldNotReadInputFile e) {
|
||||
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
|
||||
fail("testLinearBreakIterateAll: We Should get a SimpleDataSourceLoadException");
|
||||
fail("testLinearBreakIterateAll: We Should get a UserException.CouldNotReadInputFile exception");
|
||||
}
|
||||
|
||||
/*int pos = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue