If you have one sample in your BAM, getToolkit().getSamples().size() == 2
Also deleted double initializationm, where a line of code was duplicated in creating the GATK engine.
This commit is contained in:
parent
f5d7cabb20
commit
c797616c65
|
|
@ -689,8 +689,6 @@ public class GenomeAnalysisEngine {
|
|||
validateSuppliedReads();
|
||||
readsDataSource = createReadsDataSource(argCollection,genomeLocParser,referenceDataSource.getReference());
|
||||
|
||||
sampleDataSource = new SampleDataSource(getSAMFileHeader(), argCollection.sampleFiles);
|
||||
|
||||
for (ReadFilter filter : filters)
|
||||
filter.initialize(this);
|
||||
|
||||
|
|
|
|||
|
|
@ -223,8 +223,10 @@ public class CallableLociWalker extends LocusWalker<CallableLociWalker.CallableB
|
|||
|
||||
@Override
|
||||
public void initialize() {
|
||||
if ( getToolkit().getSamples().size() > 1 )
|
||||
if ( getToolkit().getSamples().size() != 2 ) {
|
||||
// unbelievably there are actually two samples even when there's just one in the header. God I hate this Samples system
|
||||
throw new UserException.BadArgumentValue("-I", "CallableLoci only works for a single sample, but multiple samples were found in the provided BAM files: " + getToolkit().getSamples());
|
||||
}
|
||||
|
||||
try {
|
||||
PrintStream summaryOut = new PrintStream(summaryFile);
|
||||
|
|
|
|||
Loading…
Reference in New Issue