Added detection of interval files with zero length to the GATK, and removed it from the interval merger walker: this was a critical blocking emergency issue for Eric.
also fixed some verbage in the GAEngine. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1449 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
0bdecd8651
commit
cd711d7697
|
|
@ -103,12 +103,12 @@ public class GenomeAnalysisEngine {
|
|||
public Object execute(GATKArgumentCollection args, Walker<?,?> my_walker) {
|
||||
// validate our parameters
|
||||
if (args == null) {
|
||||
throw new StingException("The GATKArgumentCollection passed to GenomeAnalysisEngine can be null.");
|
||||
throw new StingException("The GATKArgumentCollection passed to GenomeAnalysisEngine can not be null.");
|
||||
}
|
||||
|
||||
// validate our parameters
|
||||
if (my_walker == null)
|
||||
throw new StingException("The walker passed to GenomeAnalysisEngine can be null.");
|
||||
throw new StingException("The walker passed to GenomeAnalysisEngine can not be null.");
|
||||
|
||||
// save our argument parameter
|
||||
this.argCollection = args;
|
||||
|
|
|
|||
|
|
@ -114,15 +114,6 @@ public class IntervalMergerWalker extends ReadWalker<Integer,Integer> {
|
|||
* @return a linked list of sorted, merged intervals.
|
||||
*/
|
||||
private LinkedList<GenomeLoc> parseIntervals(List<String> intervalsSource) {
|
||||
|
||||
// ignore zero-length intervals files.
|
||||
for (int i = 0; i < intervalsSource.size(); i++)
|
||||
{
|
||||
File f = new File(intervalsSource.get(i));
|
||||
long size = f.length();
|
||||
if (size == 0) { intervalsSource.remove(i); }
|
||||
}
|
||||
|
||||
List<GenomeLoc> parsedIntervals = GenomeAnalysisEngine.parseIntervalRegion(intervalsSource);
|
||||
GenomeLocSortedSet intervalSortedSet = new GenomeLocSortedSet();
|
||||
for ( GenomeLoc parsedInterval : parsedIntervals )
|
||||
|
|
|
|||
|
|
@ -321,8 +321,12 @@ public class GenomeLocParser {
|
|||
*/
|
||||
List<GenomeLoc> ret = null;
|
||||
try {
|
||||
IntervalList il = IntervalList.fromFile(new File(file_name));
|
||||
|
||||
File inputFile = new File(file_name);
|
||||
|
||||
// sometimes we see an empty file passed as a parameter, if so return an empty list
|
||||
if (inputFile.length() < 1) return new ArrayList<GenomeLoc>();
|
||||
IntervalList il = IntervalList.fromFile(inputFile);
|
||||
|
||||
// iterate through the list of merged intervals and add then as GenomeLocs
|
||||
ret = new ArrayList<GenomeLoc>();
|
||||
for (Interval interval : il.getUniqueIntervals()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue