More bugfixes for cases where no sample name is present.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3578 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
22abbc0edb
commit
c1595a383a
|
|
@ -276,8 +276,11 @@ public class DownsamplingLocusIteratorByState extends LocusIterator {
|
|||
public DownsamplingLocusIteratorByState(final Iterator<SAMRecord> samIterator, Reads readInformation, List<LocusIteratorFilter> filters ) {
|
||||
// Aggregate all sample names.
|
||||
// TODO: Push in header via constructor
|
||||
if(GenomeAnalysisEngine.instance != null && GenomeAnalysisEngine.instance.getDataSource() != null)
|
||||
if(GenomeAnalysisEngine.instance != null && GenomeAnalysisEngine.instance.getDataSource() != null) {
|
||||
sampleNames.addAll(SampleUtils.getSAMFileSamples(GenomeAnalysisEngine.instance.getSAMFileHeader()));
|
||||
}
|
||||
// Add a null sample name as a catch-all for reads without samples
|
||||
if(!sampleNames.contains(null)) sampleNames.add(null);
|
||||
readStates = new ReadStateManager(samIterator,readInformation.getDownsamplingMethod(),readInformation.getMaxReadsAtLocus(),sampleNames);
|
||||
this.readInfo = readInformation;
|
||||
this.filters = filters;
|
||||
|
|
|
|||
Loading…
Reference in New Issue