#import(nl.lumc.sasc.biopet.utils.summary.Summary)
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
#import(nl.lumc.sasc.biopet.pipelines.flexiprep.FlexiprepReport)
#import(java.io.File)
<%@ var summary: Summary %>
<%@ var sampleId: Option[String] = None %>
<%@ var libId: Option[String] = None %>
<%@ var rootPath: String %>
<%@ var outputDir: File %>
<%@ var showPlot: Boolean = false %>
<%@ var showTable: Boolean = true %>
<%@ var showIntro: Boolean = true %>
<%@ var multisample: Boolean = true %>
#{
val samples = sampleId match {
case Some(sample) => List(sample.toString)
case _ => summary.samples.toList
}
val trimCount = summary.getLibraryValues("flexiprep", "settings", "skip_trim").count(_._2 == Some(false))
val clipCount = summary.getLibraryValues("flexiprep", "settings", "skip_clip").count(_._2 == Some(false))
val librariesCount = summary.samples.foldLeft(0)(_ + summary.libraries(_).size)
}#
#if (showIntro)
#if (trimCount == librariesCount && clipCount == librariesCount) You have selected both adaptor clipping and read trimming as pre-processing steps #elseif (trimCount == librariesCount && clipCount == 0) You have selected only read trimming as pre-processing step #elseif (trimCount == 0 && clipCount == librariesCount) You have selected only adaptor clipping as pre-processing step #elseif (trimCount == 0 && clipCount == 0) You have selected no pre-processing step to be performed #elseif (trimCount > 0 && clipCount == 0) You have selected adaptor clipping as pre-processing steps #elseif (trimCount == 0 && clipCount > 0) You have chosen to turn adaptor clipping for some libraries, but not all. #else You have chosen to turn adaptor clipping and read trimming off for some libraries, but not all. #end
#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. 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 synced reads. That is, reads removed in one orientation should be removed in the other as well to ensure correctness. #end
Sample | Library | Before QC | Clipping | Trimming | After QC | |
---|---|---|---|---|---|---|
#if (multisample) ${sample} #else ${sample} #end | #for (libId <- libs) #if (libs.head != libId)||||||
#if (multisample) ${libId} #else ${libId} #end | #{ val reads = if (paired == true) List("R1", "R2") else List("R1") }# #for (read <- reads) #if (read == "R2")||||||
${read} | ${beforeTotal} | ${clippingDiscardedToShort + clippingDiscardedToLong} | ${trimmingDiscarded} | ${afterTotal} | #end