Commit 9812237c authored by Peter van 't Hof's avatar Peter van 't Hof

Optimize imports

parent 7f2580f2
......@@ -6,6 +6,7 @@
package nl.lumc.sasc.biopet.extensions.gatk.broad
import java.io.File
import nl.lumc.sasc.biopet.core.config.Configurable
class AnalyzeCovariates(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.AnalyzeCovariates with GatkGeneral {
......
......@@ -6,6 +6,7 @@
package nl.lumc.sasc.biopet.extensions.gatk.broad
import java.io.File
import nl.lumc.sasc.biopet.core.config.Configurable
class ApplyRecalibration(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.ApplyRecalibration with GatkGeneral {
......
......@@ -6,6 +6,7 @@
package nl.lumc.sasc.biopet.extensions.gatk.broad
import java.io.File
import nl.lumc.sasc.biopet.core.config.Configurable
class BaseRecalibrator(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.BaseRecalibrator with GatkGeneral {
......
......@@ -6,6 +6,7 @@
package nl.lumc.sasc.biopet.extensions.gatk.broad
import java.io.File
import nl.lumc.sasc.biopet.core.config.Configurable
class CombineGVCFs(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.CombineGVCFs with GatkGeneral {
......
......@@ -6,6 +6,7 @@
package nl.lumc.sasc.biopet.extensions.gatk.broad
import java.io.File
import nl.lumc.sasc.biopet.core.config.Configurable
class CombineVariants(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.CombineVariants with GatkGeneral {
......
......@@ -5,7 +5,7 @@
*/
package nl.lumc.sasc.biopet.extensions.gatk.broad
import nl.lumc.sasc.biopet.core.{ Reference, BiopetJavaCommandLineFunction }
import nl.lumc.sasc.biopet.core.{ BiopetJavaCommandLineFunction, Reference }
import org.broadinstitute.gatk.queue.extensions.gatk.CommandLineGATK
trait GatkGeneral extends CommandLineGATK with BiopetJavaCommandLineFunction with Reference {
......
......@@ -6,6 +6,7 @@
package nl.lumc.sasc.biopet.extensions.gatk.broad
import java.io.File
import nl.lumc.sasc.biopet.core.config.Configurable
class GenotypeGVCFs(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.GenotypeGVCFs with GatkGeneral {
......
......@@ -6,6 +6,7 @@
package nl.lumc.sasc.biopet.extensions.gatk.broad
import java.io.File
import nl.lumc.sasc.biopet.core.config.Configurable
class IndelRealigner(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.IndelRealigner with GatkGeneral {
......
......@@ -6,6 +6,7 @@
package nl.lumc.sasc.biopet.extensions.gatk.broad
import java.io.File
import nl.lumc.sasc.biopet.core.config.Configurable
class PrintReads(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.PrintReads with GatkGeneral {
......
......@@ -6,6 +6,7 @@
package nl.lumc.sasc.biopet.extensions.gatk.broad
import java.io.File
import nl.lumc.sasc.biopet.core.config.Configurable
class RealignerTargetCreator(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.RealignerTargetCreator with GatkGeneral {
......
......@@ -6,6 +6,7 @@
package nl.lumc.sasc.biopet.extensions.gatk.broad
import java.io.File
import nl.lumc.sasc.biopet.core.config.Configurable
class SelectVariants(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.SelectVariants with GatkGeneral {
......
......@@ -6,6 +6,7 @@
package nl.lumc.sasc.biopet.extensions.gatk.broad
import java.io.File
import nl.lumc.sasc.biopet.core.config.Configurable
class VariantAnnotator(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.VariantAnnotator with GatkGeneral {
......
......@@ -6,6 +6,7 @@
package nl.lumc.sasc.biopet.extensions.gatk.broad
import java.io.File
import nl.lumc.sasc.biopet.core.config.Configurable
class VariantEval(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.VariantEval with GatkGeneral {
......
......@@ -6,6 +6,7 @@
package nl.lumc.sasc.biopet.extensions.gatk.broad
import java.io.File
import nl.lumc.sasc.biopet.core.config.Configurable
import org.broadinstitute.gatk.queue.extensions.gatk.TaggedFile
......
......@@ -5,10 +5,10 @@
*/
package nl.lumc.sasc.biopet.pipelines.gatk
import nl.lumc.sasc.biopet.core.{ BiopetQScript, PipelineCommand }
import nl.lumc.sasc.biopet.core.config.Configurable
import nl.lumc.sasc.biopet.core.{ BiopetQScript, PipelineCommand }
import org.broadinstitute.gatk.queue.QScript
import org.broadinstitute.gatk.utils.commandline.{ Input, Argument }
import scala.util.Random
class GatkBenchmarkGenotyping(val root: Configurable) extends QScript with BiopetQScript {
......
......@@ -5,11 +5,10 @@
*/
package nl.lumc.sasc.biopet.pipelines.gatk
import nl.lumc.sasc.biopet.core.{ BiopetQScript, PipelineCommand }
import nl.lumc.sasc.biopet.core.config.Configurable
import nl.lumc.sasc.biopet.extensions.gatk.broad.{ SelectVariants, GenotypeGVCFs }
import nl.lumc.sasc.biopet.core.{ BiopetQScript, PipelineCommand }
import nl.lumc.sasc.biopet.extensions.gatk.broad.{ GenotypeGVCFs, SelectVariants }
import org.broadinstitute.gatk.queue.QScript
import org.broadinstitute.gatk.utils.commandline.{ Input, Output, Argument }
class GatkGenotyping(val root: Configurable) extends QScript with BiopetQScript {
def this() = this(null)
......
......@@ -5,20 +5,18 @@
*/
package nl.lumc.sasc.biopet.pipelines.gatk
import nl.lumc.sasc.biopet.core.MultiSampleQScript
import nl.lumc.sasc.biopet.core.PipelineCommand
import nl.lumc.sasc.biopet.core.config.Configurable
import htsjdk.samtools.SamReaderFactory
import nl.lumc.sasc.biopet.core.{ MultiSampleQScript, PipelineCommand }
import nl.lumc.sasc.biopet.core.config.Configurable
import nl.lumc.sasc.biopet.core.summary.SummaryQScript
import nl.lumc.sasc.biopet.extensions.gatk.broad.{ CombineVariants, CombineGVCFs }
import nl.lumc.sasc.biopet.pipelines.bamtobigwig.Bam2Wig
import scala.collection.JavaConversions._
import nl.lumc.sasc.biopet.extensions.picard.AddOrReplaceReadGroups
import nl.lumc.sasc.biopet.extensions.picard.SamToFastq
import nl.lumc.sasc.biopet.extensions.gatk.broad.{ CombineGVCFs, CombineVariants }
import nl.lumc.sasc.biopet.extensions.picard.{ AddOrReplaceReadGroups, SamToFastq }
import nl.lumc.sasc.biopet.pipelines.bammetrics.BamMetrics
import nl.lumc.sasc.biopet.pipelines.bamtobigwig.Bam2Wig
import nl.lumc.sasc.biopet.pipelines.mapping.Mapping
import org.broadinstitute.gatk.queue.QScript
import org.broadinstitute.gatk.utils.commandline.{ Argument }
import scala.collection.JavaConversions._
class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScript with SummaryQScript {
qscript =>
......
......@@ -5,8 +5,7 @@
*/
package nl.lumc.sasc.biopet.pipelines.gatk
import nl.lumc.sasc.biopet.core.BiopetQScript
import nl.lumc.sasc.biopet.core.PipelineCommand
import nl.lumc.sasc.biopet.core.{ BiopetQScript, PipelineCommand }
import nl.lumc.sasc.biopet.core.config.Configurable
import nl.lumc.sasc.biopet.extensions.gatk.broad.{ ApplyRecalibration, VariantAnnotator, VariantRecalibrator }
import org.broadinstitute.gatk.queue.QScript
......
......@@ -5,17 +5,18 @@
*/
package nl.lumc.sasc.biopet.pipelines.gatk
import nl.lumc.sasc.biopet.core.{ BiopetQScript, PipelineCommand }
import java.io.File
import nl.lumc.sasc.biopet.core.config.Configurable
import nl.lumc.sasc.biopet.core.{ BiopetQScript, PipelineCommand }
import nl.lumc.sasc.biopet.extensions.Ln
import nl.lumc.sasc.biopet.extensions.gatk.broad._
import nl.lumc.sasc.biopet.tools.{ VcfStats, MpileupToVcf, VcfFilter, MergeAlleles }
import nl.lumc.sasc.biopet.core.config.Configurable
import nl.lumc.sasc.biopet.extensions.picard.MarkDuplicates
import nl.lumc.sasc.biopet.tools.{ MergeAlleles, MpileupToVcf, VcfFilter, VcfStats }
import nl.lumc.sasc.biopet.utils.ConfigUtils
import org.broadinstitute.gatk.queue.QScript
import org.broadinstitute.gatk.queue.extensions.gatk.TaggedFile
import org.broadinstitute.gatk.utils.commandline.{ Input, Argument }
import scala.collection.SortedMap
import scala.language.reflectiveCalls
......
......@@ -8,7 +8,7 @@ package nl.lumc.sasc.biopet.pipelines.gatk
import nl.lumc.sasc.biopet.core.PipelineCommand
import nl.lumc.sasc.biopet.core.config.Configurable
import nl.lumc.sasc.biopet.extensions.gatk.broad._
import nl.lumc.sasc.biopet.pipelines.shiva.{ ShivaVariantcallingTrait, ShivaTrait }
import nl.lumc.sasc.biopet.pipelines.shiva.{ ShivaTrait, ShivaVariantcallingTrait }
import org.broadinstitute.gatk.queue.QScript
/**
......
......@@ -5,7 +5,7 @@
*/
package nl.lumc.sasc.biopet.pipelines.gatk
import java.io.{ FileOutputStream, File }
import java.io.{ File, FileOutputStream }
import com.google.common.io.Files
import nl.lumc.sasc.biopet.core.config.Config
......@@ -17,7 +17,7 @@ import nl.lumc.sasc.biopet.utils.ConfigUtils
import org.broadinstitute.gatk.queue.QSettings
import org.scalatest.Matchers
import org.scalatest.testng.TestNGSuite
import org.testng.annotations.{ Test, DataProvider }
import org.testng.annotations.{ DataProvider, Test }
/**
* Created by pjvan_thof on 3/2/15.
......
......@@ -5,19 +5,19 @@
*/
package nl.lumc.sasc.biopet.pipelines.gatk
import java.io.{ FileOutputStream, File }
import java.io.{ File, FileOutputStream }
import com.google.common.io.Files
import nl.lumc.sasc.biopet.core.config.Config
import nl.lumc.sasc.biopet.extensions.gatk.CombineVariants
import nl.lumc.sasc.biopet.extensions.gatk.broad.{ UnifiedGenotyper, HaplotypeCaller }
import nl.lumc.sasc.biopet.tools.{ VcfStats, MpileupToVcf, VcfFilter }
import nl.lumc.sasc.biopet.extensions.gatk.broad.{ HaplotypeCaller, UnifiedGenotyper }
import nl.lumc.sasc.biopet.tools.{ MpileupToVcf, VcfFilter, VcfStats }
import nl.lumc.sasc.biopet.utils.ConfigUtils
import org.apache.commons.io.FileUtils
import org.broadinstitute.gatk.queue.QSettings
import org.scalatest.Matchers
import org.scalatest.testng.TestNGSuite
import org.testng.annotations.{ DataProvider, Test, AfterClass }
import org.testng.annotations.{ AfterClass, DataProvider, Test }
import scala.collection.mutable.ListBuffer
......
......@@ -22,7 +22,6 @@ import nl.lumc.sasc.biopet.core.{ BiopetQScript, PipelineCommand }
import nl.lumc.sasc.biopet.extensions.WigToBigWig
import nl.lumc.sasc.biopet.extensions.igvtools.IGVToolsCount
import org.broadinstitute.gatk.queue.QScript
import org.broadinstitute.gatk.utils.commandline.{ Output, Input }
/**
* Created by pjvan_thof on 1/29/15.
......
......@@ -15,12 +15,13 @@
*/
package nl.lumc.sasc.biopet.pipelines.bamtobigwig
import java.io.{ PrintWriter, File }
import java.io.{ File, PrintWriter }
import htsjdk.samtools.SamReaderFactory
import nl.lumc.sasc.biopet.core.config.Configurable
import org.broadinstitute.gatk.queue.function.InProcessFunction
import org.broadinstitute.gatk.utils.commandline.{ Output, Input }
import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
import scala.collection.JavaConversions._
/**
......
......@@ -15,16 +15,17 @@
*/
package nl.lumc.sasc.biopet.pipelines.bammetrics
import nl.lumc.sasc.biopet.core.summary.SummaryQScript
import nl.lumc.sasc.biopet.scripts.CoverageStats
import org.broadinstitute.gatk.queue.QScript
import nl.lumc.sasc.biopet.core.{ SampleLibraryTag, PipelineCommand }
import java.io.File
import nl.lumc.sasc.biopet.tools.BiopetFlagstat
import nl.lumc.sasc.biopet.core.config.Configurable
import nl.lumc.sasc.biopet.core.summary.SummaryQScript
import nl.lumc.sasc.biopet.core.{ PipelineCommand, SampleLibraryTag }
import nl.lumc.sasc.biopet.extensions.bedtools.{ BedtoolsCoverage, BedtoolsIntersect }
import nl.lumc.sasc.biopet.extensions.picard._
import nl.lumc.sasc.biopet.extensions.samtools.SamtoolsFlagstat
import nl.lumc.sasc.biopet.scripts.CoverageStats
import nl.lumc.sasc.biopet.tools.BiopetFlagstat
import org.broadinstitute.gatk.queue.QScript
class BamMetrics(val root: Configurable) extends QScript with SummaryQScript with SampleLibraryTag {
def this() = this(null)
......
package nl.lumc.sasc.biopet.pipelines.bammetrics
import java.io.{ PrintWriter, File }
import java.io.{ File, PrintWriter }
import nl.lumc.sasc.biopet.core.report.{ ReportBuilder, ReportPage, ReportSection }
import nl.lumc.sasc.biopet.core.summary.{ SummaryValue, Summary }
import nl.lumc.sasc.biopet.extensions.rscript.{ XYPlot, StackedBarPlot }
import nl.lumc.sasc.biopet.core.summary.{ Summary, SummaryValue }
import nl.lumc.sasc.biopet.extensions.rscript.{ StackedBarPlot, XYPlot }
/**
* Created by pjvan_thof on 3/30/15.
......
package nl.lumc.sasc.biopet.pipelines.bammetrics
import java.io.{ FileOutputStream, File }
import java.io.{ File, FileOutputStream }
import com.google.common.io.Files
import nl.lumc.sasc.biopet.core.config.Config
......@@ -14,7 +14,7 @@ import org.apache.commons.io.FileUtils
import org.broadinstitute.gatk.queue.QSettings
import org.scalatest.Matchers
import org.scalatest.testng.TestNGSuite
import org.testng.annotations.{ Test, DataProvider, AfterClass }
import org.testng.annotations.{ AfterClass, DataProvider, Test }
/**
* Created by pjvan_thof on 4/30/15.
......
......@@ -21,10 +21,10 @@
package nl.lumc.sasc.biopet.pipelines.basty
import java.io.File
import nl.lumc.sasc.biopet.core.MultiSampleQScript
import nl.lumc.sasc.biopet.core.PipelineCommand
import nl.lumc.sasc.biopet.extensions.{ RunGubbins, Cat, Raxml }
import nl.lumc.sasc.biopet.pipelines.shiva.{ ShivaTrait, Shiva }
import nl.lumc.sasc.biopet.extensions.{ Cat, Raxml, RunGubbins }
import nl.lumc.sasc.biopet.pipelines.shiva.{ Shiva, ShivaTrait }
import nl.lumc.sasc.biopet.tools.BastyGenerateFasta
import nl.lumc.sasc.biopet.utils.ConfigUtils
......
......@@ -15,15 +15,16 @@
*/
package nl.lumc.sasc.biopet.core
import java.io.File
import java.io.{ File, FileInputStream }
import java.security.MessageDigest
import nl.lumc.sasc.biopet.core.config.Configurable
import org.broadinstitute.gatk.queue.function.CommandLineFunction
import org.broadinstitute.gatk.utils.commandline.Input
import scala.collection.mutable
import scala.sys.process.{ Process, ProcessLogger }
import scala.util.matching.Regex
import java.io.FileInputStream
import java.security.MessageDigest
/** Biopet command line trait to auto check executable and cluster values */
trait BiopetCommandLineFunctionTrait extends CommandLineFunction with Configurable {
......
......@@ -16,12 +16,12 @@
package nl.lumc.sasc.biopet.core
import java.io.{ PrintWriter, StringWriter }
import scala.io.Source
import nl.lumc.sasc.biopet.core.BiopetExecutable._
import nl.lumc.sasc.biopet.{ FullVersion, LastCommitHash }
import org.apache.log4j.Logger
import nl.lumc.sasc.biopet.{ FullVersion, LastCommitHash }
import nl.lumc.sasc.biopet.core.BiopetExecutable._
import scala.io.Source
/**
* This is the main trait for the biopet executable
......
......@@ -22,7 +22,7 @@ import nl.lumc.sasc.biopet.core.report.ReportBuilderExtension
import org.broadinstitute.gatk.queue.QSettings
import org.broadinstitute.gatk.queue.function.QFunction
import org.broadinstitute.gatk.queue.function.scattergather.ScatterGatherableFunction
import org.broadinstitute.gatk.queue.util.{Logging => GatkLogging}
import org.broadinstitute.gatk.queue.util.{ Logging => GatkLogging }
import org.broadinstitute.gatk.utils.commandline.Argument
import scala.collection.mutable.ListBuffer
......
......@@ -17,7 +17,7 @@ package nl.lumc.sasc.biopet.core
import java.io.File
import nl.lumc.sasc.biopet.core.summary.{ SummaryQScript, Summarizable }
import nl.lumc.sasc.biopet.core.summary.{ Summarizable, SummaryQScript }
import nl.lumc.sasc.biopet.utils.ConfigUtils
import org.broadinstitute.gatk.utils.commandline.Argument
......
......@@ -15,12 +15,12 @@
*/
package nl.lumc.sasc.biopet.core
import java.io.{File, PrintWriter}
import java.io.{ File, PrintWriter }
import nl.lumc.sasc.biopet.core.config.Config
import nl.lumc.sasc.biopet.core.workaround.BiopetQCommandLine
import org.apache.log4j.{PatternLayout, WriterAppender}
import org.broadinstitute.gatk.queue.util.{Logging => GatkLogging}
import org.apache.log4j.{ PatternLayout, WriterAppender }
import org.broadinstitute.gatk.queue.util.{ Logging => GatkLogging }
/** Wrapper around executable from Queue */
trait PipelineCommand extends MainCommand with GatkLogging {
......
......@@ -4,6 +4,7 @@ import java.io.File
import htsjdk.samtools.reference.IndexedFastaSequenceFile
import nl.lumc.sasc.biopet.core.config.Configurable
import scala.collection.JavaConversions._
/**
......
......@@ -38,7 +38,7 @@ trait ToolCommand extends MainCommand with Logging {
}
} text "Log level" validate {
case "debug" | "info" | "warn" | "error" => success
case _ => failure("Log level must be <debug/info/warn/error>")
case _ => failure("Log level must be <debug/info/warn/error>")
}
opt[Unit]('h', "help") foreach { _ =>
System.err.println(this.usage)
......
......@@ -15,7 +15,8 @@
*/
package nl.lumc.sasc.biopet.core.config
import java.io.{ PrintWriter, File }
import java.io.{ File, PrintWriter }
import nl.lumc.sasc.biopet.core.Logging
import nl.lumc.sasc.biopet.utils.ConfigUtils
import nl.lumc.sasc.biopet.utils.ConfigUtils._
......
......@@ -16,6 +16,7 @@
package nl.lumc.sasc.biopet.core.config
import java.io.File
import nl.lumc.sasc.biopet.utils.ConfigUtils._
class ConfigValue(val requestIndex: ConfigValueIndex, val foundIndex: ConfigValueIndex, val value: Any, val default: Boolean) {
......
......@@ -2,11 +2,11 @@ package nl.lumc.sasc.biopet.core.report
import java.io._
import nl.lumc.sasc.biopet.core.{ ToolCommandFuntion, BiopetJavaCommandLineFunction, ToolCommand }
import nl.lumc.sasc.biopet.core.summary.Summary
import org.broadinstitute.gatk.utils.commandline.Input
import org.fusesource.scalate.{ TemplateSource, TemplateEngine }
import nl.lumc.sasc.biopet.core.{ ToolCommand, ToolCommandFuntion }
import nl.lumc.sasc.biopet.utils.IoUtils
import org.broadinstitute.gatk.utils.commandline.Input
import org.fusesource.scalate.{ TemplateEngine, TemplateSource }
/**
* Created by pjvan_thof on 3/27/15.
......
......@@ -15,7 +15,7 @@ class Summary(file: File) {
lazy val samples: Set[String] = {
ConfigUtils.getValueFromPath(map, List("samples")) match {
case Some(s) => ConfigUtils.any2map(s).keySet
case _ => Set()
case _ => Set()
}
}
......