Only throws an error when there are no samples but there are reads
-- Handles the case when you are running a ROD traversal and yet the LIBS is still used to return null everywhere.
This commit is contained in:
parent
f552aede42
commit
fee89e47ff
|
|
@ -280,7 +280,9 @@ public class LocusIteratorByState extends LocusIterator {
|
||||||
this.samples = new ArrayList<String>(samples);
|
this.samples = new ArrayList<String>(samples);
|
||||||
this.readStates = new ReadStateManager(samIterator,readInformation.getDownsamplingMethod());
|
this.readStates = new ReadStateManager(samIterator,readInformation.getDownsamplingMethod());
|
||||||
|
|
||||||
if ( this.samples.isEmpty() )
|
// currently the GATK expects this LocusIteratorByState to accept empty sample lists, when
|
||||||
|
// there's no read data. So we need to throw this error only when samIterator.hasNext() is true
|
||||||
|
if ( this.samples.isEmpty() && samIterator.hasNext() )
|
||||||
throw new IllegalArgumentException("samples list must not be empty");
|
throw new IllegalArgumentException("samples list must not be empty");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue