Commit aca99bf8 authored by Sander Bollen's avatar Sander Bollen
Browse files

Merge branch 'fix-flexiprep' into 'develop'

Fix flexiprep

Fixing some small issue here found in integration tests.

See merge request !247
parents bbc3592a 88776973
......@@ -53,6 +53,8 @@ class CollectGcBiasMetrics(val root: Configurable) extends Picard with Summariza
@Argument(doc = "IS_BISULFITE_SEQUENCED", required = false)
var isBisulfiteSequinced: Option[Boolean] = config("isbisulfitesequinced")
override def defaultCoreMemory = 8.0
override def beforeGraph() {
super.beforeGraph()
if (outputChart == null) outputChart = new File(output + ".pdf")
......
......@@ -33,7 +33,7 @@ class CollectMultipleMetrics(val root: Configurable) extends Picard with Summari
javaMainClass = new picard.analysis.CollectMultipleMetrics().getClass.getName
override def defaultCoreMemory = 6.0
override def defaultCoreMemory = 8.0
@Input(doc = "The input SAM or BAM files to analyze", required = true)
var input: File = null
......
......@@ -201,7 +201,8 @@ class Fastqc(root: Configurable) extends nl.lumc.sasc.biopet.extensions.Fastqc(r
def summaryStats: Map[String, Any] = Map(
"per_base_sequence_quality" -> perBaseSequenceQuality,
"per_base_sequence_content" -> perBaseSequenceContent)
"per_base_sequence_content" -> perBaseSequenceContent,
"adapters" -> foundAdapters.map(x => x.name -> x.seq).toMap)
}
object Fastqc {
......
......@@ -250,24 +250,22 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with
if (fastq_R1.length != fastq_R2.length && paired)
throw new IllegalStateException("R1 and R2 file number is not the same")
if (!skipTrim || !skipClip) {
if (fastq_R1.length > 1) {
add(Zcat(this, fastq_R1, fastqR1Qc) | new Gzip(this) > fastqR1Qc)
if (paired) add(Zcat(this, fastq_R2, fastqR2Qc.get) | new Gzip(this) > fastqR2Qc.get)
}
if (fastq_R1.length > 1) {
add(Zcat(this, fastq_R1, fastqR1Qc) | new Gzip(this) > fastqR1Qc)
if (paired) add(Zcat(this, fastq_R2, fastqR2Qc.get) | new Gzip(this) > fastqR2Qc.get)
}
outputFiles += ("output_R1_gzip" -> fastqR1Qc)
if (paired) outputFiles += ("output_R2_gzip" -> fastqR2Qc.get)
outputFiles += ("output_R1_gzip" -> fastqR1Qc)
if (paired) outputFiles += ("output_R2_gzip" -> fastqR2Qc.get)
fastqc_R1_after = Fastqc(this, fastqR1Qc, new File(outputDir, R1_name + ".qc.fastqc/"))
add(fastqc_R1_after)
addSummarizable(fastqc_R1_after, "fastqc_R1_qc")
fastqc_R1_after = Fastqc(this, fastqR1Qc, new File(outputDir, R1_name + ".qc.fastqc/"))
add(fastqc_R1_after)
addSummarizable(fastqc_R1_after, "fastqc_R1_qc")
if (paired) {
fastqc_R2_after = Fastqc(this, fastqR2Qc.get, new File(outputDir, R2_name + ".qc.fastqc/"))
add(fastqc_R2_after)
addSummarizable(fastqc_R2_after, "fastqc_R2_qc")
}
if (paired) {
fastqc_R2_after = Fastqc(this, fastqR2Qc.get, new File(outputDir, R2_name + ".qc.fastqc/"))
add(fastqc_R2_after)
addSummarizable(fastqc_R2_after, "fastqc_R2_qc")
}
addSummaryJobs()
......
......@@ -73,11 +73,7 @@ class FlexiprepTest extends TestNGSuite with Matchers {
flexiprep.libId = Some("1")
flexiprep.script()
flexiprep.functions.count(_.isInstanceOf[Fastqc]) shouldBe (
if (paired && (skipClip && skipTrim)) 2
else if (!paired && (skipClip && skipTrim)) 1
else if (paired && !(skipClip && skipTrim)) 4
else if (!paired && !(skipClip && skipTrim)) 2)
flexiprep.functions.count(_.isInstanceOf[Fastqc]) shouldBe (if (paired) 4 else 2)
flexiprep.functions.count(_.isInstanceOf[SeqStat]) shouldBe (if (paired) 4 else 2)
}
......
Supports Markdown
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