Commit 8ee74c1b authored by Peter van 't Hof's avatar Peter van 't Hof

Fixing own comments

parent b60bb0f4
......@@ -421,5 +421,8 @@ trait CommandLineGATK extends BiopetJavaCommandLineFunction with Reference with
object CommandLineGATK {
def isFileWithTag(file: File, tag: String): Boolean = file.isInstanceOf[TaggedFile] && file.asInstanceOf[TaggedFile].tag == tag
def isFileWithTag(file: File, tag: String): Boolean = file match {
case f:TaggedFile => f.tag == tag
case _ => false
}
}
\ No newline at end of file
......@@ -38,10 +38,17 @@ object Logging {
private[biopet] val errors: ListBuffer[Exception] = ListBuffer()
def addError(error: String, debug: String = null, cause: Exception = null): Unit = {
val msg = error + (if (debug != null && logger.isDebugEnabled) "; " + debug else "")
logger.error(msg, cause)
errors.append(if (cause != null) new Exception(msg, cause) else new Exception(msg))
def addError(error: String, debug: Option[String] = None, cause: Option[Exception] = None): Unit = {
val msg = error + debug.map("; " + _).getOrElse("")
cause match {
case Some(e) =>
logger.error(msg, e)
errors.append(new Exception(msg, e))
case _ =>
logger.error(msg)
errors.append(new Exception(msg))
}
}
def checkErrors(debug: Boolean = false): Unit = {
......
......@@ -160,8 +160,10 @@ class ShivaVariantcalling(val parent: Configurable)
caller.namePrefix = namePrefix
caller.outputDir = new File(outputDir, caller.name)
caller.genders = genders
if (caller.isInstanceOf[SomaticVariantCaller])
caller.asInstanceOf[SomaticVariantCaller].tnPairs = tumorSamples
caller match {
case c:SomaticVariantCaller => c.tnPairs = tumorSamples
case _ =>
}
add(caller)
addStats(caller.outputFile, caller.name)
......
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