Error out when NCT and BAMOUT are used with the HaplotypeCaller

-- Currently we don't support writing a BAM file from the haplotype caller when nct is enabled.  Check in initialize if this is the case, and throw a UserException
This commit is contained in:
Mark DePristo 2013-06-21 09:25:57 -04:00
parent e03a5e9486
commit dee51c4189
1 changed files with 5 additions and 1 deletions

View File

@ -572,8 +572,12 @@ public class HaplotypeCaller extends ActiveRegionWalker<List<VariantContext>, In
genotypingEngine = new GenotypingEngine( DEBUG, annotationEngine, USE_FILTERED_READ_MAP_FOR_ANNOTATIONS, variantMerger );
if ( bamWriter != null )
if ( bamWriter != null ) {
// we currently do not support multi-threaded BAM writing, so exception out
if ( getToolkit().getTotalNumberOfThreads() > 1 )
throw new UserException.BadArgumentValue("bamout", "Currently cannot emit a BAM file from the HaplotypeCaller in multi-threaded mode.");
haplotypeBAMWriter = HaplotypeBAMWriter.create(bamWriterType, bamWriter, getToolkit().getSAMFileHeader());
}
trimmer = new ActiveRegionTrimmer(DEBUG, PADDING_AROUND_SNPS_FOR_CALLING, PADDING_AROUND_OTHERS_FOR_CALLING,
UAC.GenotypingMode.equals(GenotypeLikelihoodsCalculationModel.GENOTYPING_MODE.GENOTYPE_GIVEN_ALLELES) ? MAX_GGA_ACTIVE_REGION_EXTENSION : MAX_DISCOVERY_ACTIVE_REGION_EXTENSION,