1111import org .labkey .api .data .DbSchemaType ;
1212import org .labkey .api .data .Table ;
1313import org .labkey .api .data .TableInfo ;
14- import org .labkey .api .jbrowse .JBrowseService ;
1514import org .labkey .api .module .Module ;
1615import org .labkey .api .module .ModuleLoader ;
17- import org .labkey .api .pipeline .PipelineJob ;
1816import org .labkey .api .pipeline .PipelineJobException ;
1917import org .labkey .api .reader .Readers ;
2018import org .labkey .api .resource .FileResource ;
@@ -318,6 +316,7 @@ public Provider()
318316 ), null , "http://www.bioinformatics.babraham.ac.uk/projects/bismark/" , true , false );
319317 }
320318
319+ @ Override
321320 public BismarkAlignmentStep create (PipelineContext context )
322321 {
323322 return new BismarkAlignmentStep (this , context );
@@ -326,7 +325,7 @@ public BismarkAlignmentStep create(PipelineContext context)
326325
327326 public static class BismarkExtractorStep extends AbstractCommandPipelineStep <BismarkWrapper > implements AnalysisStep
328327 {
329- public BismarkExtractorStep (PipelineStepProvider provider , PipelineContext ctx )
328+ public BismarkExtractorStep (PipelineStepProvider <?> provider , PipelineContext ctx )
330329 {
331330 super (provider , ctx , new BismarkWrapper (ctx .getLogger ()));
332331 }
@@ -386,6 +385,9 @@ public Output performAnalysisPerSampleRemote(Readset rs, File inputBam, Referenc
386385 args .add ("-o" );
387386 args .add (outputDir .getPath ());
388387
388+ args .add ("--gzip" );
389+ args .add ("-bedGraph" );
390+
389391 getWrapper ().setWorkingDir (outputDir );
390392 getWrapper ().execute (args );
391393
@@ -416,6 +418,10 @@ public Output performAnalysisPerSampleRemote(Readset rs, File inputBam, Referenc
416418 output .addOutput (new File (outputDir , outputBasename + ".bam_splitting_report.txt" ), "Bismark Splitting Report" );
417419
418420 //NOTE: because the data are likely directional, we will not encounter CTOB
421+ // OT – original top strand
422+ // CTOT – complementary to original top strand
423+ // OB – original bottom strand
424+ // CTOB – complementary to original bottom strand
419425 List <Pair <File , Integer >> CpGmethlyationData = Arrays .asList (
420426 Pair .of (new File (outputDir , "CpG_OT_" + outputBasename + ".txt.gz" ), 0 ),
421427 Pair .of (new File (outputDir , "CpG_CTOT_" + outputBasename + ".txt.gz" ), 0 ),
@@ -462,20 +468,6 @@ else if (getProvider().getParameterByName("siteReport") != null && getProvider()
462468 output .addSequenceOutput (outputGff , rs .getName () + " methylation rates (GFF)" , RATE_GFF_CATEGORY , rs .getReadsetId (), null , referenceGenome .getGenomeId (), null );
463469 }
464470
465- // File siteReport2 = new File(outputDir, FileUtil.getBaseName(inputBam) + ".NonCpG_Site_Summary.txt");
466- // File outputGff2 = new File(outputDir, FileUtil.getBaseName(inputBam) + ".NonCpG_Site_Summary.gff");
467- //
468- // produceSiteReport(getWrapper().getLogger(), siteReport2, outputGff2, NonCpGmethlyationData, minCoverageDepth);
469- // if (siteReport2.exists())
470- // {
471- // output.addOutput(siteReport2, "Bismark NonCpG Methylation Site Report");
472- // }
473- // if (outputGff2.exists())
474- // {
475- // output.addOutput(outputGff2, "Bismark NonCpG Methylation Site Data");
476- // output.addSequenceOutput(outputGff2, rs.getName() + " methylation", "NonCpG Methylation Rate Data", rs);
477- // }
478-
479471 //NOTE: if we produce the summary report, assume these are discardable intermediates. otherwise retain them
480472 for (Pair <File , Integer > pair : CpGmethlyationData )
481473 {
@@ -537,10 +529,6 @@ public Output performAnalysisPerSampleLocal(AnalysisModel model, File inputBam,
537529 }
538530 }
539531
540- JSONObject additionalConfig = new JSONObject ();
541- additionalConfig .put ("type" , "JBrowse/View/Track/Wiggle/XYPlot" );
542- additionalConfig .put ("max_score" , 1 );
543-
544532 TableInfo ti = DbSchema .get ("sequenceanalysis" , DbSchemaType .Module ).getTable ("outputfiles" );
545533 for (SequenceOutputFile so : toCreate )
546534 {
0 commit comments