Commit 6bb6b014 authored by Sander Bollen's avatar Sander Bollen

Adding toucan pipeline stub

parent 7ff4c9b0
......@@ -95,6 +95,7 @@
<orderEntry type="module" module-name="Gentrap" />
<orderEntry type="module" module-name="Sage" />
<orderEntry type="module" module-name="Yamsvp" />
<orderEntry type="module" module-name="Toucan" />
<orderEntry type="module" module-name="BiopetGatkPipelines" />
<orderEntry type="module" module-name="BiopetGatkExtensions" />
<orderEntry type="module" module-name="Basty" />
......
......@@ -5,8 +5,8 @@
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/scala" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/scala" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
......
package nl.lumc.sasc.biopet.extensions
import java.io.File
import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
import nl.lumc.sasc.biopet.core.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{ Output, Input }
/**
* Created by ahbbollen on 15-1-15.
*/
class VariantEffectPredictor(val root: Configurable) extends BiopetCommandLineFunction {
executable = config("exe", submodule = "perl", default = "perl")
var vep_script: String = config("vep_script", required = true)
@Input(doc = "input VCF", required = true)
var input: File = _
@Output(doc = "output file", required = true)
var output: File = _
override val versionRegex = """version (\d*)""".r
override def versionCommand = executable + " " + vep_script + " --help"
//Boolean vars
var v: Boolean = config("v")
var q: Boolean = config("q")
var no_progress: Boolean = config("no_progress")
var everything: Boolean = config("everything")
var force: Boolean = config("force")
var no_stats: Boolean = config("no_stats")
var stats_text: Boolean = config("stats_text")
var html: Boolean = config("html")
var cache: Boolean = config("cache")
var humdiv: Boolean = config("humdiv")
var regulatory: Boolean = config("regulatory")
var cell_type: Boolean = config("cell_type")
var phased: Boolean = config("phased")
var allele_number: Boolean = config("allele_number")
var numbers: Boolean = config("numbers")
var domains: Boolean = config("domains")
var no_escape: Boolean = config("no_escape")
var hgvs: Boolean = config("hgvs")
var protein: Boolean = config("protein")
var symbol: Boolean = config("symbol")
var ccds: Boolean = config("ccds")
var uniprot: Boolean = config("uniprot")
var tsl: Boolean = config("tsl")
var canonical: Boolean = config("canonical")
var biotype: Boolean = config("biotype")
var xref_refseq: Boolean = config("xref_refseq")
var check_existing: Boolean = config("check_existing")
var check_alleles: Boolean = config("check_alleles")
var check_svs: Boolean = config("svs")
var gmaf: Boolean = config("gmaf")
var maf_1kg: Boolean = config("maf_1kg")
var maf_esp: Boolean = config("maf_esp")
var old_map: Boolean = config("old_maf")
var pubmed: Boolean = config("pubmed")
var failed: Boolean = config("failed")
var vcf: Boolean = config("vcf", default = true)
var json: Boolean = config("json")
var gvf: Boolean = config("gvf")
var check_ref: Boolean = config("check_ref")
var coding_only: Boolean = config("coding_only")
var no_intergenic: Boolean = config("no_intergenic")
var pick: Boolean = config("pick")
var pick_allele: Boolean = config("pick_allele")
var flag_pick: Boolean = config("flag_pick")
var flag_pick_allele: Boolean = config("flag_pick_allele")
var per_gene: Boolean = config("per_gene")
var most_severe: Boolean = config("most_severe")
var summary: Boolean = config("summary")
var filter_common: Boolean = config("filter_common")
var check_frequency: Boolean = config("check_frequency")
var allow_non_variant: Boolean = config("allow_non_variant")
var database: Boolean = config("database")
var genomes: Boolean = config("genomes")
var gencode_basic: Boolean = config("gencode_basic")
var refseq: Boolean = config("refseq")
var merged: Boolean = config("merged")
var all_refseq: Boolean = config("all_refseq")
var lrg: Boolean = config("lrg")
var no_whole_genome: Boolean = config("no_whole_genome")
var skip_db_check: Boolean = config("skip_db_check")
// Textual args
var vep_config: String = config("config")
var species: String = config("species")
var assembly: String = config("assembly")
var format: String = config("format")
var dir: String = config("dir")
var dir_cache: String = config("dir_cache")
var dir_plugins: String = config("dir_plugins")
var fasta: File = config("fasta")
var sift: String = config("sift")
var polyphen: String = config("polyphen")
var custom: String = config("custom")
var plugin: List[String] = config("plugin")
var individual: String = config("individual")
var fields: String = config("fields")
var convert: String = config("convert")
var terms: String = config("terms")
var chr: String = config("chr")
var pick_order: String = config("pick_order")
var freq_pop: String = config("check_pop")
var freq_gt_lt: String = config("freq_gt_lt")
var freq_filter: String = config("freq_filter")
var filter: String = config("filter")
var host: String = config("host")
var user: String = config("user")
var password: String = config("password")
var registry: String = config("registry")
var build: String = config("build")
var compress: String = config("compress")
var cache_region_size: String = config("cache_region_size")
// Numeric args
var fork: Option[Int] = config("fork")
var cache_version: Option[Int] = config("cache_version")
var freq_freq: Option[Float] = config("freq_freq")
var port: Option[Int] = config("port")
var db_version: Option[Int] = config("db_version")
var buffer_size: Option[Int] = config("buffer_size")
def cmdLine = required(executable) +
required(vep_script) +
required("-i", input) +
required("-o", output) +
conditional(v, "-v") +
conditional(q, "-q") +
conditional(no_progress, "--no_progress") +
conditional(everything, "--everything") +
conditional(force, "--force_overwrite") +
conditional(no_stats, "--no_stats") +
conditional(stats_text, "--stats_text") +
conditional(html, "--html") +
conditional(cache, "--cache") +
conditional(humdiv, "--humdiv") +
conditional(regulatory, "--regulatory") +
conditional(cell_type, "--cel_type") +
conditional(phased, "--phased") +
conditional(allele_number, "--allele_number") +
conditional(numbers, "--numbers") +
conditional(domains, "--domains") +
conditional(no_escape, "--no_escape") +
conditional(hgvs, "--hgvs") +
conditional(protein, "--protein") +
conditional(symbol, "--symbol") +
conditional(ccds, "--ccds") +
conditional(uniprot, "--uniprot") +
conditional(tsl, "--tsl") +
conditional(canonical, "--canonical") +
conditional(biotype, "--biotype") +
conditional(xref_refseq, "--xref_refseq") +
conditional(check_existing, "--check_existing") +
conditional(check_alleles, "--check_alleles") +
conditional(check_svs, "--check_svs") +
conditional(gmaf, "--gmaf") +
conditional(maf_1kg, "--maf_1kg") +
conditional(maf_esp, "--maf_esp") +
conditional(pubmed, "--pubmed") +
conditional(failed, "--failed") +
conditional(vcf, "--vcf") +
conditional(json, "--json") +
conditional(gvf, "--gvf") +
conditional(check_ref, "--check_ref") +
conditional(coding_only, "--coding_only") +
conditional(no_intergenic, "--no_intergenic") +
conditional(pick, "--pick") +
conditional(pick_allele, "--pick_allele") +
conditional(flag_pick, "--flag_pick") +
conditional(flag_pick_allele, "--flag_pick_allele") +
conditional(per_gene, "--per_gene") +
conditional(most_severe, "--most_severe") +
conditional(summary, "--summary") +
conditional(filter_common, "--filter_common") +
conditional(check_frequency, "--check_frequency") +
conditional(allow_non_variant, "--allow_non_variant") +
conditional(database, "--database") +
conditional(genomes, "--genomes") +
conditional(gencode_basic, "--gencode_basic") +
conditional(refseq, "--refseq") +
conditional(merged, "--merged") +
conditional(all_refseq, "--all_refseq") +
conditional(lrg, "--lrg") +
conditional(no_whole_genome, "--no_whole_genome") +
conditional(skip_db_check, "--skip_db_check") +
optional("--config", vep_config) +
optional("--species", species) +
optional("--assembly", assembly) +
optional("--format", format) +
optional("--dir", dir) +
optional("--dir_cache", dir_cache) +
optional("--dir_plugins", dir_plugins) +
optional("--fasta", fasta) +
optional("--sift", sift) +
optional("--polyphen", polyphen) +
optional("--custom", custom) +
repeat("--plugin", plugin) +
optional("--individual", individual) +
optional("--fields", fields) +
optional("--convert", convert) +
optional("--terms", terms) +
optional("--chr", chr) +
optional("--pick_order", pick_order) +
optional("--freq_pop", freq_pop) +
optional("--freq_gt_lt", freq_gt_lt) +
optional("--freq_filter", freq_filter) +
optional("--filter", filter) +
optional("--host", host) +
optional("--user", user) +
optional("--password", password) +
optional("--registry", registry) +
optional("--build", build) +
optional("--compress", compress) +
optional("--cache_region_size", cache_region_size) +
optional("--fork", fork) +
optional("--cache_version", cache_version) +
optional("--freq_freq", freq_freq) +
optional("--port", port) +
optional("--db_version", db_version) +
optional("--buffer_size", buffer_size)
}
......@@ -25,12 +25,17 @@ class VEPNormalizer(val root: Configurable) extends BiopetJavaCommandLineFunctio
javaMainClass = getClass.getName
@Input(doc = "Input VCF, may be indexed", shortName = "InputFile", required = true)
var InputVCF: File = _
//TODO: Add flags?
var inputVCF: File = _
@Output(doc = "Output VCF", shortName = "OutputFile", required = true)
var OutputVCF: File = _
var outputVCF: File = _
var mode: String = config("mode", default = "explode")
override def commandLine = super.commandLine +
required("-I", inputVCF) +
required("-O", outputVCF) +
required("-m", mode)
}
object VEPNormalizer extends ToolCommand {
......@@ -280,7 +285,7 @@ object VEPNormalizer extends ToolCommand {
case class Args(inputVCF: File = null,
outputVCF: File = null,
mode: String = "standard") extends AbstractArgs
mode: String = null) extends AbstractArgs
class OptParser extends AbstractOptParser {
......
......@@ -94,5 +94,6 @@
<orderEntry type="module" module-name="Gentrap" />
<orderEntry type="module" module-name="Sage" />
<orderEntry type="module" module-name="Yamsvp" />
<orderEntry type="module" module-name="Toucan" />
</component>
</module>
\ No newline at end of file
......@@ -75,6 +75,11 @@
<artifactId>Yamsvp</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>nl.lumc.sasc</groupId>
<artifactId>Toucan</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
......
......@@ -22,7 +22,8 @@ object BiopetExecutablePublic extends BiopetExecutable {
nl.lumc.sasc.biopet.pipelines.gentrap.Gentrap,
nl.lumc.sasc.biopet.pipelines.bammetrics.BamMetrics,
nl.lumc.sasc.biopet.pipelines.yamsvp.Yamsvp,
nl.lumc.sasc.biopet.pipelines.sage.Sage
nl.lumc.sasc.biopet.pipelines.sage.Sage,
nl.lumc.sasc.biopet.pipelines.toucan.Toucan
)
def tools: List[MainCommand] = List(
......
......@@ -33,6 +33,7 @@
<module>mapping</module>
<module>sage</module>
<module>yamsvp</module>
<module>toucan</module>
</modules>
<properties>
......
/target/
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/scala" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="BiopetFramework" />
<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:3.3" level="project" />
<orderEntry type="library" name="Maven: org.broadinstitute.gatk:gatk-tools-public:3.3" level="project" />
<orderEntry type="library" name="Maven: org.broadinstitute.gatk:gatk-engine:3.3" level="project" />
<orderEntry type="library" name="Maven: org.scala-lang:scala-compiler:2.10.2" level="project" />
<orderEntry type="library" name="Maven: org.scala-lang:scala-reflect:2.10.2" level="project" />
<orderEntry type="library" name="Maven: log4j:log4j:1.2.15" level="project" />
<orderEntry type="library" name="Maven: net.sf.jgrapht:jgrapht:0.8.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-email:1.2" level="project" />
<orderEntry type="library" name="Maven: javax.activation:activation:1.1" level="project" />
<orderEntry type="library" name="Maven: javax.mail:mail:1.4.4" level="project" />
<orderEntry type="module-library">
<library name="Maven: com.sun:tools:1.4.2">
<CLASSES>
<root url="jar:///usr/lib/jvm/java-1.7.0-openjdk-amd64/lib/tools.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="library" name="Maven: org.broadinstitute.gatk:gatk-queue-extensions-distribution:3.3" level="project" />
<orderEntry type="library" name="Maven: org.broadinstitute.gatk:gatk-tools-protected:3.3" level="project" />
<orderEntry type="library" name="Maven: gov.nist.math:jama:1.0.2" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.broadinstitute.gatk:gatk-queue-extensions-generator:3.3" level="project" />
<orderEntry type="library" name="Maven: org.broadinstitute.gatk:gatk-utils:3.3" level="project" />
<orderEntry type="library" name="Maven: samtools:htsjdk:1.120.1620" level="project" />
<orderEntry type="library" name="Maven: org.xerial.snappy:snappy-java:1.0.3-rc3" level="project" />
<orderEntry type="library" name="Maven: picard:picard:1.120.1579" level="project" />
<orderEntry type="library" name="Maven: org.apache.ant:ant:1.8.2" level="project" />
<orderEntry type="module-library">
<library name="Maven: com.sun:tools.jar:1.5">
<CLASSES>
<root url="jar:///usr/lib/jvm/java-1.7.0-openjdk-amd64/lib/tools.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="library" name="Maven: colt:colt:1.2.0" level="project" />
<orderEntry type="library" name="Maven: concurrent:concurrent:1.3.4" level="project" />
<orderEntry type="library" name="Maven: it.unimi.dsi:fastutil:6.5.3" level="project" />
<orderEntry type="library" name="Maven: org.simpleframework:simple-xml:2.0.4" level="project" />
<orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" />
<orderEntry type="library" name="Maven: stax:stax:1.2.0" level="project" />
<orderEntry type="library" name="Maven: org.reflections:reflections:0.9.9-RC1" level="project" />
<orderEntry type="library" name="Maven: org.javassist:javassist:3.16.1-GA" level="project" />
<orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
<orderEntry type="library" name="Maven: xml-apis:xml-apis:1.0.b2" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-log4j12:1.6.1" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.6.1" level="project" />
<orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.18" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-jexl:2.1.1" level="project" />
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.5" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:2.1" level="project" />
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-math:2.2" level="project" />
<orderEntry type="library" name="Maven: net.java.dev.jna:jna:3.2.7" level="project" />
<orderEntry type="library" name="Maven: net.java.dev.jets3t:jets3t:0.8.1" level="project" />
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.3" level="project" />
<orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" />
<orderEntry type="library" name="Maven: com.jamesmurty.utils:java-xmlbuilder:0.4" level="project" />
<orderEntry type="library" name="Maven: us.levk:drmaa-gridengine:6.2u5" level="project" />
<orderEntry type="library" name="Maven: us.levk:drmaa-common:1.0" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.2.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.1" level="project" />
<orderEntry type="library" name="Maven: com.google.code.cofoja:cofoja:1.0-r139" level="project" />
<orderEntry type="library" name="Maven: io.argonaut:argonaut_2.11:6.1-M4" level="project" />
<orderEntry type="library" name="Maven: org.scalaz:scalaz-core_2.11:7.1.0" level="project" />
<orderEntry type="library" name="Maven: org.scala-lang.modules:scala-parser-combinators_2.11:1.0.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: com.github.julien-truffaut:monocle-core_2.11:0.5.0" level="project" />
<orderEntry type="library" name="Maven: org.biojava:biojava3-core:3.1.0" level="project" />
<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" />
</component>
</module>
\ No newline at end of file
<!--
Biopet is built on top of GATK Queue for building bioinformatic
pipelines. It is mainly intended to support LUMC SHARK cluster which is running
SGE. But other types of HPC that are supported by GATK Queue (such as PBS)
should also be able to execute Biopet tools and pipelines.
Copyright 2014 Sequencing Analysis Support Core - Leiden University Medical Center
Contact us at: sasc@lumc.nl
A dual licensing mode is applied. The source code within this project that are
not part of GATK Queue is freely available for non-commercial use under an AGPL
license; For commercial users or users who do not want to follow the AGPL
license, please contact us to obtain a separate license.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>nl.lumc.sasc</groupId>
<artifactId>Toucan</artifactId>
<packaging>jar</packaging>
<parent>
<groupId>nl.lumc.sasc</groupId>
<artifactId>Biopet</artifactId>
<version>0.3.0-DEV</version>
<relativePath>../</relativePath>
</parent>
<inceptionYear>2014</inceptionYear>
<name>Toucan</name>
<dependencies>
<dependency>
<groupId>nl.lumc.sasc</groupId>
<artifactId>BiopetFramework</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
package nl.lumc.sasc.biopet.pipelines.toucan
import nl.lumc.sasc.biopet.core.{ PipelineCommand, BiopetQScript }
import nl.lumc.sasc.biopet.core.config.Configurable
import nl.lumc.sasc.biopet.extensions.VariantEffectPredictor
import nl.lumc.sasc.biopet.tools.VEPNormalizer
import org.broadinstitute.gatk.queue.QScript
import org.broadinstitute.gatk.utils.commandline.{ Input, Argument }
/**
* Created by ahbbollen on 15-1-15.
*/
class Toucan(val root: Configurable) extends QScript with BiopetQScript {
def this() = this(null)
@Input(doc = "Input VCF file", shortName = "Input", required = true)
var inputVCF: File = _
def init(): Unit = {
}
defaults ++= Map("varianteffectpredictor" -> Map("everything" -> true))
def biopetScript(): Unit = {
val vep = new VariantEffectPredictor(this)
vep.input = inputVCF
vep.output = outputDir + inputVCF.getName.stripSuffix(".gz").stripSuffix(".vcf") + ".vep.vcf"
vep.isIntermediate = true
add(vep)
val normalizer = new VEPNormalizer(this)
normalizer.inputVCF = vep.output
normalizer.outputVCF = swapExt(vep.output, ".vcf", ".normalized.vcf.gz")
add(normalizer)
}
}
object Toucan extends PipelineCommand
\ No newline at end of file
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