Skip to content
Snippets Groups Projects
Commit ed34dc05 authored by bow's avatar bow
Browse files

Merge branch 'develop' into feature-wipereads

parents deeadcca a92bc861
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,8 @@
<configuration>
<option name="compilerLibraryLevel" value="Project" />
<option name="compilerLibraryName" value="Maven: org.scala-lang:scala-compiler-bundle:2.11.2" />
<option name="compilerOptions" value="-dependencyfile $MODULE_DIR$/target/.scala_dependencies" />
<option name="compilerOptions" value="-dependencyfile $MODULE_DIR$/target/.scala_dependencies -feature" />
<option name="deprecationWarnings" value="true" />
<option name="languageLevel" value="Scala 2.11" />
<option name="vmOptions" value="" />
</configuration>
......@@ -29,15 +30,15 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="com.twitter:algebird-core_2.10:0.8.1" level="project" />
<orderEntry type="library" name="gatk-protected" level="project" />
<orderEntry type="library" name="Maven: org.mockito:mockito-all:1.9.5" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.testng:testng:6.8" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.10" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.beanshell:bsh:2.0b4" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.beust:jcommander:1.27" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.yaml:snakeyaml:1.6" level="project" />
<orderEntry type="library" name="Maven: org.scalatest:scalatest_2.11:2.2.1" level="project" />
<orderEntry type="library" name="Maven: org.scala-lang:scala-reflect:2.11.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-all:1.9.5" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.scalatest:scalatest_2.11:2.2.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.scala-lang:scala-reflect:2.11.2" level="project" />
<orderEntry type="library" name="Maven: org.scala-lang.modules:scala-xml_2.11:1.0.2" level="project" />
<orderEntry type="library" name="Maven: org.scala-lang:scala-library:2.11.2" level="project" />
<orderEntry type="library" name="Maven: org.broadinstitute.gatk:gatk-queue-package-distribution:3.3" level="project" />
......@@ -49,6 +50,5 @@
<orderEntry type="library" name="Maven: org.biojava:biojava3-sequencing:3.1.0" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:18.0" level="project" />
<orderEntry type="library" name="Maven: com.github.scopt:scopt_2.10:3.2.0" level="project" />
<orderEntry type="library" name="Maven: org.mockito:mockito-all:1.9.5" level="project" />
</component>
</module>
</module>
\ No newline at end of file
......@@ -25,6 +25,5 @@ Any value defined here will override the pom.xml file value but is only applicab
<com-junichi11-netbeans-changelf.use-global>false</com-junichi11-netbeans-changelf.use-global>
<com-junichi11-netbeans-changelf.show-dialog>true</com-junichi11-netbeans-changelf.show-dialog>
<org-netbeans-modules-javascript2-requirejs.enabled>true</org-netbeans-modules-javascript2-requirejs.enabled>
<netbeans.hint.jdkPlatform>JDK_1.8</netbeans.hint.jdkPlatform>
</properties>
</project-shared-configuration>
......@@ -31,10 +31,17 @@
<version>6.8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_2.11</artifactId>
<version>2.2.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
......@@ -71,11 +78,6 @@
<artifactId>scopt_2.10</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
</dependency>
</dependencies>
<build>
<resources>
......
package nl.lumc.sasc.biopet.extensions
import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
import nl.lumc.sasc.biopet.core.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{ Input, Output, Argument }
import java.io.File
class Raxml(val root: Configurable) extends BiopetCommandLineFunction {
override val defaultThreads = 4
override def versionCommand = executable + " -v"
override val versionRegex = """.*version \w* .*""".r
@Input(doc = "Input phy/fasta file", required = true)
var input: File = _
@Argument(doc = "Model", required = true)
var m: String = _
@Argument(doc = "Parsimony seed", required = false)
var p: Option[Int] = config("p")
@Argument(doc = "Bootstrapping seed", required = false)
var b: Option[Int] = config("b")
@Argument(doc = "Number of runs", required = false)
var N: Option[Int] = config("N")
@Argument(doc = "Name of output files", required = true)
var n: String = _
@Argument(doc = "Name of output files", required = true)
var f: String = "d"
@Argument(doc = "Output directory", required = false)
var w: String = jobLocalDir.getAbsolutePath
@Input(required = false)
var t: File = _
@Input(required = false)
var z: File = _
@Output(doc = "Output files", required = false)
private var out: List[File] = Nil
executable = config("exe", default = "raxmlHPC")
override def afterGraph {
super.afterGraph
f match {
case "d" if b.isEmpty => out +:= getBestTree
case "d" if b.isDefined => out +:= getBootstrap
}
}
def getBestTree: File = new File(w + File.separator + "RAxML_bestTree." + n)
def getBootstrap: File = new File(w + File.separator + "RAxML_bootstrap." + n)
def cmdLine = required(executable) +
required("-m", m) +
required("-s", input) +
optional("-p", p) +
optional("-b", b) +
optional("-N", N) +
optional("-w", w) +
optional("-f", f) +
optional("-t", t) +
optional("-z", z) +
(if (threads > 1) required("-T", threads) else "")
}
\ No newline at end of file
package nl.lumc.sasc.biopet.extensions.gatk
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 {
override def afterGraph {
super.afterGraph
}
}
object VariantEval {
def apply(root: Configurable, sample: File, compareWith: File,
output: File): VariantEval = {
val vareval = new VariantEval(root)
vareval.eval = Seq(sample)
vareval.comp = Seq(compareWith)
vareval.out = output
vareval.afterGraph
return vareval
}
def apply(root: Configurable, sample: File, compareWith: File,
output: File, ST: Seq[String], EV: Seq[String]): VariantEval = {
val vareval = new VariantEval(root)
vareval.eval = Seq(sample)
vareval.comp = Seq(compareWith)
vareval.out = output
vareval.noST = true
vareval.ST = ST
vareval.noEV = true
vareval.EV = EV
vareval.afterGraph
return vareval
}
}
\ No newline at end of file
......@@ -5,8 +5,8 @@ import java.io.File
import nl.lumc.sasc.biopet.core.config.Configurable
import nl.lumc.sasc.biopet.extensions.gatk.CombineVariants
import nl.lumc.sasc.biopet.extensions.gatk.SelectVariants
import nl.lumc.sasc.biopet.extensions.gatk.VariantEval
import org.broadinstitute.gatk.queue.QScript
import org.broadinstitute.gatk.queue.extensions.gatk.{ CommandLineGATK, VariantEval }
import org.broadinstitute.gatk.utils.commandline.{ Input, Argument }
class GatkVcfSampleCompare(val root: Configurable) extends QScript with BiopetQScript {
......@@ -28,12 +28,6 @@ class GatkVcfSampleCompare(val root: Configurable) extends QScript with BiopetQS
var sampleVcfs: Map[String, File] = Map()
def generalSampleDir = outputDir + "samples/"
trait gatkArguments extends CommandLineGATK {
this.reference_sequence = reference
this.memoryLimit = 2
this.jobResourceRequests :+= "h_vmem=4G"
}
def init() {
if (reference == null) reference = config("reference")
if (config.contains("target_bed"))
......@@ -70,14 +64,13 @@ class GatkVcfSampleCompare(val root: Configurable) extends QScript with BiopetQS
for ((sample, sampleVcf) <- sampleVcfs) {
val sampleDir = generalSampleDir + sample + File.separator
for ((compareSample, compareSampleVcf) <- sampleVcfs) {
val variantEval = new VariantEval with gatkArguments
variantEval.eval = Seq(sampleVcf)
variantEval.comp = Seq(compareSampleVcf)
variantEval.out = new File(sampleDir + sample + "-" + compareSample + ".eval.txt")
variantEval.noST = true
variantEval.ST = Seq("VariantType", "CompRod")
variantEval.noEV = true
variantEval.EV = Seq("CompOverlap")
val variantEval = VariantEval(this,
sampleVcf,
compareSampleVcf,
new File(sampleDir + sample + "-" + compareSample + ".eval.txt"),
Seq("VariantType", "CompRod"),
Seq("CompOverlap")
)
if (targetBed != null) variantEval.L = targetBed
add(variantEval)
sampleCompareMetrics.deps ::= variantEval.out
......
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