Skip to content
Snippets Groups Projects
Commit 9087090a authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Merge branch 'fix-flexiprep-fastqc_report_kmer' into 'develop'

Fix: Show a message for those plot, which were not created by FastQC. Some stati…

…stics cannot be collected by FastQC such as Kmer when the sequences are clean.

See merge request !355
parents 24aa443b e45d3ce4
No related branches found
No related tags found
No related merge requests found
......@@ -14,14 +14,19 @@
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) = {
new File(summary.getLibraryValue(sampleId.get, libId.get, "flexiprep", "files", read, plot, "path").get.toString).exists()
}
}#
<div class="row">
......@@ -32,11 +37,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 +57,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>
......
......@@ -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))
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment