Skip to content
Snippets Groups Projects
Commit 51b147c0 authored by Wai Yi Leung's avatar Wai Yi Leung
Browse files

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

Fix: Show a message for those plot, which were not created by FastQC. Some statistics cannot be collected by FastQC such as Kmer when the sequences are clean.
parent ede07209
No related branches found
No related tags found
No related merge requests found
......@@ -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>
......
......@@ -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