@@ -204,7 +204,7 @@ public void exec(ResultSet rs) throws SQLException
204204 @ Override
205205 public Output performAnalysisPerSampleLocal (AnalysisModel model , File inputBam , File referenceFasta , File outDir ) throws PipelineJobException
206206 {
207- File expectedTxt = getSBTSummaryFile (outDir , inputBam );
207+ File expectedTxt = getSBTSummaryFile (outDir , inputBam , false );
208208 if (expectedTxt .exists ())
209209 {
210210 getPipelineCtx ().getLogger ().info ("Processing SBT output: " + expectedTxt .getPath ());
@@ -310,9 +310,10 @@ public Output performAnalysisPerSampleRemote(Readset rs, File inputBam, Referenc
310310 getPipelineCtx ().getLogger ().info ("Inspection complete" );
311311
312312 //write output as TSV
313- agg .writeTable (getSBTSummaryFile (outputDir , inputBam ));
313+ agg .writeTable (getSBTSummaryFile (outputDir , inputBam , false ));
314314
315- output .addSequenceOutput (sbtOutputLog , "SBT Results: " + inputBam .getName (), "SBT Results" , rs .getReadsetId (), null , referenceGenome .getGenomeId (), null );
315+ // This will be gzipped later:
316+ output .addSequenceOutput (getSBTSummaryFile (outputDir , inputBam , true ), "SBT Results: " + inputBam .getName (), "SBT Results" , rs .getReadsetId (), null , referenceGenome .getGenomeId (), null );
316317
317318 //optionally output FASTQ of unmapped reads
318319 Double exportThreshold = getProvider ().getParameterByName (EXPORT_UNMAPPED ).extractValue (getPipelineCtx ().getJob (), getProvider (), getStepIdx (), Double .class );
@@ -375,9 +376,9 @@ public Output performAnalysisPerSampleRemote(Readset rs, File inputBam, Referenc
375376 }
376377 }
377378
378- protected File getSBTSummaryFile (File outputDir , File bam )
379+ protected File getSBTSummaryFile (File outputDir , File bam , boolean doGzip )
379380 {
380- return new File (outputDir , FileUtil .getBaseName (bam ) + ".sbt_hits.txt" );
381+ return new File (outputDir , FileUtil .getBaseName (bam ) + ".sbt_hits.txt" + ( doGzip ? ".gz" : "" ) );
381382 }
382383
383384 public static class AlignmentGroupCompare
0 commit comments