Skip to content
Snippets Groups Projects
Commit 8a9ad332 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Fix format

parent 26bc48af
No related branches found
No related tags found
No related merge requests found
...@@ -68,7 +68,7 @@ trait BiopetQScript extends Configurable with GatkLogging { ...@@ -68,7 +68,7 @@ trait BiopetQScript extends Configurable with GatkLogging {
f.checkExecutable f.checkExecutable
f.afterGraph f.afterGraph
} }
case _ => case _ =>
} }
if (new File(outputDir).canWrite) Config.global.writeReport(qSettings.runName, outputDir + ".log/" + qSettings.runName) if (new File(outputDir).canWrite) Config.global.writeReport(qSettings.runName, outputDir + ".log/" + qSettings.runName)
......
...@@ -53,15 +53,15 @@ class Fastqc(root: Configurable) extends nl.lumc.sasc.biopet.extensions.Fastqc(r ...@@ -53,15 +53,15 @@ class Fastqc(root: Configurable) extends nl.lumc.sasc.biopet.extensions.Fastqc(r
* @throws IllegalStateException if the module lines have no content or mapping is empty. * @throws IllegalStateException if the module lines have no content or mapping is empty.
*/ */
def qcModules: Map[String, FastQCModule] = { def qcModules: Map[String, FastQCModule] = {
val fqModules = Source.fromFile(dataFile) val fqModules = Source.fromFile(dataFile)
// drop all the characters before the first module delimiter (i.e. '>>') // drop all the characters before the first module delimiter (i.e. '>>')
.dropWhile(_ != '>') .dropWhile(_ != '>')
// pull everything into a string // pull everything into a string
.mkString .mkString
// split into modules // split into modules
.split(">>END_MODULE\n") .split(">>END_MODULE\n")
// make map of module name -> module lines // make map of module name -> module lines
.map { .map {
case (modString) => case (modString) =>
// module name is in the first line, without '>>' and before the tab character // module name is in the first line, without '>>' and before the tab character
val Array(firstLine, otherLines) = modString val Array(firstLine, otherLines) = modString
...@@ -77,10 +77,10 @@ class Fastqc(root: Configurable) extends nl.lumc.sasc.biopet.extensions.Fastqc(r ...@@ -77,10 +77,10 @@ class Fastqc(root: Configurable) extends nl.lumc.sasc.biopet.extensions.Fastqc(r
.slice(0, 2) .slice(0, 2)
modName -> FastQCModule(modName, modStatus, otherLines.split("\n").toSeq) modName -> FastQCModule(modName, modStatus, otherLines.split("\n").toSeq)
} }
.toMap .toMap
if (fqModules.isEmpty) throw new IllegalStateException("Empty FastQC data file " + dataFile.toString) if (fqModules.isEmpty) throw new IllegalStateException("Empty FastQC data file " + dataFile.toString)
else fqModules else fqModules
} }
/** /**
...@@ -93,11 +93,11 @@ class Fastqc(root: Configurable) extends nl.lumc.sasc.biopet.extensions.Fastqc(r ...@@ -93,11 +93,11 @@ class Fastqc(root: Configurable) extends nl.lumc.sasc.biopet.extensions.Fastqc(r
def encoding: String = { def encoding: String = {
if (dataFile.exists()) if (dataFile.exists())
qcModules("Basic Statistics") //FIXME: not save qcModules("Basic Statistics") //FIXME: not save
.lines .lines
.dropWhile(!_.startsWith("Encoding")) .dropWhile(!_.startsWith("Encoding"))
.head .head
.stripPrefix("Encoding\t") .stripPrefix("Encoding\t")
.stripSuffix("\t") .stripSuffix("\t")
else "" else ""
} }
......
...@@ -27,11 +27,11 @@ class SeqtkSeq(root: Configurable) extends nl.lumc.sasc.biopet.extensions.seqtk. ...@@ -27,11 +27,11 @@ class SeqtkSeq(root: Configurable) extends nl.lumc.sasc.biopet.extensions.seqtk.
if (fastqc != null && Q == None) { if (fastqc != null && Q == None) {
val encoding = fastqc.encoding val encoding = fastqc.encoding
Q = encoding match { Q = encoding match {
case null => None case null => None
case s if (s.contains("Sanger / Illumina 1.9")) => 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.3")) => Option(64) case s if (s.contains("Illumina 1.3")) => Option(64)
case s if (s.contains("Illumina 1.5")) => Option(64) case s if (s.contains("Illumina 1.5")) => Option(64)
case _ => None case _ => None
} }
if (Q != None) V = true if (Q != None) V = true
......
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