From 43c985ef90e1368e6868a590c5c7ad0f3b6f5666 Mon Sep 17 00:00:00 2001 From: Peter van 't Hof <p.j.van_t_hof@lumc.nl> Date: Mon, 4 Aug 2014 11:28:12 +0200 Subject: [PATCH] Added SeqtkSeq function to Flexiprep --- .../sasc/biopet/extensions/seqtk/Seqtk.scala | 2 +- .../biopet/extensions/seqtk/SeqtkSeq.scala | 2 +- .../biopet/pipelines/flexiprep/SeqtkSeq.scala | 38 +++++++++++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/SeqtkSeq.scala diff --git a/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/seqtk/Seqtk.scala b/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/seqtk/Seqtk.scala index 8684c7a0c..6fbc166ab 100644 --- a/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/seqtk/Seqtk.scala +++ b/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/seqtk/Seqtk.scala @@ -4,7 +4,7 @@ * @author Wibowo Arindrarto */ -package nl.lumc.sasc.biopet.function.seqtk +package nl.lumc.sasc.biopet.extensions.seqtk import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction diff --git a/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/seqtk/SeqtkSeq.scala b/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/seqtk/SeqtkSeq.scala index 1bd2426a0..ef908ea13 100644 --- a/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/seqtk/SeqtkSeq.scala +++ b/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/seqtk/SeqtkSeq.scala @@ -4,7 +4,7 @@ * @author Wibowo Arindrarto */ -package nl.lumc.sasc.biopet.function.seqtk +package nl.lumc.sasc.biopet.extensions.seqtk import java.io.File import org.broadinstitute.gatk.utils.commandline.{ Input, Output } diff --git a/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/SeqtkSeq.scala b/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/SeqtkSeq.scala new file mode 100644 index 000000000..4d70cd4da --- /dev/null +++ b/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/SeqtkSeq.scala @@ -0,0 +1,38 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +package nl.lumc.sasc.biopet.pipelines.flexiprep + +import nl.lumc.sasc.biopet.core.config.Configurable +import nl.lumc.sasc.biopet.extensions.Ln + +class SeqtkSeq(root: Configurable) extends nl.lumc.sasc.biopet.extensions.seqtk.SeqtkSeq(root) { + var fastqc: Fastqc = _ + + override def beforeCmd { + super.beforeCmd + if (fastqc != null && Q == None) { + Q = fastqc.getEncoding match { + case null => None + case s if (s.contains("Sanger / Illumina 1.9")) => None + case s if (s.contains("Illumina <1.3")) => Option(64) + case s if (s.contains("Illumina 1.3")) => Option(64) + case s if (s.contains("Illumina 1.5")) => Option(64) + } + if (Q != None) V = true + } + } + + override def cmdLine = { + if (Q != None) { + analysisName = getClass.getName + super.cmdLine + } else { + analysisName = getClass.getSimpleName + "-ln" + Ln(this, input, output).cmd + } + } +} -- GitLab