diff --git a/public/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepFastaqcPlot.ssp b/public/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepFastQcPlot.ssp similarity index 71% rename from public/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepFastaqcPlot.ssp rename to public/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepFastQcPlot.ssp index 8ca3f81e493799d8de488c3e333ca8cc3114268e..cd67a357fb3fa72e3ff785c32825efd181e265ed 100644 --- a/public/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepFastaqcPlot.ssp +++ b/public/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepFastQcPlot.ssp @@ -14,14 +14,22 @@ def getPlot(read:String) = { summary.getLibraryValue(sampleId.get, libId.get, "flexiprep", "files", read, plot, "path").collect { - case value => { - val file = new File(value.toString) + case path => { + val file = new File(path.toString) val newFile = new File(outputDir, read + "_" + file.getName) if (file.exists()) FileUtils.copyFile(file, newFile) newFile.getName } } } + + def plotAvailable(read:String) = { + summary.getLibraryValue(sampleId.get, libId.get, "flexiprep", "files", read, plot, "md5").collect { + case md5 if md5 != "error_on_capture" => true + case otherwise => false + }.getOrElse(false) + } + }# <div class="row"> @@ -32,11 +40,19 @@ <div class="row"> <div class="col-md-1"><b>R1</b></div> <div class="col-md-5"> + #if (plotAvailable( "fastqc_R1" )) <img class="img-responsive" src="${getPlot("fastqc_R1")}" /> + #else + Image was not generated by FastQC + #end </div> #if (!skipTrim || !skipClip) <div class="col-md-5"> + #if (plotAvailable( "fastqc_R1_qc" )) <img class="img-responsive" src="${getPlot("fastqc_R1_qc")}" /> + #else + Image was not generated by FastQC + #end </div> #end </div> @@ -44,11 +60,19 @@ <div class="row"> <div class="col-md-1"><b>R2</b></div> <div class="col-md-5"> + #if (plotAvailable( "fastqc_R2" )) <img class="img-responsive" src="${getPlot("fastqc_R2")}" /> + #else + Image was not generated by FastQC + #end </div> #if (!skipTrim || !skipClip) <div class="col-md-5"> + #if (plotAvailable( "fastqc_R2_qc" )) <img class="img-responsive" src="${getPlot("fastqc_R2_qc")}" /> + #else + Image was not generated by FastQC + #end </div> #end </div> diff --git a/public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/FlexiprepReport.scala b/public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/FlexiprepReport.scala index c715f1338e944bd560b6c2103615e620398b88fc..83b78b657cdeed9e8110109c50abd7fdaafe6c00 100644 --- a/public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/FlexiprepReport.scala +++ b/public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/FlexiprepReport.scala @@ -62,7 +62,7 @@ object FlexiprepReport extends ReportBuilder { fastqcPlotSection("Sequence quality", "plot_per_sequence_quality"), fastqcPlotSection("Base GC content", "plot_per_base_gc_content"), fastqcPlotSection("Sequence GC content", "plot_per_sequence_gc_content"), - fastqcPlotSection("Base seqeunce content", "plot_per_base_sequence_content"), + fastqcPlotSection("Base sequence content", "plot_per_base_sequence_content"), fastqcPlotSection("Duplication", "plot_duplication_levels"), fastqcPlotSection("Kmers", "plot_kmer_profiles"), fastqcPlotSection("Length distribution", "plot_sequence_length_distribution") @@ -71,7 +71,7 @@ object FlexiprepReport extends ReportBuilder { ) protected def fastqcPlotSection(name: String, tag: String) = { - name -> ReportSection("/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepFastaqcPlot.ssp", Map("plot" -> tag)) + name -> ReportSection("/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepFastQcPlot.ssp", Map("plot" -> tag)) } /**