Example #1
0
 @Override
 protected void reduce(ChromosomeRegion key, Iterable<SAMRecordWritable> values, Context context)
     throws IOException, InterruptedException {
   super.reduce(key, values, context);
   try {
     Logger.DEBUG("Processing key: " + key);
     // wrappers to call external programs
     PreprocessingTools tools = new PreprocessingTools(bin);
     GATKTools gatk = new GATKTools(ref, bin);
     gatk.setContext(context);
     tools.setContext(context);
     gatk.setThreads(threads);
     if (java != null) {
       gatk.setJava(java);
       tools.setJava(java);
     }
     processAlignments(values, context, tools, gatk);
   } catch (URISyntaxException | QualityException | ProcessException ex) {
     Logger.EXCEPTION(ex);
     throw new InterruptedException(ex.getMessage());
   }
 }