Allowing empty samples list in LIBS
-- Right now we cannot process BAM files without read groups because we enforce the samples list to not be empty when there's a SAM record. Now if there are reads and there are no samples we add the "null" sample so that LIBS walks the reads properly
This commit is contained in:
parent
a3c5a31686
commit
8e6845806a
|
|
@ -282,8 +282,12 @@ public class LocusIteratorByState extends LocusIterator {
|
||||||
|
|
||||||
// currently the GATK expects this LocusIteratorByState to accept empty sample lists, when
|
// 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
|
// there's no read data. So we need to throw this error only when samIterator.hasNext() is true
|
||||||
if ( this.samples.isEmpty() && samIterator.hasNext() )
|
if ( this.samples.isEmpty() && samIterator.hasNext() ) {
|
||||||
throw new IllegalArgumentException("samples list must not be empty");
|
// actually we cannot process BAMs without read groups unless we tolerate empty
|
||||||
|
// sample lists. In the empty case we need to add the null element to the samples
|
||||||
|
this.samples.add(null);
|
||||||
|
//throw new IllegalArgumentException("samples list must not be empty");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue