Commit 660e1416 authored by Sander Bollen's avatar Sander Bollen
Browse files

flexiprep read messages

parent ae450d22
...@@ -16,13 +16,60 @@ ...@@ -16,13 +16,60 @@
case _ => summary.samples.toList case _ => summary.samples.toList
} }
}# }#
#{
def flexiprepConfig: String = {
val skip_trim = summary.getLibraryValues("flexiprep", "settings", "skip_trim")
val skip_clip = summary.getLibraryValues("flexiprep", "settings", "skip_clip")
// this means both adaptor trimming and clipping are enabled
if(skip_clip.forall(_._2 == Some(false)) && skip_trim.forall(_._2 == Some(false))) "trim_clip"
// This means everything was disabled
else if(skip_clip.forall(_._2 == Some(true)) && skip_trim.forall(_._2 == Some(true))) "None"
// this means trimming was partially disabled, but not clipping
else if(skip_trim.exists(_._2 == Some(true)) && skip_clip.map(_._2).toList.distinct.size == 1) "partial_trim"
//this means clipping was partially disabled, but not trimming
else if(skip_clip.exists(_._2 == Some(true)) && skip_trim.map(_._2).toList.distinct.size == 1) "partial_clip"
// this means both trimming and clipping were partially disabled
else "partial_both"
}
/**
* TODO: This should probably be an enum in stead.
* It's likely best to do this in a separate reporting module rather than in one big jar.
*/
val flexiprepConfigMap = Map(
"trim_clip" -> """You have selected both <a href="https://en.wikibooks.org/wiki/Next_Generation_Sequencing_%28NGS%29/Pre-processing#Alternative_clipping_strategies_.28Adaptor_clipping.29">adaptor clipping</a> and <a href="https://en.wikibooks.org/wiki/Next_Generation_Sequencing_%28NGS%29/Pre-processing#Sequence_Quality_Trimming">read trimming</a> as pre-processing steps""",
"None" -> """You have selected no pre-processing step to be performed""",
"partial_trim" -> """You have chosen to turn <a href="https://en.wikibooks.org/wiki/Next_Generation_Sequencing_%28NGS%29/Pre-processing#Sequence_Quality_Trimming">read trimming </a> off for some libraries, but not all.""",
"partial_clip" -> """You have chosen to turn <a href="https://en.wikibooks.org/wiki/Next_Generation_Sequencing_%28NGS%29/Pre-processing#Alternative_clipping_strategies_.28Adaptor_clipping.29">adaptor clipping</a> for some libraries, but not all.""",
"partial_both" -> """You have chosen to turn <a href="https://en.wikibooks.org/wiki/Next_Generation_Sequencing_%28NGS%29/Pre-processing#Alternative_clipping_strategies_.28Adaptor_clipping.29">adaptor clipping</a> and <a href="https://en.wikibooks.org/wiki/Next_Generation_Sequencing_%28NGS%29/Pre-processing#Sequence_Quality_Trimming">read trimming</a> off for some libraries, but not all."""
)
val flexiprepDisplayed = flexiprepConfigMap(flexiprepConfig)
}#
#if (showIntro) #if (showIntro)
<br/> <br/>
<div class="row"> <div class="row">
<div class="col-md-1"></div> <div class="col-md-1"></div>
<div class="col-md-6"> <div class="col-md-6">
<p> <p>
${unescape(flexiprepDisplayed)}
</p>
<p>
#if(sampleId.isDefined && libId.isDefined)
Here we show aggregated quality statistics for sequencing library ${libId} for sample ${sampleId}. It shows the total number of reads used after quality control, and the total number of reads discarded during quality control. This is done for both forward and reverse reads.
#elseif(sampleId.isDefined)
Here we show aggregated quality statistics for every sequencing library for sample ${sampleId}. It shows the total number of reads used after quality control, and the total number of reads discarded during quality control. This is done for both forward and reverse reads.
#else
Here we show aggregated quality statistics for every sequencing library. It shows the total number of reads used after quality control, and the total number of reads discarded during quality control. This is done for both forward and reverse reads. Here we show aggregated quality statistics for every sequencing library. It shows the total number of reads used after quality control, and the total number of reads discarded during quality control. This is done for both forward and reverse reads.
We show two plots; one for the forward read in the pair, and another one of the reverse read in the pair.
Red denotes number of reads left after QC. Green denotes reads filtered by adaptor clipping.
Blue denotes number of reads filtered by read trimming.
Purple denotes the amount of <em>synced</em> reads. That is, reads removed in one orientation should be removed in the other as well to ensure correctness.
#end
</p> </p>
</div> </div>
</div> </div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment