diff --git a/.gitignore b/.gitignore index 77de2f25e244b88f845d817edc590690e679258e..f490a5f29f82bf37af38f4aa340165b10f96f173 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,5 @@ git.properties .idea/* *.iml target/ -public/target/ -protected/target/ site/ *.sc \ No newline at end of file diff --git a/public/LICENSE b/LICENSE similarity index 100% rename from public/LICENSE rename to LICENSE diff --git a/README.md b/README.md index 1a63d56e3994f15cdea97b62577cd32ff613e365..191890bfa86a19d9c8a3a3fa6540339465d90d46 100755 --- a/README.md +++ b/README.md @@ -55,18 +55,18 @@ At the moment, we do not provide links to download the Biopet package. If you ar ## Contributing to Biopet -Biopet is based on the Queue framework developed by the Broad Institute as part of their Genome Analysis Toolkit (GATK) framework. The current Biopet release is based on the GATK 3.4 release. +Biopet is based on the Queue framework developed by the Broad Institute as part of their Genome Analysis Toolkit (GATK) framework. The current Biopet release is based on the GATK 3.5 release. We welcome any kind of contribution, be it merge requests on the code base, documentation updates, or any kinds of other fixes! The main language we use is Scala, though the repository also contains a small bit of Python and R. Our main code repository is located at [https://github.com/biopet/biopet](https://github.com/biopet/biopet/issues), along with our issue tracker. ## Local development setup -To develop Biopet, Java 7, Maven 3.2.2, and GATK Queue 3.4 is required. Please consult the Java homepage and Maven homepage for the respective installation instruction. After you have both Java and Maven installed, you would then need to install GATK Queue. However, as the GATK Queue package is not yet available as an artifact in Maven Central, you will need to download, compile, and install GATK Queue first. +To develop Biopet, Java 7, Maven 3.3.3, and GATK Queue 3.5 is required. Please consult the Java homepage and Maven homepage for the respective installation instruction. After you have both Java and Maven installed, you would then need to install GATK Queue. However, as the GATK Queue package is not yet available as an artifact in Maven Central, you will need to download, compile, and install GATK Queue first. ~~~ $ git clone https://github.com/broadgsa/gatk-protected -$ cd gatk-protected -$ git checkout 3.4 # the current release is based on GATK 3.4 +$ cd gatk +$ git checkout 3.5 # the current release is based on GATK 3.5 $ mvn -U clean install ~~~ diff --git a/protected/biopet-gatk-extensions/.gitignore b/bam2wig/.gitignore similarity index 100% rename from protected/biopet-gatk-extensions/.gitignore rename to bam2wig/.gitignore diff --git a/public/bam2wig/pom.xml b/bam2wig/pom.xml similarity index 100% rename from public/bam2wig/pom.xml rename to bam2wig/pom.xml diff --git a/public/bam2wig/src/main/scala/nl/lumc/sasc/biopet/pipelines/bamtobigwig/Bam2Wig.scala b/bam2wig/src/main/scala/nl/lumc/sasc/biopet/pipelines/bamtobigwig/Bam2Wig.scala similarity index 100% rename from public/bam2wig/src/main/scala/nl/lumc/sasc/biopet/pipelines/bamtobigwig/Bam2Wig.scala rename to bam2wig/src/main/scala/nl/lumc/sasc/biopet/pipelines/bamtobigwig/Bam2Wig.scala diff --git a/public/bam2wig/src/main/scala/nl/lumc/sasc/biopet/pipelines/bamtobigwig/BamToChromSizes.scala b/bam2wig/src/main/scala/nl/lumc/sasc/biopet/pipelines/bamtobigwig/BamToChromSizes.scala similarity index 100% rename from public/bam2wig/src/main/scala/nl/lumc/sasc/biopet/pipelines/bamtobigwig/BamToChromSizes.scala rename to bam2wig/src/main/scala/nl/lumc/sasc/biopet/pipelines/bamtobigwig/BamToChromSizes.scala diff --git a/public/bam2wig/src/test/resources/log4j.properties b/bam2wig/src/test/resources/log4j.properties similarity index 100% rename from public/bam2wig/src/test/resources/log4j.properties rename to bam2wig/src/test/resources/log4j.properties diff --git a/protected/biopet-gatk-pipelines/.gitignore b/bammetrics/.gitignore similarity index 100% rename from protected/biopet-gatk-pipelines/.gitignore rename to bammetrics/.gitignore diff --git a/public/bammetrics/pom.xml b/bammetrics/pom.xml similarity index 100% rename from public/bammetrics/pom.xml rename to bammetrics/pom.xml diff --git a/public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/alignmentSummary.ssp b/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/alignmentSummary.ssp similarity index 100% rename from public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/alignmentSummary.ssp rename to bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/alignmentSummary.ssp diff --git a/public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/bamMetricsFront.ssp b/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/bamMetricsFront.ssp similarity index 100% rename from public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/bamMetricsFront.ssp rename to bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/bamMetricsFront.ssp diff --git a/public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/bamStats.ssp b/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/bamStats.ssp similarity index 100% rename from public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/bamStats.ssp rename to bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/bamStats.ssp diff --git a/public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/bammetricsInputFile.ssp b/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/bammetricsInputFile.ssp similarity index 100% rename from public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/bammetricsInputFile.ssp rename to bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/bammetricsInputFile.ssp diff --git a/public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/covstatsMultiTable.ssp b/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/covstatsMultiTable.ssp similarity index 100% rename from public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/covstatsMultiTable.ssp rename to bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/covstatsMultiTable.ssp diff --git a/public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/covstatsPlot.ssp b/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/covstatsPlot.ssp similarity index 100% rename from public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/covstatsPlot.ssp rename to bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/covstatsPlot.ssp diff --git a/public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/gcBias.ssp b/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/gcBias.ssp similarity index 100% rename from public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/gcBias.ssp rename to bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/gcBias.ssp diff --git a/public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/insertSize.ssp b/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/insertSize.ssp similarity index 100% rename from public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/insertSize.ssp rename to bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/insertSize.ssp diff --git a/public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/rna.ssp b/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/rna.ssp similarity index 100% rename from public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/rna.ssp rename to bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/rna.ssp diff --git a/public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/rnaHistogram.ssp b/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/rnaHistogram.ssp similarity index 100% rename from public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/rnaHistogram.ssp rename to bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/rnaHistogram.ssp diff --git a/public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/scripts/bedtools_cov_stats.py b/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/scripts/bedtools_cov_stats.py similarity index 100% rename from public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/scripts/bedtools_cov_stats.py rename to bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/scripts/bedtools_cov_stats.py diff --git a/public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/target.ssp b/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/target.ssp similarity index 100% rename from public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/target.ssp rename to bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/target.ssp diff --git a/public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/wgsHistogram.ssp b/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/wgsHistogram.ssp similarity index 100% rename from public/bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/wgsHistogram.ssp rename to bammetrics/src/main/resources/nl/lumc/sasc/biopet/pipelines/bammetrics/wgsHistogram.ssp diff --git a/public/bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BamMetrics.scala b/bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BamMetrics.scala similarity index 100% rename from public/bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BamMetrics.scala rename to bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BamMetrics.scala diff --git a/public/bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BammetricsReport.scala b/bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BammetricsReport.scala similarity index 99% rename from public/bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BammetricsReport.scala rename to bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BammetricsReport.scala index 5e34a2e0ca29120f9a92f2db3f16f96b80f95972..f91d49aa44ac69c331d3411af2624dc5491298c5 100644 --- a/public/bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BammetricsReport.scala +++ b/bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BammetricsReport.scala @@ -98,6 +98,7 @@ object BammetricsReport extends ReportBuilder { /** * Generate a stackbar plot for alignment stats + * * @param outputDir OutputDir for the tsv and png file * @param prefix Prefix of the tsv and png file * @param summary Summary class @@ -161,6 +162,7 @@ object BammetricsReport extends ReportBuilder { /** * Generate a line plot for insertsize + * * @param outputDir OutputDir for the tsv and png file * @param prefix Prefix of the tsv and png file * @param summary Summary class @@ -249,6 +251,7 @@ object BammetricsReport extends ReportBuilder { /** * Generate a line plot for wgs coverage + * * @param outputDir OutputDir for the tsv and png file * @param prefix Prefix of the tsv and png file * @param summary Summary class @@ -339,6 +342,7 @@ object BammetricsReport extends ReportBuilder { /** * Generate a line plot for rna coverage + * * @param outputDir OutputDir for the tsv and png file * @param prefix Prefix of the tsv and png file * @param summary Summary class diff --git a/public/bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/TargetRegions.scala b/bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/TargetRegions.scala similarity index 100% rename from public/bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/TargetRegions.scala rename to bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/TargetRegions.scala diff --git a/public/bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/scripts/CoverageStats.scala b/bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/scripts/CoverageStats.scala similarity index 100% rename from public/bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/scripts/CoverageStats.scala rename to bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/scripts/CoverageStats.scala diff --git a/public/bammetrics/src/test/resources/log4j.properties b/bammetrics/src/test/resources/log4j.properties similarity index 100% rename from public/bammetrics/src/test/resources/log4j.properties rename to bammetrics/src/test/resources/log4j.properties diff --git a/protected/biopet-gatk-pipelines/src/test/resources/ref.dict b/bammetrics/src/test/resources/ref.dict similarity index 100% rename from protected/biopet-gatk-pipelines/src/test/resources/ref.dict rename to bammetrics/src/test/resources/ref.dict diff --git a/protected/biopet-gatk-pipelines/src/test/resources/ref.fa b/bammetrics/src/test/resources/ref.fa similarity index 100% rename from protected/biopet-gatk-pipelines/src/test/resources/ref.fa rename to bammetrics/src/test/resources/ref.fa diff --git a/protected/biopet-gatk-pipelines/src/test/resources/ref.fa.fai b/bammetrics/src/test/resources/ref.fa.fai similarity index 100% rename from protected/biopet-gatk-pipelines/src/test/resources/ref.fa.fai rename to bammetrics/src/test/resources/ref.fa.fai diff --git a/public/bammetrics/src/test/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BamMetricsTest.scala b/bammetrics/src/test/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BamMetricsTest.scala similarity index 100% rename from public/bammetrics/src/test/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BamMetricsTest.scala rename to bammetrics/src/test/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BamMetricsTest.scala diff --git a/protected/biopet-protected-package/.gitignore b/basty/.gitignore similarity index 100% rename from protected/biopet-protected-package/.gitignore rename to basty/.gitignore diff --git a/public/basty/pom.xml b/basty/pom.xml similarity index 100% rename from public/basty/pom.xml rename to basty/pom.xml diff --git a/public/basty/src/main/scala/nl/lumc/sasc/biopet/pipelines/basty/BastyTrait.scala b/basty/src/main/scala/nl/lumc/sasc/biopet/pipelines/basty/Basty.scala similarity index 94% rename from public/basty/src/main/scala/nl/lumc/sasc/biopet/pipelines/basty/BastyTrait.scala rename to basty/src/main/scala/nl/lumc/sasc/biopet/pipelines/basty/Basty.scala index 3202d4f37db17d1bb9b824c89e948e44d82fb829..3c03ebe2cd0839f9955623ce3f03da29e290b113 100644 --- a/public/basty/src/main/scala/nl/lumc/sasc/biopet/pipelines/basty/BastyTrait.scala +++ b/basty/src/main/scala/nl/lumc/sasc/biopet/pipelines/basty/Basty.scala @@ -22,26 +22,29 @@ package nl.lumc.sasc.biopet.pipelines.basty import java.io.File -import nl.lumc.sasc.biopet.core.MultiSampleQScript +import nl.lumc.sasc.biopet.core.{ MultiSampleQScript, PipelineCommand } import nl.lumc.sasc.biopet.extensions.{ Cat, Raxml, RunGubbins } -import nl.lumc.sasc.biopet.pipelines.shiva.{ Shiva, ShivaTrait } +import nl.lumc.sasc.biopet.pipelines.shiva.Shiva import nl.lumc.sasc.biopet.extensions.tools.BastyGenerateFasta import nl.lumc.sasc.biopet.utils.ConfigUtils +import nl.lumc.sasc.biopet.utils.config.Configurable import org.broadinstitute.gatk.queue.QScript -trait BastyTrait extends MultiSampleQScript { - qscript: QScript => +class Basty(val root: Configurable) extends QScript with MultiSampleQScript { + qscript => + + def this() = this(null) case class FastaOutput(variants: File, consensus: File, consensusVariants: File) - def variantcallers = List("freebayes") + def variantcallers = List("unifiedgenotyper") override def defaults = Map( "ploidy" -> 1, "variantcallers" -> variantcallers ) - lazy val shiva: ShivaTrait = new Shiva(qscript) + lazy val shiva = new Shiva(qscript) def summaryFile: File = new File(outputDir, "Basty.summary.json") @@ -194,3 +197,5 @@ trait BastyTrait extends MultiSampleQScript { FastaOutput(bastyGenerateFasta.outputVariants, bastyGenerateFasta.outputConsensus, bastyGenerateFasta.outputConsensusVariants) } } + +object Basty extends PipelineCommand diff --git a/public/basty/src/test/resources/log4j.properties b/basty/src/test/resources/log4j.properties similarity index 100% rename from public/basty/src/test/resources/log4j.properties rename to basty/src/test/resources/log4j.properties diff --git a/biopet-aggregate/pom.xml b/biopet-aggregate/pom.xml index ca3283801777ad853c1f690cdadd9557cc296602..6a6f99a731013c51a6366d6cb60bec0e4313f84c 100644 --- a/biopet-aggregate/pom.xml +++ b/biopet-aggregate/pom.xml @@ -11,35 +11,32 @@ <parent> <groupId>nl.lumc.sasc</groupId> <artifactId>Biopet</artifactId> - <version>0.6.0-SNAPSHOT</version> - <relativePath>../public</relativePath> + <version>0.7.0-SNAPSHOT</version> + <relativePath>../</relativePath> </parent> <modules> - <module>../public/biopet-core</module> - <module>../public/biopet-public-package</module> - <module>../public/bammetrics</module> - <module>../public/flexiprep</module> - <module>../public/gentrap</module> - <module>../public/mapping</module> - <module>../public/sage</module> - <module>../public/kopisu</module> - <module>../public/gears</module> - <module>../public/bam2wig</module> - <module>../public/carp</module> - <module>../public/toucan</module> - <module>../public/gwas-test</module> - <module>../public/shiva</module> - <module>../public/basty</module> - <module>../public/tinycap</module> - <module>../public/biopet-utils</module> - <module>../public/biopet-tools</module> - <module>../public/biopet-tools-extensions</module> - <module>../public/biopet-extensions</module> - <module>../public/biopet-tools-package</module> - <module>../protected/biopet-gatk-extensions</module> - <module>../protected/biopet-gatk-pipelines</module> - <module>../protected/biopet-protected-package</module> + <module>../biopet-core</module> + <module>../biopet-package</module> + <module>../bammetrics</module> + <module>../flexiprep</module> + <module>../gentrap</module> + <module>../mapping</module> + <module>../sage</module> + <module>../kopisu</module> + <module>../gears</module> + <module>../bam2wig</module> + <module>../carp</module> + <module>../toucan</module> + <module>../gwas-test</module> + <module>../shiva</module> + <module>../basty</module> + <module>../tinycap</module> + <module>../biopet-utils</module> + <module>../biopet-tools</module> + <module>../biopet-tools-extensions</module> + <module>../biopet-extensions</module> + <module>../biopet-tools-package</module> </modules> </project> \ No newline at end of file diff --git a/public/biopet-core/pom.xml b/biopet-core/pom.xml similarity index 100% rename from public/biopet-core/pom.xml rename to biopet-core/pom.xml diff --git a/public/biopet-core/src/main/resources/log4j.properties b/biopet-core/src/main/resources/log4j.properties similarity index 100% rename from public/biopet-core/src/main/resources/log4j.properties rename to biopet-core/src/main/resources/log4j.properties diff --git a/public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/License.txt b/biopet-core/src/main/resources/nl/lumc/sasc/biopet/License.txt similarity index 100% rename from public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/License.txt rename to biopet-core/src/main/resources/nl/lumc/sasc/biopet/License.txt diff --git a/public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/executables.ssp b/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/executables.ssp similarity index 100% rename from public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/executables.ssp rename to biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/executables.ssp diff --git a/public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/css/bootstrap-theme.min.css b/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/css/bootstrap-theme.min.css similarity index 100% rename from public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/css/bootstrap-theme.min.css rename to biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/css/bootstrap-theme.min.css diff --git a/public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/css/bootstrap.min.css b/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/css/bootstrap.min.css similarity index 100% rename from public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/css/bootstrap.min.css rename to biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/css/bootstrap.min.css diff --git a/public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/css/bootstrap_dashboard.css b/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/css/bootstrap_dashboard.css similarity index 100% rename from public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/css/bootstrap_dashboard.css rename to biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/css/bootstrap_dashboard.css diff --git a/public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/css/sortable-theme-bootstrap.css b/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/css/sortable-theme-bootstrap.css similarity index 100% rename from public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/css/sortable-theme-bootstrap.css rename to biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/css/sortable-theme-bootstrap.css diff --git a/public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/fonts/glyphicons-halflings-regular.ttf b/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/fonts/glyphicons-halflings-regular.ttf similarity index 100% rename from public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/fonts/glyphicons-halflings-regular.ttf rename to biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/fonts/glyphicons-halflings-regular.ttf diff --git a/public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/fonts/glyphicons-halflings-regular.woff b/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/fonts/glyphicons-halflings-regular.woff similarity index 100% rename from public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/fonts/glyphicons-halflings-regular.woff rename to biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/fonts/glyphicons-halflings-regular.woff diff --git a/public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/fonts/glyphicons-halflings-regular.woff2 b/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/fonts/glyphicons-halflings-regular.woff2 similarity index 100% rename from public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/fonts/glyphicons-halflings-regular.woff2 rename to biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/fonts/glyphicons-halflings-regular.woff2 diff --git a/public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/js/bootstrap.min.js b/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/js/bootstrap.min.js similarity index 100% rename from public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/js/bootstrap.min.js rename to biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/js/bootstrap.min.js diff --git a/public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/js/d3.v3.5.5.min.js b/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/js/d3.v3.5.5.min.js similarity index 100% rename from public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/js/d3.v3.5.5.min.js rename to biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/js/d3.v3.5.5.min.js diff --git a/public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/js/jquery.min.js b/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/js/jquery.min.js similarity index 100% rename from public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/js/jquery.min.js rename to biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/js/jquery.min.js diff --git a/public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/js/sortable.min.js b/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/js/sortable.min.js similarity index 100% rename from public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/js/sortable.min.js rename to biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/ext/js/sortable.min.js diff --git a/public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/krona.ssp b/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/krona.ssp similarity index 100% rename from public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/krona.ssp rename to biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/krona.ssp diff --git a/public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/librariesList.ssp b/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/librariesList.ssp similarity index 100% rename from public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/librariesList.ssp rename to biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/librariesList.ssp diff --git a/public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/main.ssp b/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/main.ssp similarity index 100% rename from public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/main.ssp rename to biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/main.ssp diff --git a/public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/reference.ssp b/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/reference.ssp similarity index 100% rename from public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/reference.ssp rename to biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/reference.ssp diff --git a/public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/samplesList.ssp b/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/samplesList.ssp similarity index 100% rename from public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/samplesList.ssp rename to biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/samplesList.ssp diff --git a/public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/tools/plotHeatmap.R b/biopet-core/src/main/resources/nl/lumc/sasc/biopet/tools/plotHeatmap.R similarity index 100% rename from public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/tools/plotHeatmap.R rename to biopet-core/src/main/resources/nl/lumc/sasc/biopet/tools/plotHeatmap.R diff --git a/public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/utils/rscript/plotScatter.R b/biopet-core/src/main/resources/nl/lumc/sasc/biopet/utils/rscript/plotScatter.R similarity index 100% rename from public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/utils/rscript/plotScatter.R rename to biopet-core/src/main/resources/nl/lumc/sasc/biopet/utils/rscript/plotScatter.R diff --git a/public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/utils/rscript/plotXY.R b/biopet-core/src/main/resources/nl/lumc/sasc/biopet/utils/rscript/plotXY.R similarity index 100% rename from public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/utils/rscript/plotXY.R rename to biopet-core/src/main/resources/nl/lumc/sasc/biopet/utils/rscript/plotXY.R diff --git a/public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/utils/rscript/stackedBar.R b/biopet-core/src/main/resources/nl/lumc/sasc/biopet/utils/rscript/stackedBar.R similarity index 100% rename from public/biopet-core/src/main/resources/nl/lumc/sasc/biopet/utils/rscript/stackedBar.R rename to biopet-core/src/main/resources/nl/lumc/sasc/biopet/utils/rscript/stackedBar.R diff --git a/public/biopet-core/src/main/resources/org/broadinstitute/gatk/queue/util/queueJobReport.R b/biopet-core/src/main/resources/org/broadinstitute/gatk/queue/util/queueJobReport.R similarity index 100% rename from public/biopet-core/src/main/resources/org/broadinstitute/gatk/queue/util/queueJobReport.R rename to biopet-core/src/main/resources/org/broadinstitute/gatk/queue/util/queueJobReport.R diff --git a/public/biopet-core/src/main/resources/picard/analysis/baseDistributionByCycle.R b/biopet-core/src/main/resources/picard/analysis/baseDistributionByCycle.R similarity index 100% rename from public/biopet-core/src/main/resources/picard/analysis/baseDistributionByCycle.R rename to biopet-core/src/main/resources/picard/analysis/baseDistributionByCycle.R diff --git a/public/biopet-core/src/main/resources/picard/analysis/gcBias.R b/biopet-core/src/main/resources/picard/analysis/gcBias.R similarity index 100% rename from public/biopet-core/src/main/resources/picard/analysis/gcBias.R rename to biopet-core/src/main/resources/picard/analysis/gcBias.R diff --git a/public/biopet-core/src/main/resources/picard/analysis/insertSizeHistogram.R b/biopet-core/src/main/resources/picard/analysis/insertSizeHistogram.R similarity index 100% rename from public/biopet-core/src/main/resources/picard/analysis/insertSizeHistogram.R rename to biopet-core/src/main/resources/picard/analysis/insertSizeHistogram.R diff --git a/public/biopet-core/src/main/resources/picard/analysis/meanQualityByCycle.R b/biopet-core/src/main/resources/picard/analysis/meanQualityByCycle.R similarity index 100% rename from public/biopet-core/src/main/resources/picard/analysis/meanQualityByCycle.R rename to biopet-core/src/main/resources/picard/analysis/meanQualityByCycle.R diff --git a/public/biopet-core/src/main/resources/picard/analysis/qualityScoreDistribution.R b/biopet-core/src/main/resources/picard/analysis/qualityScoreDistribution.R similarity index 100% rename from public/biopet-core/src/main/resources/picard/analysis/qualityScoreDistribution.R rename to biopet-core/src/main/resources/picard/analysis/qualityScoreDistribution.R diff --git a/public/biopet-core/src/main/resources/picard/analysis/rnaSeqCoverage.R b/biopet-core/src/main/resources/picard/analysis/rnaSeqCoverage.R similarity index 100% rename from public/biopet-core/src/main/resources/picard/analysis/rnaSeqCoverage.R rename to biopet-core/src/main/resources/picard/analysis/rnaSeqCoverage.R diff --git a/public/biopet-core/src/main/resources/picard/analysis/rrbsQc.R b/biopet-core/src/main/resources/picard/analysis/rrbsQc.R similarity index 100% rename from public/biopet-core/src/main/resources/picard/analysis/rrbsQc.R rename to biopet-core/src/main/resources/picard/analysis/rrbsQc.R diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetCommandLineFunction.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetCommandLineFunction.scala similarity index 98% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetCommandLineFunction.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetCommandLineFunction.scala index f367abc4c5c864215277872818ff306fb4c93a14..d634350fb374a04ce38567c49ab1709c0bfa8c24 100644 --- a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetCommandLineFunction.scala +++ b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetCommandLineFunction.scala @@ -15,11 +15,11 @@ */ package nl.lumc.sasc.biopet.core -import java.io.{ PrintWriter, File, FileInputStream } +import java.io.{ File, FileInputStream, PrintWriter } import java.security.MessageDigest import nl.lumc.sasc.biopet.utils.Logging -import org.broadinstitute.gatk.utils.commandline.{ Output, Input } +import org.broadinstitute.gatk.utils.commandline.{ Gather, Input, Output } import org.broadinstitute.gatk.utils.runtime.ProcessSettings import org.ggf.drmaa.JobTemplate @@ -35,9 +35,6 @@ trait BiopetCommandLineFunction extends CommandLineResources { biopetFunction => @Input(doc = "deps", required = false) var deps: List[File] = Nil - @Output - var outputFiles: List[File] = Nil - var executable: String = _ /** This is the default shell for drmaa jobs */ diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetFifoPipe.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetFifoPipe.scala similarity index 97% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetFifoPipe.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetFifoPipe.scala index 287064130a8a055b7457a2e583517c8e60a1b5df..16626532ce11401652fef73d9320b689a8dc138d 100644 --- a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetFifoPipe.scala +++ b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetFifoPipe.scala @@ -18,6 +18,7 @@ package nl.lumc.sasc.biopet.core import java.io.File import nl.lumc.sasc.biopet.utils.config.Configurable +import org.broadinstitute.gatk.utils.commandline.Output /** * Created by pjvan_thof on 9/29/15. @@ -46,6 +47,9 @@ class BiopetFifoPipe(val root: Configurable, ) yield outputFile } + @Output + private var outputFiles: List[File] = Nil + override def beforeGraph(): Unit = { val outputs: Map[BiopetCommandLineFunction, Seq[File]] = try { commands.map(x => x -> x.outputs).toMap diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetJavaCommandLineFunction.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetJavaCommandLineFunction.scala similarity index 100% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetJavaCommandLineFunction.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetJavaCommandLineFunction.scala diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetPipe.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetPipe.scala similarity index 100% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetPipe.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetPipe.scala diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala similarity index 100% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/CommandLineResources.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/CommandLineResources.scala similarity index 100% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/CommandLineResources.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/CommandLineResources.scala diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/MultiSampleQScript.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/MultiSampleQScript.scala similarity index 97% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/MultiSampleQScript.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/MultiSampleQScript.scala index 785db5662f074ca7c7691d72e732ec5b0c760092..35bcca8efa8f907770564f63dc91cb2f85510474 100644 --- a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/MultiSampleQScript.scala +++ b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/MultiSampleQScript.scala @@ -205,11 +205,12 @@ trait MultiSampleQScript extends SummaryQScript { qscript: QScript => logger.info(s"Starting script for ${samples.size} samples") var count = 0 if (onlySamples.isEmpty || samples.forall(x => onlySamples.contains(x._1))) { - samples.foreach { case (sampleId, sample) => - logger.info(s"Starting script sample '$sampleId'") - sample.addAndTrackJobs() - count += 1 - logger.info(s"Finish script for '$sampleId', samples done: $count / ${samples.size}") + samples.foreach { + case (sampleId, sample) => + logger.info(s"Starting script sample '$sampleId'") + sample.addAndTrackJobs() + count += 1 + logger.info(s"Finish script for '$sampleId', samples done: $count / ${samples.size}") } logger.info("Starting script for multisample jobs") addMultiSampleJobs() diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/PipelineCommand.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/PipelineCommand.scala similarity index 100% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/PipelineCommand.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/PipelineCommand.scala diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/Reference.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/Reference.scala similarity index 100% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/Reference.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/Reference.scala diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/SampleLibraryTag.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/SampleLibraryTag.scala similarity index 100% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/SampleLibraryTag.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/SampleLibraryTag.scala diff --git a/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/ScatterGatherableFunction.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/ScatterGatherableFunction.scala new file mode 100644 index 0000000000000000000000000000000000000000..79fd7fa8e9c953bce65d9efc95b9bd62573c86d6 --- /dev/null +++ b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/ScatterGatherableFunction.scala @@ -0,0 +1,9 @@ +package nl.lumc.sasc.biopet.core + +/** + * Created by pjvan_thof on 4/26/16. + */ +trait ScatterGatherableFunction extends BiopetCommandLineFunction + with org.broadinstitute.gatk.queue.function.scattergather.ScatterGatherableFunction { + scatterCount = config("scattercount", freeVar = true, default = 1) +} diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/ToolCommandFunction.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/ToolCommandFunction.scala similarity index 100% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/ToolCommandFunction.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/ToolCommandFunction.scala diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/Version.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/Version.scala similarity index 100% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/Version.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/Version.scala diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/WriteDependencies.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/WriteDependencies.scala similarity index 100% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/WriteDependencies.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/WriteDependencies.scala diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/annotations/Annotations.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/annotations/Annotations.scala similarity index 100% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/annotations/Annotations.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/annotations/Annotations.scala diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/extensions/CheckChecksum.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/extensions/CheckChecksum.scala similarity index 100% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/extensions/CheckChecksum.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/extensions/CheckChecksum.scala diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/extensions/Md5sum.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/extensions/Md5sum.scala similarity index 100% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/extensions/Md5sum.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/extensions/Md5sum.scala diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/extensions/PythonCommandLineFunction.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/extensions/PythonCommandLineFunction.scala similarity index 100% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/extensions/PythonCommandLineFunction.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/extensions/PythonCommandLineFunction.scala diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/extensions/RscriptCommandLineFunction.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/extensions/RscriptCommandLineFunction.scala similarity index 100% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/extensions/RscriptCommandLineFunction.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/extensions/RscriptCommandLineFunction.scala diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/MultisampleReportBuilder.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/MultisampleReportBuilder.scala similarity index 100% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/MultisampleReportBuilder.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/MultisampleReportBuilder.scala diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/ReportBuilder.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/ReportBuilder.scala similarity index 99% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/ReportBuilder.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/ReportBuilder.scala index 41a974fcc7d7fdc4da13d0f8e47ae621c3b8ac13..43af927eb622b8831a1a0343b9eecb761de433d8 100644 --- a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/ReportBuilder.scala +++ b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/ReportBuilder.scala @@ -189,6 +189,7 @@ trait ReportBuilder extends ToolCommand { /** * This method will render the page and the subpages recursivly + * * @param summary The summary object * @param page Page to render * @param outputDir Root output dir of the report @@ -204,7 +205,7 @@ trait ReportBuilder extends ToolCommand { val pageOutputDir = new File(outputDir, path.mkString(File.separator)) pageOutputDir.mkdirs() - val rootPath = "./" + Array.fill(path.size)("../").mkString("") + val rootPath = "./" + Array.fill(path.size)("src/main").mkString("") val pageArgs = args ++ page.args ++ Map("page" -> page, "path" -> path, diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/ReportPage.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/ReportPage.scala similarity index 100% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/ReportPage.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/ReportPage.scala diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/ReportSection.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/ReportSection.scala similarity index 100% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/ReportSection.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/ReportSection.scala diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/summary/Summarizable.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/summary/Summarizable.scala similarity index 100% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/summary/Summarizable.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/summary/Summarizable.scala diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/summary/SummaryQScript.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/summary/SummaryQScript.scala similarity index 100% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/summary/SummaryQScript.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/summary/SummaryQScript.scala diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/summary/WriteSummary.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/summary/WriteSummary.scala similarity index 100% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/summary/WriteSummary.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/summary/WriteSummary.scala diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/workaround/BiopetQCommandLine.scala b/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/workaround/BiopetQCommandLine.scala similarity index 100% rename from public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/workaround/BiopetQCommandLine.scala rename to biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/workaround/BiopetQCommandLine.scala diff --git a/public/biopet-core/src/test/resources/empty_summary.json b/biopet-core/src/test/resources/empty_summary.json similarity index 100% rename from public/biopet-core/src/test/resources/empty_summary.json rename to biopet-core/src/test/resources/empty_summary.json diff --git a/public/biopet-core/src/test/resources/fake_chrQ.dict b/biopet-core/src/test/resources/fake_chrQ.dict similarity index 100% rename from public/biopet-core/src/test/resources/fake_chrQ.dict rename to biopet-core/src/test/resources/fake_chrQ.dict diff --git a/public/biopet-core/src/test/resources/fake_chrQ.fa b/biopet-core/src/test/resources/fake_chrQ.fa similarity index 100% rename from public/biopet-core/src/test/resources/fake_chrQ.fa rename to biopet-core/src/test/resources/fake_chrQ.fa diff --git a/public/biopet-core/src/test/resources/fake_chrQ.fa.fai b/biopet-core/src/test/resources/fake_chrQ.fa.fai similarity index 100% rename from public/biopet-core/src/test/resources/fake_chrQ.fa.fai rename to biopet-core/src/test/resources/fake_chrQ.fa.fai diff --git a/public/biopet-core/src/test/resources/fake_chrQ_no_index.fa b/biopet-core/src/test/resources/fake_chrQ_no_index.fa similarity index 100% rename from public/biopet-core/src/test/resources/fake_chrQ_no_index.fa rename to biopet-core/src/test/resources/fake_chrQ_no_index.fa diff --git a/public/biopet-core/src/test/resources/log4j.properties b/biopet-core/src/test/resources/log4j.properties similarity index 100% rename from public/biopet-core/src/test/resources/log4j.properties rename to biopet-core/src/test/resources/log4j.properties diff --git a/public/biopet-core/src/test/resources/template.ssp b/biopet-core/src/test/resources/template.ssp similarity index 100% rename from public/biopet-core/src/test/resources/template.ssp rename to biopet-core/src/test/resources/template.ssp diff --git a/public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/BiopetPipeTest.scala b/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/BiopetPipeTest.scala similarity index 100% rename from public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/BiopetPipeTest.scala rename to biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/BiopetPipeTest.scala diff --git a/public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/CommandLineResourcesTest.scala b/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/CommandLineResourcesTest.scala similarity index 100% rename from public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/CommandLineResourcesTest.scala rename to biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/CommandLineResourcesTest.scala diff --git a/public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/MultiSampleQScriptTest.scala b/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/MultiSampleQScriptTest.scala similarity index 100% rename from public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/MultiSampleQScriptTest.scala rename to biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/MultiSampleQScriptTest.scala diff --git a/public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/PipelineCommandTest.scala b/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/PipelineCommandTest.scala similarity index 100% rename from public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/PipelineCommandTest.scala rename to biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/PipelineCommandTest.scala diff --git a/public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/ReferenceTest.scala b/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/ReferenceTest.scala similarity index 100% rename from public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/ReferenceTest.scala rename to biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/ReferenceTest.scala diff --git a/public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/SampleLibraryTagTest.scala b/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/SampleLibraryTagTest.scala similarity index 100% rename from public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/SampleLibraryTagTest.scala rename to biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/SampleLibraryTagTest.scala diff --git a/public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/ToolCommandTest.scala b/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/ToolCommandTest.scala similarity index 100% rename from public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/ToolCommandTest.scala rename to biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/ToolCommandTest.scala diff --git a/public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/report/MultisampleReportBuilderTest.scala b/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/report/MultisampleReportBuilderTest.scala similarity index 100% rename from public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/report/MultisampleReportBuilderTest.scala rename to biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/report/MultisampleReportBuilderTest.scala diff --git a/public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/report/ReportBuilderTest.scala b/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/report/ReportBuilderTest.scala similarity index 100% rename from public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/report/ReportBuilderTest.scala rename to biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/report/ReportBuilderTest.scala diff --git a/public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/report/ReportSectionTest.scala b/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/report/ReportSectionTest.scala similarity index 100% rename from public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/report/ReportSectionTest.scala rename to biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/report/ReportSectionTest.scala diff --git a/public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/summary/SummarizableTest.scala b/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/summary/SummarizableTest.scala similarity index 100% rename from public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/summary/SummarizableTest.scala rename to biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/summary/SummarizableTest.scala diff --git a/public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/summary/SummaryQScriptTest.scala b/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/summary/SummaryQScriptTest.scala similarity index 100% rename from public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/summary/SummaryQScriptTest.scala rename to biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/summary/SummaryQScriptTest.scala diff --git a/public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/summary/WriteSummaryTest.scala b/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/summary/WriteSummaryTest.scala similarity index 100% rename from public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/summary/WriteSummaryTest.scala rename to biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/summary/WriteSummaryTest.scala diff --git a/public/biopet-extensions/pom.xml b/biopet-extensions/pom.xml similarity index 100% rename from public/biopet-extensions/pom.xml rename to biopet-extensions/pom.xml diff --git a/public/biopet-extensions/src/main/resources/nl/lumc/sasc/biopet/extensions/breakdancer/breakdancer2vcf.py b/biopet-extensions/src/main/resources/nl/lumc/sasc/biopet/extensions/breakdancer/breakdancer2vcf.py similarity index 100% rename from public/biopet-extensions/src/main/resources/nl/lumc/sasc/biopet/extensions/breakdancer/breakdancer2vcf.py rename to biopet-extensions/src/main/resources/nl/lumc/sasc/biopet/extensions/breakdancer/breakdancer2vcf.py diff --git a/public/biopet-extensions/src/main/resources/nl/lumc/sasc/biopet/extensions/samtools/fix_iupac_mpileup.py b/biopet-extensions/src/main/resources/nl/lumc/sasc/biopet/extensions/samtools/fix_iupac_mpileup.py similarity index 100% rename from public/biopet-extensions/src/main/resources/nl/lumc/sasc/biopet/extensions/samtools/fix_iupac_mpileup.py rename to biopet-extensions/src/main/resources/nl/lumc/sasc/biopet/extensions/samtools/fix_iupac_mpileup.py diff --git a/public/biopet-extensions/src/main/resources/nl/lumc/sasc/biopet/extensions/varscan/fix_mpileup.py b/biopet-extensions/src/main/resources/nl/lumc/sasc/biopet/extensions/varscan/fix_mpileup.py similarity index 100% rename from public/biopet-extensions/src/main/resources/nl/lumc/sasc/biopet/extensions/varscan/fix_mpileup.py rename to biopet-extensions/src/main/resources/nl/lumc/sasc/biopet/extensions/varscan/fix_mpileup.py diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Bgzip.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Bgzip.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Bgzip.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Bgzip.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Cat.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Cat.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Cat.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Cat.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Cufflinks.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Cufflinks.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Cufflinks.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Cufflinks.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Cuffquant.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Cuffquant.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Cuffquant.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Cuffquant.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Curl.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Curl.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Curl.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Curl.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Cutadapt.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Cutadapt.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Cutadapt.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Cutadapt.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Fastqc.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Fastqc.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Fastqc.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Fastqc.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Flash.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Flash.scala similarity index 88% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Flash.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Flash.scala index 7e4ef448859682383759a46083e66e12515106e1..dd2f35d0bc66846d656cc33f75980757c74ab85d 100644 --- a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Flash.scala +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Flash.scala @@ -17,9 +17,9 @@ package nl.lumc.sasc.biopet.extensions import java.io.File -import nl.lumc.sasc.biopet.core.{ Version, BiopetCommandLineFunction } +import nl.lumc.sasc.biopet.core.{ BiopetCommandLineFunction, Version } import nl.lumc.sasc.biopet.utils.config.Configurable -import org.broadinstitute.gatk.utils.commandline.Input +import org.broadinstitute.gatk.utils.commandline.{ Input, Output } import scala.util.matching.Regex @@ -64,16 +64,33 @@ class Flash(val root: Configurable) extends BiopetCommandLineFunction with Versi private def suffix = outputSuffix.getOrElse("fastq") + (if (compress) ".gz" else "") + @Output + private var _combinedFastq: File = _ def combinedFastq = new File(outputDirectory, s"$outputPrefix.extendedFrags.$suffix") + + @Output + private var _notCombinedR1: File = _ def notCombinedR1 = new File(outputDirectory, s"$outputPrefix.notCombined_1.$suffix") + + @Output + private var _notCombinedR2: File = _ def notCombinedR2 = new File(outputDirectory, s"$outputPrefix.notCombined_2.$suffix") + + @Output + private var _outputHistogramTable: File = _ def outputHistogramTable = new File(outputDirectory, s"$outputPrefix.hist") + + @Output + private var _outputHistogram: File = _ def outputHistogram = new File(outputDirectory, s"$outputPrefix.histogram") override def beforeGraph(): Unit = { super.beforeGraph() - outputFiles :::= combinedFastq :: notCombinedR1 :: - notCombinedR2 :: outputHistogramTable :: outputHistogram :: Nil + _combinedFastq = combinedFastq + _notCombinedR1 = notCombinedR1 + _notCombinedR2 = notCombinedR2 + _outputHistogramTable = outputHistogramTable + _outputHistogram = outputHistogram } def cmdLine = executable + diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Freebayes.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Freebayes.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Freebayes.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Freebayes.scala diff --git a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Grep.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Grep.scala new file mode 100644 index 0000000000000000000000000000000000000000..606c7af5dd84538cce4d283eff06087c10aabb2c --- /dev/null +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Grep.scala @@ -0,0 +1,50 @@ +package nl.lumc.sasc.biopet.extensions + +import java.io.File + +import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction +import nl.lumc.sasc.biopet.utils.config.Configurable +import org.broadinstitute.gatk.utils.commandline.{ Input, Output } + +/** + * Created by pjvanthof on 30/03/16. + */ +class Grep(val root: Configurable) extends BiopetCommandLineFunction { + @Input(doc = "Input file", required = true) + var input: File = _ + + @Output(doc = "Output file", required = true) + var output: File = _ + + executable = config("exe", default = "grep") + + var grepFor: String = null + + var invertMatch: Boolean = false + var regex: Boolean = false + var perlRegexp: Boolean = false + + /** return commandline to execute */ + def cmdLine = required(executable) + + conditional(invertMatch, "-v") + + conditional(regex, "-e") + + conditional(perlRegexp, "-P") + + required(grepFor) + + (if (inputAsStdin) "" else required(input)) + + (if (outputAsStsout) "" else " > " + required(output)) +} + +object Grep { + def apply(root: Configurable, + grepFor: String, + regex: Boolean = false, + invertMatch: Boolean = false, + perlRegexp: Boolean = false): Grep = { + val grep = new Grep(root) + grep.grepFor = grepFor + grep.regex = regex + grep.perlRegexp = perlRegexp + grep.invertMatch = invertMatch + grep + } +} diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Gzip.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Gzip.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Gzip.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Gzip.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/HtseqCount.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/HtseqCount.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/HtseqCount.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/HtseqCount.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Ln.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Ln.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Ln.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Ln.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Pbzip2.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Pbzip2.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Pbzip2.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Pbzip2.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Pysvtools.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Pysvtools.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Pysvtools.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Pysvtools.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Raxml.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Raxml.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Raxml.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Raxml.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/RunGubbins.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/RunGubbins.scala similarity index 98% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/RunGubbins.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/RunGubbins.scala index 5334ab9cfe64a98f2d4c81745404c11006884044..896bb597f8d47b87bb01ad15eba7a2a80d2a9bc6 100644 --- a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/RunGubbins.scala +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/RunGubbins.scala @@ -49,6 +49,9 @@ class RunGubbins(val root: Configurable) extends BiopetCommandLineFunction { var verbose: Boolean = config("verbose", default = false) var noCleanup: Boolean = config("no_cleanup", default = false) + @Output + var outputFiles: List[File] = Nil + /** Set correct output files */ override def beforeGraph(): Unit = { super.beforeGraph() diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Sha1sum.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Sha1sum.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Sha1sum.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Sha1sum.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Sickle.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Sickle.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Sickle.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Sickle.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Snptest.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Snptest.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Snptest.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Snptest.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Stampy.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Stampy.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Stampy.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Stampy.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Star.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Star.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Star.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Star.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Tabix.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Tabix.scala similarity index 98% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Tabix.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Tabix.scala index eb39fa864a481f094636474a7ec61396f5c6dcf8..8c0fbc9603db0bf5a5f2c04047f850a9fb730b0a 100644 --- a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Tabix.scala +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Tabix.scala @@ -65,6 +65,9 @@ class Tabix(val root: Configurable) extends BiopetCommandLineFunction with Versi /** Formats that tabix can handle */ private val validFormats: Set[String] = Set("gff", "bed", "sam", "vcf", "psltbl") + @Output + var outputFiles: List[File] = Nil + override def beforeGraph(): Unit = { super.beforeGraph() p match { diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/TarExtract.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/TarExtract.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/TarExtract.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/TarExtract.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Tophat.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Tophat.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Tophat.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Tophat.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/VariantEffectPredictor.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/VariantEffectPredictor.scala similarity index 97% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/VariantEffectPredictor.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/VariantEffectPredictor.scala index bc8ae1e7a3072db7afeaa346425c38bb83a8e633..20b4ae8422936bfc5a8b3b8310074b01b46445a6 100644 --- a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/VariantEffectPredictor.scala +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/VariantEffectPredictor.scala @@ -150,14 +150,17 @@ class VariantEffectPredictor(val root: Configurable) extends BiopetCommandLineFu override def defaultCoreMemory = 4.0 + @Output + private var _summary: File = null + override def beforeGraph(): Unit = { super.beforeGraph() if (!cache && !database) { - Logging.addError("Must supply either cache or database for VariantEffectPredictor") + Logging.addError("Must either set 'cache' or 'database' to true for VariantEffectPredictor") } else if (cache && dir.isEmpty) { - Logging.addError("Must supply dir to cache for VariantEffectPredictor") + Logging.addError("Must supply 'dir_cache' to cache for VariantEffectPredictor") } - if (statsText) outputFiles :+= new File(output.getAbsolutePath + "_summary.txt") + if (statsText) _summary = new File(output.getAbsolutePath + "_summary.txt") } /** Returns command to execute */ diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/WigToBigWig.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/WigToBigWig.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/WigToBigWig.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/WigToBigWig.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Zcat.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Zcat.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Zcat.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Zcat.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bcftools/Bcftools.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bcftools/Bcftools.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bcftools/Bcftools.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bcftools/Bcftools.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bcftools/BcftoolsCall.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bcftools/BcftoolsCall.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bcftools/BcftoolsCall.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bcftools/BcftoolsCall.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bcftools/BcftoolsMerge.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bcftools/BcftoolsMerge.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bcftools/BcftoolsMerge.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bcftools/BcftoolsMerge.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bcftools/BcftoolsView.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bcftools/BcftoolsView.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bcftools/BcftoolsView.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bcftools/BcftoolsView.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/Bedtools.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/Bedtools.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/Bedtools.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/Bedtools.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsCoverage.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsCoverage.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsCoverage.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsCoverage.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsGroupby.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsGroupby.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsGroupby.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsGroupby.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsIntersect.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsIntersect.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsIntersect.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsIntersect.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsMerge.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsMerge.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsMerge.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsMerge.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bowtie/Bowtie.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bowtie/Bowtie.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bowtie/Bowtie.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bowtie/Bowtie.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bowtie/Bowtie2.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bowtie/Bowtie2.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bowtie/Bowtie2.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bowtie/Bowtie2.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bowtie/Bowtie2Build.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bowtie/Bowtie2Build.scala similarity index 92% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bowtie/Bowtie2Build.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bowtie/Bowtie2Build.scala index 8d2b9ecaea5c8caef2182f52472de1a1a8e936da..ef553453f2a16c4abca32b29af5f963761c8b770 100644 --- a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bowtie/Bowtie2Build.scala +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bowtie/Bowtie2Build.scala @@ -17,9 +17,9 @@ package nl.lumc.sasc.biopet.extensions.bowtie import java.io.File -import nl.lumc.sasc.biopet.core.{ Version, BiopetCommandLineFunction } +import nl.lumc.sasc.biopet.core.{ BiopetCommandLineFunction, Version } import nl.lumc.sasc.biopet.utils.config.Configurable -import org.broadinstitute.gatk.utils.commandline.{ Argument, Input } +import org.broadinstitute.gatk.utils.commandline.{ Argument, Input, Output } /** * Created by pjvan_thof on 8/15/15. @@ -37,6 +37,9 @@ class Bowtie2Build(val root: Configurable) extends BiopetCommandLineFunction wit override def defaultCoreMemory = 15.0 + @Output + private var outputFiles: List[File] = Nil + override def beforeGraph: Unit = { outputFiles ::= new File(reference.getParentFile, baseName + ".1.bt2") outputFiles ::= new File(reference.getParentFile, baseName + ".2.bt2") diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bowtie/BowtieBuild.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bowtie/BowtieBuild.scala similarity index 92% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bowtie/BowtieBuild.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bowtie/BowtieBuild.scala index 6e589c589800ccfcf821080eee85f1c917c0eee0..9faeef91b8a9745e315c332a9d0eb7c364dad677 100644 --- a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bowtie/BowtieBuild.scala +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bowtie/BowtieBuild.scala @@ -17,9 +17,9 @@ package nl.lumc.sasc.biopet.extensions.bowtie import java.io.File -import nl.lumc.sasc.biopet.core.{ Version, BiopetCommandLineFunction } +import nl.lumc.sasc.biopet.core.{ BiopetCommandLineFunction, Version } import nl.lumc.sasc.biopet.utils.config.Configurable -import org.broadinstitute.gatk.utils.commandline.{ Argument, Input } +import org.broadinstitute.gatk.utils.commandline.{ Argument, Input, Output } /** * Created by pjvan_thof on 8/15/15. @@ -37,6 +37,9 @@ class BowtieBuild(val root: Configurable) extends BiopetCommandLineFunction with override def defaultCoreMemory = 15.0 + @Output + private var outputFiles: List[File] = Nil + override def beforeGraph: Unit = { outputFiles ::= new File(reference.getParentFile, baseName + ".1.ebwt") outputFiles ::= new File(reference.getParentFile, baseName + ".2.ebwt") diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/BreakdancerCaller.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/BreakdancerCaller.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/BreakdancerCaller.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/BreakdancerCaller.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/BreakdancerConfig.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/BreakdancerConfig.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/BreakdancerConfig.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/BreakdancerConfig.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/BreakdancerVCF.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/BreakdancerVCF.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/BreakdancerVCF.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/BreakdancerVCF.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/Bwa.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/Bwa.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/Bwa.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/Bwa.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaAln.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaAln.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaAln.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaAln.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaIndex.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaIndex.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaIndex.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaIndex.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaMem.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaMem.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaMem.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaMem.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaSampe.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaSampe.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaSampe.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaSampe.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaSamse.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaSamse.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaSamse.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bwa/BwaSamse.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/clever/CleverCaller.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/clever/CleverCaller.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/clever/CleverCaller.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/clever/CleverCaller.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/conifer/Conifer.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/conifer/Conifer.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/conifer/Conifer.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/conifer/Conifer.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/conifer/ConiferAnalyze.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/conifer/ConiferAnalyze.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/conifer/ConiferAnalyze.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/conifer/ConiferAnalyze.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/conifer/ConiferCall.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/conifer/ConiferCall.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/conifer/ConiferCall.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/conifer/ConiferCall.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/conifer/ConiferExport.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/conifer/ConiferExport.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/conifer/ConiferExport.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/conifer/ConiferExport.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/conifer/ConiferRPKM.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/conifer/ConiferRPKM.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/conifer/ConiferRPKM.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/conifer/ConiferRPKM.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/delly/DellyCaller.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/delly/DellyCaller.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/delly/DellyCaller.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/delly/DellyCaller.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/CatVariants.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/CatVariants.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/CatVariants.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/CatVariants.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/CombineVariants.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/CombineVariants.scala similarity index 90% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/CombineVariants.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/CombineVariants.scala index cc230a6ad48e50f782f773a54d1537a72ad85e2d..343e2d769656dd6800d4cd552f51aa25cec7d28c 100644 --- a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/CombineVariants.scala +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/CombineVariants.scala @@ -17,13 +17,16 @@ package nl.lumc.sasc.biopet.extensions.gatk import java.io.File +import nl.lumc.sasc.biopet.utils.VcfUtils import nl.lumc.sasc.biopet.utils.config.Configurable -import org.broadinstitute.gatk.utils.commandline.{ Input, Output } +import org.broadinstitute.gatk.utils.commandline.{ Gather, Input, Output } /** * Extension for CombineVariants from GATK * * Created by pjvan_thof on 2/26/15. + * + * @deprecated */ class CombineVariants(val root: Configurable) extends Gatk { val analysisType = "CombineVariants" @@ -47,9 +50,13 @@ class CombineVariants(val root: Configurable) extends Gatk { inputMap += file -> name } + @Output + @Gather(enabled = false) + private var outputIndex: File = _ + override def beforeGraph(): Unit = { super.beforeGraph() - if (outputFile.getName.endsWith(".vcf.gz")) outputFiles :+= new File(outputFile.getAbsolutePath + ".tbi") + outputIndex = VcfUtils.getVcfIndexFile(outputFile) genotypeMergeOptions match { case Some("UNIQUIFY") | Some("PRIORITIZE") | Some("UNSORTED") | Some("REQUIRE_UNIQUE") | None => case _ => throw new IllegalArgumentException("Wrong option for genotypeMergeOptions") diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/Gatk.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/Gatk.scala similarity index 99% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/Gatk.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/Gatk.scala index 33522732f42599390238d294c8e6dfb1297f3829..92ca40e02d94e4935f3f1c031cf1371e4b77b8a2 100644 --- a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/Gatk.scala +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/Gatk.scala @@ -24,6 +24,8 @@ import org.broadinstitute.gatk.utils.commandline.Input * General extension for GATK module * * Created by pjvan_thof on 2/26/15. + * + * @deprecated */ abstract class Gatk extends BiopetJavaCommandLineFunction with Reference with Version { override def subPath = "gatk" :: super.subPath diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/GenotypeConcordance.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/GenotypeConcordance.scala similarity index 99% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/GenotypeConcordance.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/GenotypeConcordance.scala index 519cbfad6a8db14cf4812fb0005dc7e0e0e6aa65..62d2457de0431b8c28ddb3e2eae58352a4b39b23 100644 --- a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/GenotypeConcordance.scala +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/GenotypeConcordance.scala @@ -26,6 +26,8 @@ import org.broadinstitute.gatk.utils.report.{ GATKReportTable, GATKReport } * Extension for CombineVariants from GATK * * Created by pjvan_thof on 2/26/15. + * + * @deprecated */ class GenotypeConcordance(val root: Configurable) extends Gatk with Summarizable { val analysisType = "GenotypeConcordance" diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/SelectVariants.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/SelectVariants.scala similarity index 87% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/SelectVariants.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/SelectVariants.scala index 65abc60985a05edcd07aee8646f5b0c04ca839ed..d98abff1485b59cd0424eff47d03b0d1dbfe585d 100644 --- a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/SelectVariants.scala +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/SelectVariants.scala @@ -17,13 +17,16 @@ package nl.lumc.sasc.biopet.extensions.gatk import java.io.File +import nl.lumc.sasc.biopet.utils.VcfUtils import nl.lumc.sasc.biopet.utils.config.Configurable -import org.broadinstitute.gatk.utils.commandline.{ Input, Output } +import org.broadinstitute.gatk.utils.commandline.{ Gather, Input, Output } /** * Extension for CombineVariants from GATK * * Created by pjvan_thof on 2/26/15. + * + * @deprecated */ class SelectVariants(val root: Configurable) extends Gatk { val analysisType = "SelectVariants" @@ -43,9 +46,13 @@ class SelectVariants(val root: Configurable) extends Gatk { inputMap += file -> name } + @Output + @Gather(enabled = false) + private var outputIndex: File = _ + override def beforeGraph(): Unit = { super.beforeGraph() - if (outputFile.getName.endsWith(".vcf.gz")) outputFiles :+= new File(outputFile.getAbsolutePath + ".tbi") + outputIndex = VcfUtils.getVcfIndexFile(outputFile) deps :::= inputFiles.filter(_.getName.endsWith("vcf.gz")).map(x => new File(x.getAbsolutePath + ".tbi")) deps = deps.distinct } diff --git a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/AnalyzeCovariates.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/AnalyzeCovariates.scala new file mode 100644 index 0000000000000000000000000000000000000000..b501d47de6cb0899d8e02ae8a4372fd50de4f7e1 --- /dev/null +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/AnalyzeCovariates.scala @@ -0,0 +1,67 @@ +package nl.lumc.sasc.biopet.extensions.gatk.broad + +import java.io.File + +import nl.lumc.sasc.biopet.utils.config.Configurable +import nl.lumc.sasc.biopet.core.ScatterGatherableFunction +import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Output, _ } + +class AnalyzeCovariates(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction { + def analysis_type = "AnalyzeCovariates" + scatterClass = classOf[LocusScatterFunction] + setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = false } + + /** file containing the BQSR first-pass report file */ + @Input(fullName = "beforeReportFile", shortName = "before", doc = "file containing the BQSR first-pass report file", required = false, exclusiveOf = "", validation = "") + var beforeReportFile: File = _ + + /** file containing the BQSR second-pass report file */ + @Input(fullName = "afterReportFile", shortName = "after", doc = "file containing the BQSR second-pass report file", required = false, exclusiveOf = "", validation = "") + var afterReportFile: File = _ + + /** do not emit warning messages related to suspicious last modification time order of inputs */ + @Argument(fullName = "ignoreLastModificationTimes", shortName = "ignoreLMT", doc = "do not emit warning messages related to suspicious last modification time order of inputs", required = false, exclusiveOf = "", validation = "") + var ignoreLastModificationTimes: Boolean = config("ignoreLastModificationTimes", default = false) + + /** location of the output report */ + @Output(fullName = "plotsReportFile", shortName = "plots", doc = "location of the output report", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[org.broadinstitute.gatk.queue.function.scattergather.SimpleTextGatherFunction]) + var plotsReportFile: File = _ + + /** location of the csv intermediate file */ + @Output(fullName = "intermediateCsvFile", shortName = "csv", doc = "location of the csv intermediate file", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[org.broadinstitute.gatk.queue.function.scattergather.SimpleTextGatherFunction]) + var intermediateCsvFile: File = _ + + /** Filter out reads with CIGAR containing the N operator, instead of failing with an error */ + @Argument(fullName = "filter_reads_with_N_cigar", shortName = "filterRNC", doc = "Filter out reads with CIGAR containing the N operator, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_reads_with_N_cigar: Boolean = config("filter_reads_with_N_cigar", default = false) + + /** Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error */ + @Argument(fullName = "filter_mismatching_base_and_quals", shortName = "filterMBQ", doc = "Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_mismatching_base_and_quals: Boolean = config("filter_mismatching_base_and_quals", default = false) + + /** Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error */ + @Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_bases_not_stored: Boolean = config("filter_bases_not_stored", default = false) + + override def cmdLine = super.cmdLine + + optional("-before", beforeReportFile, spaceSeparated = true, escape = true, format = "%s") + + optional("-after", afterReportFile, spaceSeparated = true, escape = true, format = "%s") + + conditional(ignoreLastModificationTimes, "-ignoreLMT", escape = true, format = "%s") + + optional("-plots", plotsReportFile, spaceSeparated = true, escape = true, format = "%s") + + optional("-csv", intermediateCsvFile, spaceSeparated = true, escape = true, format = "%s") + + conditional(filter_reads_with_N_cigar, "-filterRNC", escape = true, format = "%s") + + conditional(filter_mismatching_base_and_quals, "-filterMBQ", escape = true, format = "%s") + + conditional(filter_bases_not_stored, "-filterNoBases", escape = true, format = "%s") +} + +object AnalyzeCovariates { + def apply(root: Configurable, before: File, after: File, plots: File): AnalyzeCovariates = { + val ac = new AnalyzeCovariates(root) + ac.beforeReportFile = before + ac.afterReportFile = after + ac.plotsReportFile = plots + ac + } +} diff --git a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/ApplyRecalibration.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/ApplyRecalibration.scala new file mode 100644 index 0000000000000000000000000000000000000000..a84aa4b4b8728a1a5c7bbab442a4d905b626821a --- /dev/null +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/ApplyRecalibration.scala @@ -0,0 +1,107 @@ +package nl.lumc.sasc.biopet.extensions.gatk.broad + +import java.io.File + +import nl.lumc.sasc.biopet.utils.config.Configurable +import org.broadinstitute.gatk.queue.extensions.gatk.TaggedFile +import nl.lumc.sasc.biopet.core.ScatterGatherableFunction +import nl.lumc.sasc.biopet.utils.VcfUtils +import org.broadinstitute.gatk.utils.commandline.Argument +import org.broadinstitute.gatk.utils.commandline.Gather +import org.broadinstitute.gatk.utils.commandline.Input +import org.broadinstitute.gatk.utils.commandline.Output + +class ApplyRecalibration(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction { + def analysis_type = "ApplyRecalibration" + scatterClass = classOf[LocusScatterFunction] + setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = false } + + /** The raw input variants to be recalibrated */ + @Input(fullName = "input", shortName = "input", doc = "The raw input variants to be recalibrated", required = true, exclusiveOf = "", validation = "") + var input: Seq[File] = Nil + + /** The input recal file used by ApplyRecalibration */ + @Input(fullName = "recal_file", shortName = "recalFile", doc = "The input recal file used by ApplyRecalibration", required = true, exclusiveOf = "", validation = "") + var recal_file: File = _ + + /** The input tranches file describing where to cut the data */ + @Input(fullName = "tranches_file", shortName = "tranchesFile", doc = "The input tranches file describing where to cut the data", required = false, exclusiveOf = "", validation = "") + var tranches_file: File = _ + + /** The output filtered and recalibrated VCF file in which each variant is annotated with its VQSLOD value */ + @Output(fullName = "out", shortName = "o", doc = "The output filtered and recalibrated VCF file in which each variant is annotated with its VQSLOD value", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[CatVariantsGatherer]) + var out: File = _ + + /** The truth sensitivity level at which to start filtering */ + @Argument(fullName = "ts_filter_level", shortName = "ts_filter_level", doc = "The truth sensitivity level at which to start filtering", required = false, exclusiveOf = "", validation = "") + var ts_filter_level: Option[Double] = config("ts_filter_level") + + /** Format string for ts_filter_level */ + @Argument(fullName = "ts_filter_levelFormat", shortName = "", doc = "Format string for ts_filter_level", required = false, exclusiveOf = "", validation = "") + var ts_filter_levelFormat: String = "%s" + + /** The VQSLOD score below which to start filtering */ + @Argument(fullName = "lodCutoff", shortName = "lodCutoff", doc = "The VQSLOD score below which to start filtering", required = false, exclusiveOf = "", validation = "") + var lodCutoff: Option[Double] = config("lodCutoff") + + /** Format string for lodCutoff */ + @Argument(fullName = "lodCutoffFormat", shortName = "", doc = "Format string for lodCutoff", required = false, exclusiveOf = "", validation = "") + var lodCutoffFormat: String = "%s" + + /** If specified, the recalibration will be applied to variants marked as filtered by the specified filter name in the input VCF file */ + @Argument(fullName = "ignore_filter", shortName = "ignoreFilter", doc = "If specified, the recalibration will be applied to variants marked as filtered by the specified filter name in the input VCF file", required = false, exclusiveOf = "", validation = "") + var ignore_filter: List[String] = config("ignore_filter", default = Nil) + + /** If specified, the variant recalibrator will ignore all input filters. Useful to rerun the VQSR from a filtered output file. */ + @Argument(fullName = "ignore_all_filters", shortName = "ignoreAllFilters", doc = "If specified, the variant recalibrator will ignore all input filters. Useful to rerun the VQSR from a filtered output file.", required = false, exclusiveOf = "", validation = "") + var ignore_all_filters: Boolean = config("ignore_all_filters", default = false) + + /** Don't output filtered loci after applying the recalibration */ + @Argument(fullName = "excludeFiltered", shortName = "ef", doc = "Don't output filtered loci after applying the recalibration", required = false, exclusiveOf = "", validation = "") + var excludeFiltered: Boolean = config("excludeFiltered", default = false) + + /** Recalibration mode to employ: 1.) SNP for recalibrating only SNPs (emitting indels untouched in the output VCF); 2.) INDEL for indels; and 3.) BOTH for recalibrating both SNPs and indels simultaneously. */ + @Argument(fullName = "mode", shortName = "mode", doc = "Recalibration mode to employ: 1.) SNP for recalibrating only SNPs (emitting indels untouched in the output VCF); 2.) INDEL for indels; and 3.) BOTH for recalibrating both SNPs and indels simultaneously.", required = false, exclusiveOf = "", validation = "") + var mode: String = _ + + /** Filter out reads with CIGAR containing the N operator, instead of failing with an error */ + @Argument(fullName = "filter_reads_with_N_cigar", shortName = "filterRNC", doc = "Filter out reads with CIGAR containing the N operator, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_reads_with_N_cigar: Boolean = config("filter_reads_with_N_cigar", default = false) + + /** Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error */ + @Argument(fullName = "filter_mismatching_base_and_quals", shortName = "filterMBQ", doc = "Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_mismatching_base_and_quals: Boolean = config("filter_mismatching_base_and_quals", default = false) + + /** Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error */ + @Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_bases_not_stored: Boolean = config("filter_bases_not_stored", default = false) + + @Output + @Gather(enabled = false) + private var outputIndex: File = _ + + override def beforeGraph() { + super.beforeGraph() + deps ++= input.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig)) + if (recal_file != null) + deps :+= VcfUtils.getVcfIndexFile(recal_file) + if (out != null && !org.broadinstitute.gatk.utils.io.IOUtils.isSpecialFile(out)) + outputIndex = VcfUtils.getVcfIndexFile(out) + num_threads = Option(getThreads) + } + + override def cmdLine = super.cmdLine + + repeat("-input", input, formatPrefix = TaggedFile.formatCommandLineParameter, spaceSeparated = true, escape = true, format = "%s") + + required(TaggedFile.formatCommandLineParameter("-recalFile", recal_file), recal_file, spaceSeparated = true, escape = true, format = "%s") + + optional("-tranchesFile", tranches_file, spaceSeparated = true, escape = true, format = "%s") + + optional("-o", out, spaceSeparated = true, escape = true, format = "%s") + + optional("-ts_filter_level", ts_filter_level, spaceSeparated = true, escape = true, format = ts_filter_levelFormat) + + optional("-lodCutoff", lodCutoff, spaceSeparated = true, escape = true, format = lodCutoffFormat) + + repeat("-ignoreFilter", ignore_filter, spaceSeparated = true, escape = true, format = "%s") + conditional(ignore_all_filters, "-ignoreAllFilters", escape = true, format = "%s") + + conditional(excludeFiltered, "-ef", escape = true, format = "%s") + + optional("-mode", mode, spaceSeparated = true, escape = true, format = "%s") + + conditional(filter_reads_with_N_cigar, "-filterRNC", escape = true, format = "%s") + + conditional(filter_mismatching_base_and_quals, "-filterMBQ", escape = true, format = "%s") + + conditional(filter_bases_not_stored, "-filterNoBases", escape = true, format = "%s") +} diff --git a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/BamGatherFunction.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/BamGatherFunction.scala new file mode 100644 index 0000000000000000000000000000000000000000..eb821f0e47ec6c5b3444cb8bed7172ae6dc906eb --- /dev/null +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/BamGatherFunction.scala @@ -0,0 +1,34 @@ +package nl.lumc.sasc.biopet.extensions.gatk.broad + +import org.broadinstitute.gatk.queue.function.scattergather.GatherFunction + +import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction +import nl.lumc.sasc.biopet.extensions.picard.MergeSamFiles + +/** + * Merges BAM files using htsjdk.samtools.MergeSamFiles. + */ +class BamGatherFunction extends MergeSamFiles(null) with GatherFunction { + + override val root = originalFunction match { + case b: BiopetCommandLineFunction => b + case _ => null + } + + this.assumeSorted = true + + override def freezeFieldValues() { + this.input = this.gatherParts.toList + this.output = this.originalOutput + this.sortOrder = "coordinate" + //Left to its own devices (ie, MergeSamFiles.freezeFieldValues), outputIndex + //will be in the gather directory. Ensure that it actually matches this.output + + val originalGATK = originalFunction.asInstanceOf[CommandLineGATK] + + // Whatever the original function can handle, merging *should* do less. + this.createIndex = !originalGATK.disable_bam_indexing + + super.freezeFieldValues() + } +} diff --git a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/BaseRecalibrator.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/BaseRecalibrator.scala new file mode 100644 index 0000000000000000000000000000000000000000..828beeb64ea6396437fd195dbdb4718e2417f24a --- /dev/null +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/BaseRecalibrator.scala @@ -0,0 +1,185 @@ +package nl.lumc.sasc.biopet.extensions.gatk.broad + +import java.io.File + +import nl.lumc.sasc.biopet.utils.config.Configurable +import org.broadinstitute.gatk.queue.extensions.gatk.{ TaggedFile } +import nl.lumc.sasc.biopet.core.ScatterGatherableFunction +import nl.lumc.sasc.biopet.utils.VcfUtils +import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Output, _ } + +//TODO: check gathering +class BaseRecalibrator(val root: Configurable) extends CommandLineGATK /* with ScatterGatherableFunction */ { + def analysis_type = "BaseRecalibrator" + //TODO: check gathering + //scatterClass = classOf[ContigScatterFunction] + //setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = false } + + /** A database of known polymorphic sites */ + @Input(fullName = "knownSites", shortName = "knownSites", doc = "A database of known polymorphic sites", required = false, exclusiveOf = "", validation = "") + var knownSites: List[File] = config("known_sites", default = Nil) + + /** Dependencies on any indexes of knownSites */ + @Input(fullName = "knownSitesIndexes", shortName = "", doc = "Dependencies on any indexes of knownSites", required = false, exclusiveOf = "", validation = "") + private var knownSitesIndexes: Seq[File] = Nil + + /** The output recalibration table file to create */ + @Output(fullName = "out", shortName = "o", doc = "The output recalibration table file to create", required = true, exclusiveOf = "", validation = "") //TODO: check gathering + //@Gather(classOf[org.broadinstitute.gatk.engine.recalibration.BQSRGatherer]) + var out: File = _ + + /** One or more covariates to be used in the recalibration. Can be specified multiple times */ + @Argument(fullName = "covariate", shortName = "cov", doc = "One or more covariates to be used in the recalibration. Can be specified multiple times", required = false, exclusiveOf = "", validation = "") + var covariate: List[String] = config("covariate", default = Nil) + + /** Do not use the standard set of covariates, but rather just the ones listed using the -cov argument */ + @Argument(fullName = "no_standard_covs", shortName = "noStandard", doc = "Do not use the standard set of covariates, but rather just the ones listed using the -cov argument", required = false, exclusiveOf = "", validation = "") + var no_standard_covs: Boolean = config("no_standard_covs", default = false) + + /** If specified, allows the recalibrator to be used without a dbsnp rod. Very unsafe and for expert users only. */ + @Argument(fullName = "run_without_dbsnp_potentially_ruining_quality", shortName = "run_without_dbsnp_potentially_ruining_quality", doc = "If specified, allows the recalibrator to be used without a dbsnp rod. Very unsafe and for expert users only.", required = false, exclusiveOf = "", validation = "") + var run_without_dbsnp_potentially_ruining_quality: Boolean = config("run_without_dbsnp_potentially_ruining_quality", default = false) + + /** How should we recalibrate solid bases in which the reference was inserted? Options = DO_NOTHING, SET_Q_ZERO, SET_Q_ZERO_BASE_N, or REMOVE_REF_BIAS */ + @Argument(fullName = "solid_recal_mode", shortName = "sMode", doc = "How should we recalibrate solid bases in which the reference was inserted? Options = DO_NOTHING, SET_Q_ZERO, SET_Q_ZERO_BASE_N, or REMOVE_REF_BIAS", required = false, exclusiveOf = "", validation = "") + var solid_recal_mode: Option[String] = config("solid_recal_mode") + + /** Defines the behavior of the recalibrator when it encounters no calls in the color space. Options = THROW_EXCEPTION, LEAVE_READ_UNRECALIBRATED, or PURGE_READ */ + @Argument(fullName = "solid_nocall_strategy", shortName = "solid_nocall_strategy", doc = "Defines the behavior of the recalibrator when it encounters no calls in the color space. Options = THROW_EXCEPTION, LEAVE_READ_UNRECALIBRATED, or PURGE_READ", required = false, exclusiveOf = "", validation = "") + var solid_nocall_strategy: Option[String] = config("solid_nocall_strategy") + + /** Size of the k-mer context to be used for base mismatches */ + @Argument(fullName = "mismatches_context_size", shortName = "mcs", doc = "Size of the k-mer context to be used for base mismatches", required = false, exclusiveOf = "", validation = "") + var mismatches_context_size: Option[Int] = config("mismatches_context_size") + + /** Size of the k-mer context to be used for base insertions and deletions */ + @Argument(fullName = "indels_context_size", shortName = "ics", doc = "Size of the k-mer context to be used for base insertions and deletions", required = false, exclusiveOf = "", validation = "") + var indels_context_size: Option[Int] = config("indels_context_size") + + /** The maximum cycle value permitted for the Cycle covariate */ + @Argument(fullName = "maximum_cycle_value", shortName = "maxCycle", doc = "The maximum cycle value permitted for the Cycle covariate", required = false, exclusiveOf = "", validation = "") + var maximum_cycle_value: Option[Int] = config("maximum_cycle_value") + + /** default quality for the base mismatches covariate */ + @Argument(fullName = "mismatches_default_quality", shortName = "mdq", doc = "default quality for the base mismatches covariate", required = false, exclusiveOf = "", validation = "") + var mismatches_default_quality: Option[String] = config("mismatches_default_quality") + + /** default quality for the base insertions covariate */ + @Argument(fullName = "insertions_default_quality", shortName = "idq", doc = "default quality for the base insertions covariate", required = false, exclusiveOf = "", validation = "") + var insertions_default_quality: Option[String] = config("insertions_default_quality") + + /** default quality for the base deletions covariate */ + @Argument(fullName = "deletions_default_quality", shortName = "ddq", doc = "default quality for the base deletions covariate", required = false, exclusiveOf = "", validation = "") + var deletions_default_quality: Option[String] = config("deletions_default_quality") + + /** minimum quality for the bases in the tail of the reads to be considered */ + @Argument(fullName = "low_quality_tail", shortName = "lqt", doc = "minimum quality for the bases in the tail of the reads to be considered", required = false, exclusiveOf = "", validation = "") + var low_quality_tail: Option[String] = config("low_quality_tail") + + /** number of distinct quality scores in the quantized output */ + @Argument(fullName = "quantizing_levels", shortName = "ql", doc = "number of distinct quality scores in the quantized output", required = false, exclusiveOf = "", validation = "") + var quantizing_levels: Option[Int] = config("quantizing_levels") + + /** the binary tag covariate name if using it */ + @Argument(fullName = "binary_tag_name", shortName = "bintag", doc = "the binary tag covariate name if using it", required = false, exclusiveOf = "", validation = "") + var binary_tag_name: Option[String] = config("binary_tag_name") + + /** Sort the rows in the tables of reports */ + @Argument(fullName = "sort_by_all_columns", shortName = "sortAllCols", doc = "Sort the rows in the tables of reports", required = false, exclusiveOf = "", validation = "") + var sort_by_all_columns: Boolean = config("sort_by_all_columns", default = false) + + /** If a read has no platform then default to the provided String. Valid options are illumina, 454, and solid. */ + @Argument(fullName = "default_platform", shortName = "dP", doc = "If a read has no platform then default to the provided String. Valid options are illumina, 454, and solid.", required = false, exclusiveOf = "", validation = "") + var default_platform: Option[String] = config("default_platform") + + /** If provided, the platform of EVERY read will be forced to be the provided String. Valid options are illumina, 454, and solid. */ + @Argument(fullName = "force_platform", shortName = "fP", doc = "If provided, the platform of EVERY read will be forced to be the provided String. Valid options are illumina, 454, and solid.", required = false, exclusiveOf = "", validation = "") + var force_platform: Option[String] = config("force_platform") + + /** If provided, the read group of EVERY read will be forced to be the provided String. */ + @Argument(fullName = "force_readgroup", shortName = "fRG", doc = "If provided, the read group of EVERY read will be forced to be the provided String.", required = false, exclusiveOf = "", validation = "") + var force_readgroup: Option[String] = config("force_readgroup") + + /** If provided, log all updates to the recalibration tables to the given file. For debugging/testing purposes only */ + @Output(fullName = "recal_table_update_log", shortName = "recal_table_update_log", doc = "If provided, log all updates to the recalibration tables to the given file. For debugging/testing purposes only", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[org.broadinstitute.gatk.queue.function.scattergather.SimpleTextGatherFunction]) + var recal_table_update_log: File = _ + + /** Max size of the k-mer context to be used for repeat covariates */ + @Argument(fullName = "max_str_unit_length", shortName = "maxstr", doc = "Max size of the k-mer context to be used for repeat covariates", required = false, exclusiveOf = "", validation = "") + var max_str_unit_length: Option[Int] = config("max_str_unit_length") + + /** Max number of repetitions to be used for repeat covariates */ + @Argument(fullName = "max_repeat_length", shortName = "maxrep", doc = "Max number of repetitions to be used for repeat covariates", required = false, exclusiveOf = "", validation = "") + var max_repeat_length: Option[Int] = config("max_repeat_length") + + /** Reduce memory usage in multi-threaded code at the expense of threading efficiency */ + @Argument(fullName = "lowMemoryMode", shortName = "lowMemoryMode", doc = "Reduce memory usage in multi-threaded code at the expense of threading efficiency", required = false, exclusiveOf = "", validation = "") + var lowMemoryMode: Boolean = config("lowMemoryMode", default = false) + + /** BQSR BAQ gap open penalty (Phred Scaled). Default value is 40. 30 is perhaps better for whole genome call sets */ + @Argument(fullName = "bqsrBAQGapOpenPenalty", shortName = "bqsrBAQGOP", doc = "BQSR BAQ gap open penalty (Phred Scaled). Default value is 40. 30 is perhaps better for whole genome call sets", required = false, exclusiveOf = "", validation = "") + var bqsrBAQGapOpenPenalty: Option[Double] = config("bqsrBAQGapOpenPenalty") + + /** Format string for bqsrBAQGapOpenPenalty */ + @Argument(fullName = "bqsrBAQGapOpenPenaltyFormat", shortName = "", doc = "Format string for bqsrBAQGapOpenPenalty", required = false, exclusiveOf = "", validation = "") + var bqsrBAQGapOpenPenaltyFormat: String = "%s" + + /** Filter out reads with CIGAR containing the N operator, instead of failing with an error */ + @Argument(fullName = "filter_reads_with_N_cigar", shortName = "filterRNC", doc = "Filter out reads with CIGAR containing the N operator, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_reads_with_N_cigar: Boolean = config("filter_reads_with_N_cigar", default = false) + + /** Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error */ + @Argument(fullName = "filter_mismatching_base_and_quals", shortName = "filterMBQ", doc = "Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_mismatching_base_and_quals: Boolean = config("filter_mismatching_base_and_quals", default = false) + + /** Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error */ + @Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_bases_not_stored: Boolean = config("filter_bases_not_stored", default = false) + + if (config.contains("dbsnp")) knownSites :+= new File(config("dbsnp").asString) + + override def beforeGraph() { + super.beforeGraph() + knownSitesIndexes ++= knownSites.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig)) + } + + override def cmdLine = super.cmdLine + + repeat("-knownSites", knownSites, formatPrefix = TaggedFile.formatCommandLineParameter, spaceSeparated = true, escape = true, format = "%s") + + required("-o", out, spaceSeparated = true, escape = true, format = "%s") + + repeat("-cov", covariate, spaceSeparated = true, escape = true, format = "%s") + + conditional(no_standard_covs, "-noStandard", escape = true, format = "%s") + + conditional(run_without_dbsnp_potentially_ruining_quality, "-run_without_dbsnp_potentially_ruining_quality", escape = true, format = "%s") + + optional("-sMode", solid_recal_mode, spaceSeparated = true, escape = true, format = "%s") + + optional("-solid_nocall_strategy", solid_nocall_strategy, spaceSeparated = true, escape = true, format = "%s") + + optional("-mcs", mismatches_context_size, spaceSeparated = true, escape = true, format = "%s") + + optional("-ics", indels_context_size, spaceSeparated = true, escape = true, format = "%s") + + optional("-maxCycle", maximum_cycle_value, spaceSeparated = true, escape = true, format = "%s") + + optional("-mdq", mismatches_default_quality, spaceSeparated = true, escape = true, format = "%s") + + optional("-idq", insertions_default_quality, spaceSeparated = true, escape = true, format = "%s") + + optional("-ddq", deletions_default_quality, spaceSeparated = true, escape = true, format = "%s") + + optional("-lqt", low_quality_tail, spaceSeparated = true, escape = true, format = "%s") + + optional("-ql", quantizing_levels, spaceSeparated = true, escape = true, format = "%s") + + optional("-bintag", binary_tag_name, spaceSeparated = true, escape = true, format = "%s") + + conditional(sort_by_all_columns, "-sortAllCols", escape = true, format = "%s") + + optional("-dP", default_platform, spaceSeparated = true, escape = true, format = "%s") + + optional("-fP", force_platform, spaceSeparated = true, escape = true, format = "%s") + + optional("-fRG", force_readgroup, spaceSeparated = true, escape = true, format = "%s") + + optional("-recal_table_update_log", recal_table_update_log, spaceSeparated = true, escape = true, format = "%s") + + optional("-maxstr", max_str_unit_length, spaceSeparated = true, escape = true, format = "%s") + + optional("-maxrep", max_repeat_length, spaceSeparated = true, escape = true, format = "%s") + + conditional(lowMemoryMode, "-lowMemoryMode", escape = true, format = "%s") + + optional("-bqsrBAQGOP", bqsrBAQGapOpenPenalty, spaceSeparated = true, escape = true, format = bqsrBAQGapOpenPenaltyFormat) + + conditional(filter_reads_with_N_cigar, "-filterRNC", escape = true, format = "%s") + + conditional(filter_mismatching_base_and_quals, "-filterMBQ", escape = true, format = "%s") + + conditional(filter_bases_not_stored, "-filterNoBases", escape = true, format = "%s") +} + +object BaseRecalibrator { + def apply(root: Configurable, input: File, output: File): BaseRecalibrator = { + val br = new BaseRecalibrator(root) + br.input_file :+= input + br.out = output + br + } +} diff --git a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CatVariants.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CatVariants.scala new file mode 100644 index 0000000000000000000000000000000000000000..6a23df5ff8d1f1a66c7606e826d7a09ad8924cc5 --- /dev/null +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CatVariants.scala @@ -0,0 +1,59 @@ +package nl.lumc.sasc.biopet.extensions.gatk.broad + +import java.io.File + +import nl.lumc.sasc.biopet.core.BiopetJavaCommandLineFunction +import nl.lumc.sasc.biopet.utils.config.Configurable +import org.broadinstitute.gatk.utils.commandline.Argument +import org.broadinstitute.gatk.utils.commandline.Gather +import org.broadinstitute.gatk.utils.commandline.Input +import org.broadinstitute.gatk.utils.commandline.Output + +class CatVariants(val root: Configurable) extends BiopetJavaCommandLineFunction { + analysisName = "CatVariants" + javaMainClass = "org.broadinstitute.gatk.tools.CatVariants" + + /** genome reference file <name>.fasta */ + @Input(fullName = "reference", shortName = "R", doc = "genome reference file <name>.fasta", required = true, exclusiveOf = "", validation = "") + var reference: File = _ + + /** Input VCF file/s */ + @Input(fullName = "variant", shortName = "V", doc = "Input VCF file/s", required = true, exclusiveOf = "", validation = "") + var variant: Seq[File] = Nil + + /** output file */ + @Output(fullName = "outputFile", shortName = "out", doc = "output file", required = true, exclusiveOf = "", validation = "") + @Gather(classOf[org.broadinstitute.gatk.queue.function.scattergather.SimpleTextGatherFunction]) + var outputFile: File = _ + + /** assumeSorted should be true if the input files are already sorted (based on the position of the variants) */ + @Argument(fullName = "assumeSorted", shortName = "assumeSorted", doc = "assumeSorted should be true if the input files are already sorted (based on the position of the variants)", required = false, exclusiveOf = "", validation = "") + var assumeSorted: Boolean = _ + + /** which type of IndexCreator to use for VCF/BCF indices */ + @Argument(fullName = "variant_index_type", shortName = "", doc = "which type of IndexCreator to use for VCF/BCF indices", required = false, exclusiveOf = "", validation = "") + var variant_index_type: Option[String] = None + + /** the parameter (bin width or features per bin) to pass to the VCF/BCF IndexCreator */ + @Argument(fullName = "variant_index_parameter", shortName = "", doc = "the parameter (bin width or features per bin) to pass to the VCF/BCF IndexCreator", required = false, exclusiveOf = "", validation = "") + var variant_index_parameter: Option[Int] = None + + /** Set the minimum level of logging */ + @Argument(fullName = "logging_level", shortName = "l", doc = "Set the minimum level of logging", required = false, exclusiveOf = "", validation = "") + var logging_level: String = _ + + /** Set the logging location */ + @Output(fullName = "log_to_file", shortName = "log", doc = "Set the logging location", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[org.broadinstitute.gatk.queue.function.scattergather.SimpleTextGatherFunction]) + var log_to_file: File = _ + + override def cmdLine = super.cmdLine + + required("-R", reference, spaceSeparated = true, escape = true, format = "%s") + + repeat("-V", variant, spaceSeparated = true, escape = true, format = "%s") + + required("-out", outputFile, spaceSeparated = true, escape = true, format = "%s") + + conditional(assumeSorted, "-assumeSorted", escape = true, format = "%s") + + optional("--variant_index_type", variant_index_type, spaceSeparated = true, escape = true, format = "%s") + + optional("--variant_index_parameter", variant_index_parameter, spaceSeparated = true, escape = true, format = "%s") + + optional("-l", logging_level, spaceSeparated = true, escape = true, format = "%s") + + optional("-log", log_to_file, spaceSeparated = true, escape = true, format = "%s") +} diff --git a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CatVariantsGather.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CatVariantsGather.scala new file mode 100644 index 0000000000000000000000000000000000000000..e97d6affbf023455122c49b3df59900211df0bea --- /dev/null +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CatVariantsGather.scala @@ -0,0 +1,38 @@ +package nl.lumc.sasc.biopet.extensions.gatk.broad + +import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction +import org.broadinstitute.gatk.queue.extensions.gatk.TaggedFile +import org.broadinstitute.gatk.queue.function.scattergather.GatherFunction + +/** + * + * Currently this is the default gather for VCFs. + * One can set a specific gatherer to use by adding @Gather before any output argument. + * For example (used to be part of UG): + * \@Gather(className = "org.broadinstitute.gatk.queue.extensions.gatk.CatVariantsGatherer") + * \@Output(doc="File to which variants should be written",required=true) + * protected VariantContextWriter writer = null; + */ +class CatVariantsGatherer extends CatVariants(null) with GatherFunction { + this.assumeSorted = true + + analysisName = "Gather_CatVariants" + + override val root = originalFunction match { + case b: BiopetCommandLineFunction => b + case _ => null + } + + override def freezeFieldValues() { + val originalGATK = this.originalFunction.asInstanceOf[CommandLineGATK] + + this.reference = originalGATK.reference_sequence + this.variant = this.gatherParts.zipWithIndex map { case (input, index) => new TaggedFile(input, "input" + index) } + this.outputFile = this.originalOutput + this.assumeSorted = true + this.variant_index_type = originalGATK.variant_index_type + this.variant_index_parameter = originalGATK.variant_index_parameter + + super.freezeFieldValues() + } +} diff --git a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CombineGVCFs.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CombineGVCFs.scala new file mode 100644 index 0000000000000000000000000000000000000000..e20331fe1b1c670acff8d1d1ca743585a8a0735f --- /dev/null +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CombineGVCFs.scala @@ -0,0 +1,89 @@ +package nl.lumc.sasc.biopet.extensions.gatk.broad + +import java.io.File + +import nl.lumc.sasc.biopet.utils.config.Configurable +import org.broadinstitute.gatk.queue.extensions.gatk.TaggedFile +import nl.lumc.sasc.biopet.core.ScatterGatherableFunction +import nl.lumc.sasc.biopet.utils.VcfUtils +import org.broadinstitute.gatk.utils.commandline.{ Gather, Input, Output, _ } + +class CombineGVCFs(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction { + def analysis_type = "CombineGVCFs" + scatterClass = classOf[LocusScatterFunction] + setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = false } + + /** One or more specific annotations to recompute. The single value 'none' removes the default annotations */ + @Argument(fullName = "annotation", shortName = "A", doc = "One or more specific annotations to recompute. The single value 'none' removes the default annotations", required = false, exclusiveOf = "", validation = "") + var annotation: List[String] = config("annotation", default = Nil, freeVar = false) + + /** One or more classes/groups of annotations to apply to variant calls */ + @Argument(fullName = "group", shortName = "G", doc = "One or more classes/groups of annotations to apply to variant calls", required = false, exclusiveOf = "", validation = "") + var group: List[String] = config("group", default = Nil) + + /** dbSNP file */ + @Input(fullName = "dbsnp", shortName = "D", doc = "dbSNP file", required = false, exclusiveOf = "", validation = "") + var dbsnp: Option[File] = config("dbsnp") + + /** One or more input gVCF files */ + @Input(fullName = "variant", shortName = "V", doc = "One or more input gVCF files", required = true, exclusiveOf = "", validation = "") + var variant: Seq[File] = Nil + + /** File to which the combined gVCF should be written */ + @Output(fullName = "out", shortName = "o", doc = "File to which the combined gVCF should be written", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[CatVariantsGatherer]) + var out: File = _ + + /** If specified, convert banded gVCFs to all-sites gVCFs */ + @Argument(fullName = "convertToBasePairResolution", shortName = "bpResolution", doc = "If specified, convert banded gVCFs to all-sites gVCFs", required = false, exclusiveOf = "", validation = "") + var convertToBasePairResolution: Boolean = config("convertToBasePairResolution", default = false) + + /** If > 0, reference bands will be broken up at genomic positions that are multiples of this number */ + @Argument(fullName = "breakBandsAtMultiplesOf", shortName = "breakBandsAtMultiplesOf", doc = "If > 0, reference bands will be broken up at genomic positions that are multiples of this number", required = false, exclusiveOf = "", validation = "") + var breakBandsAtMultiplesOf: Option[Int] = config("breakBandsAtMultiplesOf") + + /** Filter out reads with CIGAR containing the N operator, instead of failing with an error */ + @Argument(fullName = "filter_reads_with_N_cigar", shortName = "filterRNC", doc = "Filter out reads with CIGAR containing the N operator, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_reads_with_N_cigar: Boolean = config("filter_reads_with_N_cigar", default = false) + + /** Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error */ + @Argument(fullName = "filter_mismatching_base_and_quals", shortName = "filterMBQ", doc = "Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_mismatching_base_and_quals: Boolean = config("filter_mismatching_base_and_quals", default = false) + + /** Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error */ + @Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_bases_not_stored: Boolean = config("filter_bases_not_stored", default = false) + + @Output + @Gather(enabled = false) + private var outputIndex: File = _ + + override def beforeGraph() { + super.beforeGraph() + dbsnp.foreach(deps :+= VcfUtils.getVcfIndexFile(_)) + deps ++= variant.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig)) + if (out != null && !org.broadinstitute.gatk.utils.io.IOUtils.isSpecialFile(out)) + outputIndex = VcfUtils.getVcfIndexFile(out) + } + + override def cmdLine = super.cmdLine + + repeat("-A", annotation, spaceSeparated = true, escape = true, format = "%s") + + repeat("-G", group, spaceSeparated = true, escape = true, format = "%s") + + optional(TaggedFile.formatCommandLineParameter("-D", dbsnp), dbsnp, spaceSeparated = true, escape = true, format = "%s") + + repeat("-V", variant, formatPrefix = TaggedFile.formatCommandLineParameter, spaceSeparated = true, escape = true, format = "%s") + + optional("-o", out, spaceSeparated = true, escape = true, format = "%s") + + conditional(convertToBasePairResolution, "-bpResolution", escape = true, format = "%s") + + optional("-breakBandsAtMultiplesOf", breakBandsAtMultiplesOf, spaceSeparated = true, escape = true, format = "%s") + + conditional(filter_reads_with_N_cigar, "-filterRNC", escape = true, format = "%s") + + conditional(filter_mismatching_base_and_quals, "-filterMBQ", escape = true, format = "%s") + + conditional(filter_bases_not_stored, "-filterNoBases", escape = true, format = "%s") +} + +object CombineGVCFs { + def apply(root: Configurable, input: List[File], output: File): CombineGVCFs = { + val cg = new CombineGVCFs(root) + cg.variant = input + cg.out = output + cg + } +} diff --git a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CombineVariants.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CombineVariants.scala new file mode 100644 index 0000000000000000000000000000000000000000..7873ba3e44a3be042a923024af37a36922bb46d4 --- /dev/null +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CombineVariants.scala @@ -0,0 +1,128 @@ +package nl.lumc.sasc.biopet.extensions.gatk.broad + +import java.io.File + +import nl.lumc.sasc.biopet.utils.config.Configurable +import org.broadinstitute.gatk.queue.extensions.gatk.TaggedFile +import nl.lumc.sasc.biopet.core.ScatterGatherableFunction +import nl.lumc.sasc.biopet.utils.VcfUtils +import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Output, _ } + +class CombineVariants(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction { + def analysis_type = "CombineVariants" + scatterClass = classOf[LocusScatterFunction] + setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = false } + + /** VCF files to merge together */ + @Input(fullName = "variant", shortName = "V", doc = "VCF files to merge together", required = true, exclusiveOf = "", validation = "") + var variant: Seq[File] = Nil + + /** File to which variants should be written */ + @Output(fullName = "out", shortName = "o", doc = "File to which variants should be written", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[CatVariantsGatherer]) + var out: File = _ + + /** Determines how we should merge genotype records for samples shared across the ROD files */ + @Argument(fullName = "genotypemergeoption", shortName = "genotypeMergeOptions", doc = "Determines how we should merge genotype records for samples shared across the ROD files", required = false, exclusiveOf = "", validation = "") + var genotypemergeoption: Option[String] = config("genotypemergeoption") + + /** Determines how we should handle records seen at the same site in the VCF, but with different FILTER fields */ + @Argument(fullName = "filteredrecordsmergetype", shortName = "filteredRecordsMergeType", doc = "Determines how we should handle records seen at the same site in the VCF, but with different FILTER fields", required = false, exclusiveOf = "", validation = "") + var filteredrecordsmergetype: Option[String] = config("filteredrecordsmergetype") + + /** Determines how we should handle records seen at the same site in the VCF, but with different allele types (for example, SNP vs. indel) */ + @Argument(fullName = "multipleallelesmergetype", shortName = "multipleAllelesMergeType", doc = "Determines how we should handle records seen at the same site in the VCF, but with different allele types (for example, SNP vs. indel)", required = false, exclusiveOf = "", validation = "") + var multipleallelesmergetype: Option[String] = config("multipleallelesmergetype") + + /** Ordered list specifying priority for merging */ + @Argument(fullName = "rod_priority_list", shortName = "priority", doc = "Ordered list specifying priority for merging", required = false, exclusiveOf = "", validation = "") + var rod_priority_list: Option[String] = config("rod_priority_list") + + /** Emit interesting sites requiring complex compatibility merging to file */ + @Argument(fullName = "printComplexMerges", shortName = "printComplexMerges", doc = "Emit interesting sites requiring complex compatibility merging to file", required = false, exclusiveOf = "", validation = "") + var printComplexMerges: Boolean = config("printComplexMerges", default = false) + + /** Treat filtered variants as uncalled */ + @Argument(fullName = "filteredAreUncalled", shortName = "filteredAreUncalled", doc = "Treat filtered variants as uncalled", required = false, exclusiveOf = "", validation = "") + var filteredAreUncalled: Boolean = config("filteredAreUncalled", default = false) + + /** Emit a sites-only file */ + @Argument(fullName = "minimalVCF", shortName = "minimalVCF", doc = "Emit a sites-only file", required = false, exclusiveOf = "", validation = "") + var minimalVCF: Boolean = config("minimalVCF", default = false) + + /** Exclude sites where no variation is present after merging */ + @Argument(fullName = "excludeNonVariants", shortName = "env", doc = "Exclude sites where no variation is present after merging", required = false, exclusiveOf = "", validation = "") + var excludeNonVariants: Boolean = config("excludeNonVariants", default = false) + + /** Key name for the set attribute */ + @Argument(fullName = "setKey", shortName = "setKey", doc = "Key name for the set attribute", required = false, exclusiveOf = "", validation = "") + var setKey: Option[String] = config("set_key") + + /** Assume input VCFs have identical sample sets and disjoint calls */ + @Argument(fullName = "assumeIdenticalSamples", shortName = "assumeIdenticalSamples", doc = "Assume input VCFs have identical sample sets and disjoint calls", required = false, exclusiveOf = "", validation = "") + var assumeIdenticalSamples: Boolean = config("assumeIdenticalSamples", default = false) + + /** Minimum number of input files the site must be observed in to be included */ + @Argument(fullName = "minimumN", shortName = "minN", doc = "Minimum number of input files the site must be observed in to be included", required = false, exclusiveOf = "", validation = "") + var minimumN: Option[Int] = config("minimumN") + + /** Do not output the command line to the header */ + @Argument(fullName = "suppressCommandLineHeader", shortName = "suppressCommandLineHeader", doc = "Do not output the command line to the header", required = false, exclusiveOf = "", validation = "") + var suppressCommandLineHeader: Boolean = config("suppressCommandLineHeader", default = false) + + /** Use the INFO content of the record with the highest AC */ + @Argument(fullName = "mergeInfoWithMaxAC", shortName = "mergeInfoWithMaxAC", doc = "Use the INFO content of the record with the highest AC", required = false, exclusiveOf = "", validation = "") + var mergeInfoWithMaxAC: Boolean = config("mergeInfoWithMaxAC", default = false) + + /** Filter out reads with CIGAR containing the N operator, instead of failing with an error */ + @Argument(fullName = "filter_reads_with_N_cigar", shortName = "filterRNC", doc = "Filter out reads with CIGAR containing the N operator, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_reads_with_N_cigar: Boolean = config("filter_reads_with_N_cigar", default = false) + + /** Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error */ + @Argument(fullName = "filter_mismatching_base_and_quals", shortName = "filterMBQ", doc = "Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_mismatching_base_and_quals: Boolean = config("filter_mismatching_base_and_quals", default = false) + + /** Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error */ + @Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_bases_not_stored: Boolean = config("filter_bases_not_stored", default = false) + + @Output + @Gather(enabled = false) + private var outputIndex: File = _ + + override def beforeGraph() { + super.beforeGraph() + deps ++= variant.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig)) + if (out != null && !org.broadinstitute.gatk.utils.io.IOUtils.isSpecialFile(out)) + outputIndex = VcfUtils.getVcfIndexFile(out) + } + + override def cmdLine = super.cmdLine + + repeat("-V", variant, formatPrefix = TaggedFile.formatCommandLineParameter, spaceSeparated = true, escape = true, format = "%s") + + optional("-o", out, spaceSeparated = true, escape = true, format = "%s") + + optional("-genotypeMergeOptions", genotypemergeoption, spaceSeparated = true, escape = true, format = "%s") + + optional("-filteredRecordsMergeType", filteredrecordsmergetype, spaceSeparated = true, escape = true, format = "%s") + + optional("-multipleAllelesMergeType", multipleallelesmergetype, spaceSeparated = true, escape = true, format = "%s") + + optional("-priority", rod_priority_list, spaceSeparated = true, escape = true, format = "%s") + + conditional(printComplexMerges, "-printComplexMerges", escape = true, format = "%s") + + conditional(filteredAreUncalled, "-filteredAreUncalled", escape = true, format = "%s") + + conditional(minimalVCF, "-minimalVCF", escape = true, format = "%s") + + conditional(excludeNonVariants, "-env", escape = true, format = "%s") + + optional("-setKey", setKey, spaceSeparated = true, escape = true, format = "%s") + + conditional(assumeIdenticalSamples, "-assumeIdenticalSamples", escape = true, format = "%s") + + optional("-minN", minimumN, spaceSeparated = true, escape = true, format = "%s") + + conditional(suppressCommandLineHeader, "-suppressCommandLineHeader", escape = true, format = "%s") + + conditional(mergeInfoWithMaxAC, "-mergeInfoWithMaxAC", escape = true, format = "%s") + + conditional(filter_reads_with_N_cigar, "-filterRNC", escape = true, format = "%s") + + conditional(filter_mismatching_base_and_quals, "-filterMBQ", escape = true, format = "%s") + + conditional(filter_bases_not_stored, "-filterNoBases", escape = true, format = "%s") +} + +object CombineVariants { + def apply(root: Configurable, input: List[File], output: File): CombineVariants = { + val cv = new CombineVariants(root) + cv.variant = input + cv.out = output + cv + } +} diff --git a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CommandLineGATK.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CommandLineGATK.scala new file mode 100644 index 0000000000000000000000000000000000000000..3e8091437d7bfe377748a827fef43655cf5b65b4 --- /dev/null +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CommandLineGATK.scala @@ -0,0 +1,406 @@ +package nl.lumc.sasc.biopet.extensions.gatk.broad + +import java.io.File + +import nl.lumc.sasc.biopet.core.{ BiopetJavaCommandLineFunction, Reference, Version } +import org.broadinstitute.gatk.queue.extensions.gatk.TaggedFile +import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Input, Output } +import org.broadinstitute.gatk.utils.interval.{ IntervalMergingRule, IntervalSetRule } + +trait CommandLineGATK extends BiopetJavaCommandLineFunction with Reference with Version { + analysisName = analysis_type + javaMainClass = "org.broadinstitute.gatk.engine.CommandLineGATK" + jarFile = config("gatk_jar") + + /** Name of the tool to run */ + def analysis_type: String + + /** Input file containing sequence data (BAM or CRAM) */ + @Input(fullName = "input_file", shortName = "I", doc = "Input file containing sequence data (BAM or CRAM)", required = false, exclusiveOf = "", validation = "") + var input_file: Seq[File] = Nil + + /** Dependencies on any indexes of input_file */ + @Input(fullName = "input_fileIndexes", shortName = "", doc = "Dependencies on any indexes of input_file", required = false, exclusiveOf = "", validation = "") + private var input_fileIndexes: Seq[File] = Nil + + /** Emit a log entry (level INFO) containing the full list of sequence data files to be included in the analysis (including files inside .bam.list or .cram.list files). */ + @Argument(fullName = "showFullBamList", shortName = "", doc = "Emit a log entry (level INFO) containing the full list of sequence data files to be included in the analysis (including files inside .bam.list or .cram.list files).", required = false, exclusiveOf = "", validation = "") + var showFullBamList: Boolean = config("showFullBamList", default = false) + + /** Number of reads per SAM file to buffer in memory */ + @Argument(fullName = "read_buffer_size", shortName = "rbs", doc = "Number of reads per SAM file to buffer in memory", required = false, exclusiveOf = "", validation = "") + var read_buffer_size: Option[Int] = config("read_buffer_size") + + /** Run reporting mode */ + @Argument(fullName = "phone_home", shortName = "et", doc = "Run reporting mode", required = false, exclusiveOf = "", validation = "") + var phone_home: Option[String] = config("phone_home") + + /** GATK key file required to run with -et NO_ET */ + @Input(fullName = "gatk_key", shortName = "K", doc = "GATK key file required to run with -et NO_ET", required = false, exclusiveOf = "", validation = "") + var gatk_key: Option[File] = config("gatk_key") + + /** Tag to identify this GATK run as part of a group of runs */ + @Argument(fullName = "tag", shortName = "tag", doc = "Tag to identify this GATK run as part of a group of runs", required = false, exclusiveOf = "", validation = "") + var tag: Option[String] = config("tag") + + /** Filters to apply to reads before analysis */ + @Argument(fullName = "read_filter", shortName = "rf", doc = "Filters to apply to reads before analysis", required = false, exclusiveOf = "", validation = "") + var read_filter: List[String] = config("read_filter", default = Nil) + + /** Read filters to disable */ + @Argument(fullName = "disable_read_filter", shortName = "drf", doc = "Read filters to disable", required = false, exclusiveOf = "", validation = "") + var disable_read_filter: List[String] = config("disable_read_filter", default = Nil) + + /** One or more genomic intervals over which to operate */ + @Input(fullName = "intervals", shortName = "L", doc = "One or more genomic intervals over which to operate", required = false, exclusiveOf = "intervalsString", validation = "") + var intervals: List[File] = config("intervals", default = Nil) + + /** One or more genomic intervals over which to operate */ + @Argument(fullName = "intervalsString", shortName = "L", doc = "One or more genomic intervals over which to operate", required = false, exclusiveOf = "intervals", validation = "") + var intervalsString: List[String] = config("intervalsString", default = Nil) + + /** One or more genomic intervals to exclude from processing */ + @Input(fullName = "excludeIntervals", shortName = "XL", doc = "One or more genomic intervals to exclude from processing", required = false, exclusiveOf = "excludeIntervalsString", validation = "") + var excludeIntervals: List[File] = config("excludeIntervals", default = Nil) + + /** One or more genomic intervals to exclude from processing */ + @Argument(fullName = "excludeIntervalsString", shortName = "XL", doc = "One or more genomic intervals to exclude from processing", required = false, exclusiveOf = "excludeIntervals", validation = "") + var excludeIntervalsString: List[String] = config("excludeIntervalsString", default = Nil) + + /** Set merging approach to use for combining interval inputs */ + @Argument(fullName = "interval_set_rule", shortName = "isr", doc = "Set merging approach to use for combining interval inputs", required = false, exclusiveOf = "", validation = "") + var interval_set_rule: Option[IntervalSetRule] = None + + /** Interval merging rule for abutting intervals */ + @Argument(fullName = "interval_merging", shortName = "im", doc = "Interval merging rule for abutting intervals", required = false, exclusiveOf = "", validation = "") + var interval_merging: Option[IntervalMergingRule] = None + + /** Amount of padding (in bp) to add to each interval */ + @Argument(fullName = "interval_padding", shortName = "ip", doc = "Amount of padding (in bp) to add to each interval", required = false, exclusiveOf = "", validation = "") + var interval_padding: Option[Int] = config("interval_padding") + + /** Reference sequence file */ + @Input(fullName = "reference_sequence", shortName = "R", doc = "Reference sequence file", required = false, exclusiveOf = "", validation = "") + var reference_sequence: File = _ + + /** Use a non-deterministic random seed */ + @Argument(fullName = "nonDeterministicRandomSeed", shortName = "ndrs", doc = "Use a non-deterministic random seed", required = false, exclusiveOf = "", validation = "") + var nonDeterministicRandomSeed: Boolean = config("nonDeterministicRandomSeed", default = false) + + /** Completely eliminates randomized dithering from rank sum tests. */ + @Argument(fullName = "disableDithering", shortName = "", doc = "Completely eliminates randomized dithering from rank sum tests.", required = false, exclusiveOf = "", validation = "") + var disableDithering: Boolean = config("disableDithering", default = false) + + /** Stop execution cleanly as soon as maxRuntime has been reached */ + @Argument(fullName = "maxRuntime", shortName = "maxRuntime", doc = "Stop execution cleanly as soon as maxRuntime has been reached", required = false, exclusiveOf = "", validation = "") + var maxRuntime: Option[Long] = config("maxRuntime") + + /** Unit of time used by maxRuntime */ + @Argument(fullName = "maxRuntimeUnits", shortName = "maxRuntimeUnits", doc = "Unit of time used by maxRuntime", required = false, exclusiveOf = "", validation = "") + var maxRuntimeUnits: Option[String] = config("maxRuntimeUnits") + + /** Type of read downsampling to employ at a given locus */ + @Argument(fullName = "downsampling_type", shortName = "dt", doc = "Type of read downsampling to employ at a given locus", required = false, exclusiveOf = "", validation = "") + var downsampling_type: Option[String] = config("downsampling_type") + + /** Fraction of reads to downsample to */ + @Argument(fullName = "downsample_to_fraction", shortName = "dfrac", doc = "Fraction of reads to downsample to", required = false, exclusiveOf = "", validation = "") + var downsample_to_fraction: Option[Double] = config("downsample_to_fraction") + + /** Format string for downsample_to_fraction */ + @Argument(fullName = "downsample_to_fractionFormat", shortName = "", doc = "Format string for downsample_to_fraction", required = false, exclusiveOf = "", validation = "") + var downsample_to_fractionFormat: String = "%s" + + /** Target coverage threshold for downsampling to coverage */ + @Argument(fullName = "downsample_to_coverage", shortName = "dcov", doc = "Target coverage threshold for downsampling to coverage", required = false, exclusiveOf = "", validation = "") + var downsample_to_coverage: Option[Int] = config("downsample_to_coverage") + + /** Type of BAQ calculation to apply in the engine */ + @Argument(fullName = "baq", shortName = "baq", doc = "Type of BAQ calculation to apply in the engine", required = false, exclusiveOf = "", validation = "") + var baq: Option[String] = config("baq") + + /** BAQ gap open penalty */ + @Argument(fullName = "baqGapOpenPenalty", shortName = "baqGOP", doc = "BAQ gap open penalty", required = false, exclusiveOf = "", validation = "") + var baqGapOpenPenalty: Option[Double] = config("baqGapOpenPenalty") + + /** Format string for baqGapOpenPenalty */ + @Argument(fullName = "baqGapOpenPenaltyFormat", shortName = "", doc = "Format string for baqGapOpenPenalty", required = false, exclusiveOf = "", validation = "") + var baqGapOpenPenaltyFormat: String = "%s" + + /** Reduce NDN elements in CIGAR string */ + @Argument(fullName = "refactor_NDN_cigar_string", shortName = "fixNDN", doc = "Reduce NDN elements in CIGAR string", required = false, exclusiveOf = "", validation = "") + var refactor_NDN_cigar_string: Boolean = config("refactor_NDN_cigar_string", default = false) + + /** Fix mis-encoded base quality scores */ + @Argument(fullName = "fix_misencoded_quality_scores", shortName = "fixMisencodedQuals", doc = "Fix mis-encoded base quality scores", required = false, exclusiveOf = "", validation = "") + var fix_misencoded_quality_scores: Boolean = config("fix_misencoded_quality_scores", default = false) + + /** Ignore warnings about base quality score encoding */ + @Argument(fullName = "allow_potentially_misencoded_quality_scores", shortName = "allowPotentiallyMisencodedQuals", doc = "Ignore warnings about base quality score encoding", required = false, exclusiveOf = "", validation = "") + var allow_potentially_misencoded_quality_scores: Boolean = config("allow_potentially_misencoded_quality_scores", default = false) + + /** Use the base quality scores from the OQ tag */ + @Argument(fullName = "useOriginalQualities", shortName = "OQ", doc = "Use the base quality scores from the OQ tag", required = false, exclusiveOf = "", validation = "") + var useOriginalQualities: Boolean = config("useOriginalQualities", default = false) + + /** Assign a default base quality */ + @Argument(fullName = "defaultBaseQualities", shortName = "DBQ", doc = "Assign a default base quality", required = false, exclusiveOf = "", validation = "") + var defaultBaseQualities: Option[Int] = config("defaultBaseQualities") + + /** Write GATK runtime performance log to this file */ + @Output(fullName = "performanceLog", shortName = "PF", doc = "Write GATK runtime performance log to this file", required = false, exclusiveOf = "", validation = "") + var performanceLog: Option[File] = None + + /** Input covariates table file for on-the-fly base quality score recalibration */ + @Input(fullName = "BQSR", shortName = "BQSR", doc = "Input covariates table file for on-the-fly base quality score recalibration", required = false, exclusiveOf = "", validation = "") + var BQSR: Option[File] = _ + + /** Quantize quality scores to a given number of levels (with -BQSR) */ + @Argument(fullName = "quantize_quals", shortName = "qq", doc = "Quantize quality scores to a given number of levels (with -BQSR)", required = false, exclusiveOf = "", validation = "") + var quantize_quals: Option[Int] = config("quantize_quals") + + /** Use static quantized quality scores to a given number of levels (with -BQSR) */ + @Argument(fullName = "static_quantized_quals", shortName = "SQQ", doc = "Use static quantized quality scores to a given number of levels (with -BQSR)", required = false, exclusiveOf = "quantize_quals", validation = "") + var static_quantized_quals: List[Int] = config("static_quantized_quals", default = Nil) + + /** Round quals down to nearest quantized qual */ + @Argument(fullName = "round_down_quantized", shortName = "RDQ", doc = "Round quals down to nearest quantized qual", required = false, exclusiveOf = "quantize_quals", validation = "") + var round_down_quantized: Boolean = config("round_down_quantized", default = false) + + /** Disable printing of base insertion and deletion tags (with -BQSR) */ + @Argument(fullName = "disable_indel_quals", shortName = "DIQ", doc = "Disable printing of base insertion and deletion tags (with -BQSR)", required = false, exclusiveOf = "", validation = "") + var disable_indel_quals: Boolean = config("disable_indel_quals", default = false) + + /** Emit the OQ tag with the original base qualities (with -BQSR) */ + @Argument(fullName = "emit_original_quals", shortName = "EOQ", doc = "Emit the OQ tag with the original base qualities (with -BQSR)", required = false, exclusiveOf = "", validation = "") + var emit_original_quals: Boolean = config("emit_original_quals", default = false) + + /** Don't recalibrate bases with quality scores less than this threshold (with -BQSR) */ + @Argument(fullName = "preserve_qscores_less_than", shortName = "preserveQ", doc = "Don't recalibrate bases with quality scores less than this threshold (with -BQSR)", required = false, exclusiveOf = "", validation = "") + var preserve_qscores_less_than: Option[Int] = config("preserve_qscores_less_than") + + /** Global Qscore Bayesian prior to use for BQSR */ + @Argument(fullName = "globalQScorePrior", shortName = "globalQScorePrior", doc = "Global Qscore Bayesian prior to use for BQSR", required = false, exclusiveOf = "", validation = "") + var globalQScorePrior: Option[Double] = config("globalQScorePrior") + + /** Format string for globalQScorePrior */ + @Argument(fullName = "globalQScorePriorFormat", shortName = "", doc = "Format string for globalQScorePrior", required = false, exclusiveOf = "", validation = "") + var globalQScorePriorFormat: String = "%s" + + /** How strict should we be with validation */ + @Argument(fullName = "validation_strictness", shortName = "S", doc = "How strict should we be with validation", required = false, exclusiveOf = "", validation = "") + var validation_strictness: Option[String] = config("validation_strictness") + + /** Remove program records from the SAM header */ + @Argument(fullName = "remove_program_records", shortName = "rpr", doc = "Remove program records from the SAM header", required = false, exclusiveOf = "", validation = "") + var remove_program_records: Boolean = config("remove_program_records", default = false) + + /** Keep program records in the SAM header */ + @Argument(fullName = "keep_program_records", shortName = "kpr", doc = "Keep program records in the SAM header", required = false, exclusiveOf = "", validation = "") + var keep_program_records: Boolean = config("keep_program_records", default = false) + + /** Rename sample IDs on-the-fly at runtime using the provided mapping file */ + @Input(fullName = "sample_rename_mapping_file", shortName = "sample_rename_mapping_file", doc = "Rename sample IDs on-the-fly at runtime using the provided mapping file", required = false, exclusiveOf = "", validation = "") + var sample_rename_mapping_file: Option[File] = config("sample_rename_mapping_file") + + /** Enable unsafe operations: nothing will be checked at runtime */ + @Argument(fullName = "unsafe", shortName = "U", doc = "Enable unsafe operations: nothing will be checked at runtime", required = false, exclusiveOf = "", validation = "") + var unsafe: Option[String] = config("unsafe") + + /** Disable both auto-generation of index files and index file locking */ + @Argument(fullName = "disable_auto_index_creation_and_locking_when_reading_rods", shortName = "disable_auto_index_creation_and_locking_when_reading_rods", doc = "Disable both auto-generation of index files and index file locking", required = false, exclusiveOf = "", validation = "") + var disable_auto_index_creation_and_locking_when_reading_rods: Boolean = config("disable_auto_index_creation_and_locking_when_reading_rods", default = false) + + /** Don't output the usual VCF header tag with the command line. FOR DEBUGGING PURPOSES ONLY. This option is required in order to pass integration tests. */ + @Argument(fullName = "no_cmdline_in_header", shortName = "no_cmdline_in_header", doc = "Don't output the usual VCF header tag with the command line. FOR DEBUGGING PURPOSES ONLY. This option is required in order to pass integration tests.", required = false, exclusiveOf = "", validation = "") + var no_cmdline_in_header: Boolean = config("no_cmdline_in_header", default = false) + + /** Just output sites without genotypes (i.e. only the first 8 columns of the VCF) */ + @Argument(fullName = "sites_only", shortName = "sites_only", doc = "Just output sites without genotypes (i.e. only the first 8 columns of the VCF)", required = false, exclusiveOf = "", validation = "") + var sites_only: Boolean = config("sites_only", default = false) + + /** Always output all the records in VCF FORMAT fields, even if some are missing */ + @Argument(fullName = "never_trim_vcf_format_field", shortName = "writeFullFormat", doc = "Always output all the records in VCF FORMAT fields, even if some are missing", required = false, exclusiveOf = "", validation = "") + var never_trim_vcf_format_field: Boolean = config("never_trim_vcf_format_field", default = false) + + /** Force BCF output, regardless of the file's extension */ + @Argument(fullName = "bcf", shortName = "bcf", doc = "Force BCF output, regardless of the file's extension", required = false, exclusiveOf = "", validation = "") + var bcf: Boolean = config("bcf", default = false) + + /** Compression level to use for writing BAM files (0 - 9, higher is more compressed) */ + @Argument(fullName = "bam_compression", shortName = "compress", doc = "Compression level to use for writing BAM files (0 - 9, higher is more compressed)", required = false, exclusiveOf = "", validation = "") + var bam_compression: Option[Int] = config("bam_compression") + + /** If provided, output BAM/CRAM files will be simplified to include just key reads for downstream variation discovery analyses (removing duplicates, PF-, non-primary reads), as well stripping all extended tags from the kept reads except the read group identifier */ + @Argument(fullName = "simplifyBAM", shortName = "simplifyBAM", doc = "If provided, output BAM/CRAM files will be simplified to include just key reads for downstream variation discovery analyses (removing duplicates, PF-, non-primary reads), as well stripping all extended tags from the kept reads except the read group identifier", required = false, exclusiveOf = "", validation = "") + var simplifyBAM: Boolean = config("simplifyBAM", default = false) + + /** Turn off on-the-fly creation of indices for output BAM/CRAM files. */ + @Argument(fullName = "disable_bam_indexing", shortName = "", doc = "Turn off on-the-fly creation of indices for output BAM/CRAM files.", required = false, exclusiveOf = "", validation = "") + var disable_bam_indexing: Boolean = config("disable_bam_indexing", default = false) + + /** Enable on-the-fly creation of md5s for output BAM files. */ + @Argument(fullName = "generate_md5", shortName = "", doc = "Enable on-the-fly creation of md5s for output BAM files.", required = false, exclusiveOf = "", validation = "") + var generate_md5: Boolean = config("generate_md5", default = false) + + /** Number of data threads to allocate to this analysis */ + @Argument(fullName = "num_threads", shortName = "nt", doc = "Number of data threads to allocate to this analysis", required = false, exclusiveOf = "", validation = "") + var num_threads: Option[Int] = None + + /** Number of CPU threads to allocate per data thread */ + @Argument(fullName = "num_cpu_threads_per_data_thread", shortName = "nct", doc = "Number of CPU threads to allocate per data thread", required = false, exclusiveOf = "", validation = "") + var num_cpu_threads_per_data_thread: Option[Int] = None + + /** Number of given threads to allocate to BAM IO */ + @Argument(fullName = "num_io_threads", shortName = "nit", doc = "Number of given threads to allocate to BAM IO", required = false, exclusiveOf = "", validation = "") + var num_io_threads: Option[Int] = None + + /** Enable threading efficiency monitoring */ + @Argument(fullName = "monitorThreadEfficiency", shortName = "mte", doc = "Enable threading efficiency monitoring", required = false, exclusiveOf = "", validation = "") + var monitorThreadEfficiency: Boolean = config("monitorThreadEfficiency", default = false) + + /** When using IO threads, total number of BAM file handles to keep open simultaneously */ + @Argument(fullName = "num_bam_file_handles", shortName = "bfh", doc = "When using IO threads, total number of BAM file handles to keep open simultaneously", required = false, exclusiveOf = "", validation = "") + var num_bam_file_handles: Option[Int] = None + + /** Exclude read groups based on tags */ + @Input(fullName = "read_group_black_list", shortName = "rgbl", doc = "Exclude read groups based on tags", required = false, exclusiveOf = "", validation = "") + var read_group_black_list: List[File] = config("read_group_black_list", default = Nil) + + /** Pedigree files for samples */ + @Argument(fullName = "pedigree", shortName = "ped", doc = "Pedigree files for samples", required = false, exclusiveOf = "", validation = "") + var pedigree: List[File] = config("pedigree", default = Nil) + + /** Pedigree string for samples */ + @Argument(fullName = "pedigreeString", shortName = "pedString", doc = "Pedigree string for samples", required = false, exclusiveOf = "", validation = "") + var pedigreeString: List[String] = config("pedigreeString", default = Nil) + + /** Validation strictness for pedigree information */ + @Argument(fullName = "pedigreeValidationType", shortName = "pedValidationType", doc = "Validation strictness for pedigree information", required = false, exclusiveOf = "", validation = "") + var pedigreeValidationType: Option[String] = config("pedigreeValidationType") + + /** Allow interval processing with an unsupported BAM/CRAM */ + @Argument(fullName = "allow_intervals_with_unindexed_bam", shortName = "", doc = "Allow interval processing with an unsupported BAM/CRAM", required = false, exclusiveOf = "", validation = "") + var allow_intervals_with_unindexed_bam: Boolean = config("allow_intervals_with_unindexed_bam", default = false) + + /** Write a BCF copy of the output VCF */ + @Argument(fullName = "generateShadowBCF", shortName = "generateShadowBCF", doc = "Write a BCF copy of the output VCF", required = false, exclusiveOf = "", validation = "") + var generateShadowBCF: Boolean = config("generateShadowBCF", default = false) + + /** Type of IndexCreator to use for VCF/BCF indices */ + @Argument(fullName = "variant_index_type", shortName = "variant_index_type", doc = "Type of IndexCreator to use for VCF/BCF indices", required = false, exclusiveOf = "", validation = "") + var variant_index_type: Option[String] = config("variant_index_type") + + /** Parameter to pass to the VCF/BCF IndexCreator */ + @Argument(fullName = "variant_index_parameter", shortName = "variant_index_parameter", doc = "Parameter to pass to the VCF/BCF IndexCreator", required = false, exclusiveOf = "", validation = "") + var variant_index_parameter: Option[Int] = config("variant_index_parameter") + + /** Reference window stop */ + @Argument(fullName = "reference_window_stop", shortName = "ref_win_stop", doc = "Reference window stop", required = false, exclusiveOf = "", validation = "") + var reference_window_stop: Option[Int] = config("reference_window_stop") + + /** Set the minimum level of logging */ + @Argument(fullName = "logging_level", shortName = "l", doc = "Set the minimum level of logging", required = false, exclusiveOf = "", validation = "") + var logging_level: Option[String] = config("logging_level") + + /** Set the logging location */ + @Output(fullName = "log_to_file", shortName = "log", doc = "Set the logging location", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[org.broadinstitute.gatk.queue.function.scattergather.SimpleTextGatherFunction]) + var log_to_file: File = _ + + def versionRegex = """(.*)""".r + override def versionExitcode = List(0, 1) + def versionCommand = executable + " -jar " + jarFile + " -version" + + override def defaultCoreMemory = 4.0 + override def faiRequired = true + override def dictRequired = true + + override def beforeGraph() { + super.beforeGraph() + if (interval_set_rule.isEmpty) { + val v: Option[String] = config("interval_set_rule") + interval_set_rule = v.map(IntervalSetRule.valueOf(_)) + } + if (interval_merging.isEmpty) { + val v: Option[String] = config("interval_merging") + interval_merging = v.map(IntervalMergingRule.valueOf(_)) + } + if (reference_sequence == null) reference_sequence = referenceFasta() + input_fileIndexes ++= input_file.filter(orig => orig != null && orig.getName.endsWith(".bam")).flatMap(orig => Array(new File(orig.getPath.stripSuffix(".bam") + ".bai"))) + if (num_threads.isDefined) nCoresRequest = num_threads + if (num_cpu_threads_per_data_thread.isDefined) nCoresRequest = Some(nCoresRequest.getOrElse(1) * num_cpu_threads_per_data_thread.getOrElse(1)) + } + + override def cmdLine = super.cmdLine + + required("-T", analysis_type, spaceSeparated = true, escape = true, format = "%s") + + repeat("-I", input_file, formatPrefix = TaggedFile.formatCommandLineParameter, spaceSeparated = true, escape = true, format = "%s") + + conditional(showFullBamList, "--showFullBamList", escape = true, format = "%s") + + optional("-rbs", read_buffer_size, spaceSeparated = true, escape = true, format = "%s") + + optional("-et", phone_home, spaceSeparated = true, escape = true, format = "%s") + + optional("-K", gatk_key, spaceSeparated = true, escape = true, format = "%s") + + optional("-tag", tag, spaceSeparated = true, escape = true, format = "%s") + + repeat("-rf", read_filter, spaceSeparated = true, escape = true, format = "%s") + + repeat("-drf", disable_read_filter, spaceSeparated = true, escape = true, format = "%s") + + repeat("-L", intervals, spaceSeparated = true, escape = true, format = "%s") + + repeat("-L", intervalsString, spaceSeparated = true, escape = true, format = "%s") + + repeat("-XL", excludeIntervals, spaceSeparated = true, escape = true, format = "%s") + + repeat("-XL", excludeIntervalsString, spaceSeparated = true, escape = true, format = "%s") + + optional("-isr", interval_set_rule, spaceSeparated = true, escape = true, format = "%s") + + optional("-im", interval_merging, spaceSeparated = true, escape = true, format = "%s") + + optional("-ip", interval_padding, spaceSeparated = true, escape = true, format = "%s") + + optional("-R", reference_sequence, spaceSeparated = true, escape = true, format = "%s") + + conditional(nonDeterministicRandomSeed, "-ndrs", escape = true, format = "%s") + + conditional(disableDithering, "--disableDithering", escape = true, format = "%s") + + optional("-maxRuntime", maxRuntime, spaceSeparated = true, escape = true, format = "%s") + + optional("-maxRuntimeUnits", maxRuntimeUnits, spaceSeparated = true, escape = true, format = "%s") + + optional("-dt", downsampling_type, spaceSeparated = true, escape = true, format = "%s") + + optional("-dfrac", downsample_to_fraction, spaceSeparated = true, escape = true, format = downsample_to_fractionFormat) + + optional("-dcov", downsample_to_coverage, spaceSeparated = true, escape = true, format = "%s") + + optional("-baq", baq, spaceSeparated = true, escape = true, format = "%s") + + optional("-baqGOP", baqGapOpenPenalty, spaceSeparated = true, escape = true, format = baqGapOpenPenaltyFormat) + + conditional(refactor_NDN_cigar_string, "-fixNDN", escape = true, format = "%s") + + conditional(fix_misencoded_quality_scores, "-fixMisencodedQuals", escape = true, format = "%s") + + conditional(allow_potentially_misencoded_quality_scores, "-allowPotentiallyMisencodedQuals", escape = true, format = "%s") + + conditional(useOriginalQualities, "-OQ", escape = true, format = "%s") + + optional("-DBQ", defaultBaseQualities, spaceSeparated = true, escape = true, format = "%s") + + optional("-PF", performanceLog, spaceSeparated = true, escape = true, format = "%s") + + optional("-BQSR", BQSR, spaceSeparated = true, escape = true, format = "%s") + + optional("-qq", quantize_quals, spaceSeparated = true, escape = true, format = "%s") + + repeat("-SQQ", static_quantized_quals, spaceSeparated = true, escape = true, format = "%s") + + conditional(round_down_quantized, "-RDQ", escape = true, format = "%s") + + conditional(disable_indel_quals, "-DIQ", escape = true, format = "%s") + + conditional(emit_original_quals, "-EOQ", escape = true, format = "%s") + + optional("-preserveQ", preserve_qscores_less_than, spaceSeparated = true, escape = true, format = "%s") + + optional("-globalQScorePrior", globalQScorePrior, spaceSeparated = true, escape = true, format = globalQScorePriorFormat) + + optional("-S", validation_strictness, spaceSeparated = true, escape = true, format = "%s") + + conditional(remove_program_records, "-rpr", escape = true, format = "%s") + + conditional(keep_program_records, "-kpr", escape = true, format = "%s") + + optional("-sample_rename_mapping_file", sample_rename_mapping_file, spaceSeparated = true, escape = true, format = "%s") + + optional("-U", unsafe, spaceSeparated = true, escape = true, format = "%s") + + conditional(disable_auto_index_creation_and_locking_when_reading_rods, "-disable_auto_index_creation_and_locking_when_reading_rods", escape = true, format = "%s") + + conditional(no_cmdline_in_header, "-no_cmdline_in_header", escape = true, format = "%s") + + conditional(sites_only, "-sites_only", escape = true, format = "%s") + + conditional(never_trim_vcf_format_field, "-writeFullFormat", escape = true, format = "%s") + + conditional(bcf, "-bcf", escape = true, format = "%s") + + optional("-compress", bam_compression, spaceSeparated = true, escape = true, format = "%s") + + conditional(simplifyBAM, "-simplifyBAM", escape = true, format = "%s") + + conditional(disable_bam_indexing, "--disable_bam_indexing", escape = true, format = "%s") + + conditional(generate_md5, "--generate_md5", escape = true, format = "%s") + + optional("-nt", num_threads, spaceSeparated = true, escape = true, format = "%s") + + optional("-nct", num_cpu_threads_per_data_thread, spaceSeparated = true, escape = true, format = "%s") + + optional("-nit", num_io_threads, spaceSeparated = true, escape = true, format = "%s") + + conditional(monitorThreadEfficiency, "-mte", escape = true, format = "%s") + + optional("-bfh", num_bam_file_handles, spaceSeparated = true, escape = true, format = "%s") + + repeat("-rgbl", read_group_black_list, spaceSeparated = true, escape = true, format = "%s") + + repeat("-ped", pedigree, spaceSeparated = true, escape = true, format = "%s") + + repeat("-pedString", pedigreeString, spaceSeparated = true, escape = true, format = "%s") + + optional("-pedValidationType", pedigreeValidationType, spaceSeparated = true, escape = true, format = "%s") + + conditional(allow_intervals_with_unindexed_bam, "--allow_intervals_with_unindexed_bam", escape = true, format = "%s") + + conditional(generateShadowBCF, "-generateShadowBCF", escape = true, format = "%s") + + optional("-variant_index_type", variant_index_type, spaceSeparated = true, escape = true, format = "%s") + + optional("-variant_index_parameter", variant_index_parameter, spaceSeparated = true, escape = true, format = "%s") + + optional("-ref_win_stop", reference_window_stop, spaceSeparated = true, escape = true, format = "%s") + + optional("-l", logging_level, spaceSeparated = true, escape = true, format = "%s") + + optional("-log", log_to_file, spaceSeparated = true, escape = true, format = "%s") +} diff --git a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/ContigScatterFunction.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/ContigScatterFunction.scala new file mode 100644 index 0000000000000000000000000000000000000000..12350d3ad5d891e410f15dc90662645c3ceb2319 --- /dev/null +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/ContigScatterFunction.scala @@ -0,0 +1,23 @@ +package nl.lumc.sasc.biopet.extensions.gatk.broad + +import collection.JavaConversions._ +import org.broadinstitute.gatk.utils.interval.IntervalUtils +import org.broadinstitute.gatk.queue.function.InProcessFunction + +/** + * Splits intervals by contig instead of evenly. + */ +class ContigScatterFunction extends GATKScatterFunction with InProcessFunction { + + override def scatterCount = if (intervalFilesExist) super.scatterCount min this.maxIntervals else super.scatterCount + + protected override def maxIntervals = { + GATKScatterFunction.getGATKIntervals(this.originalGATK).contigs.size + } + + def run() { + val gi = GATKScatterFunction.getGATKIntervals(this.originalGATK) + IntervalUtils.scatterContigIntervals(gi.samFileHeader, gi.locs, this.scatterOutputFiles) + } +} + diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/GatkGeneral.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/GatkGeneral.scala similarity index 56% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/GatkGeneral.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/GatkGeneral.scala index f7d4b3313582c72893a02aae7ebbfa1b833d903d..b8c3e6ba238836cf5a1c6f71a534a0359275e8c8 100644 --- a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/GatkGeneral.scala +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/GatkGeneral.scala @@ -1,30 +1,12 @@ -/** - * 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. - */ -/** - * Due to the license issue with GATK, this part of Biopet can only be used inside the - * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - * on how to use this protected part of biopet or contact us at sasc@lumc.nl - */ package nl.lumc.sasc.biopet.extensions.gatk.broad import nl.lumc.sasc.biopet.core._ import org.broadinstitute.gatk.engine.phonehome.GATKRunReport -import org.broadinstitute.gatk.queue.extensions.gatk.CommandLineGATK -trait GatkGeneral extends CommandLineGATK with CommandLineResources with Reference with Version { +/** + * @deprecated + */ +trait GatkGeneral extends org.broadinstitute.gatk.queue.extensions.gatk.CommandLineGATK with CommandLineResources with Reference with Version { var executable: String = config("java", default = "java", namespace = "java", freeVar = false) override def subPath = "gatk" :: super.subPath diff --git a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/GatkScatterFunction.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/GatkScatterFunction.scala new file mode 100644 index 0000000000000000000000000000000000000000..f2399b946ca51488bc102b90c9b96f4368f91147 --- /dev/null +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/GatkScatterFunction.scala @@ -0,0 +1,95 @@ +package nl.lumc.sasc.biopet.extensions.gatk.broad + +import org.broadinstitute.gatk.utils.interval.IntervalUtils +import java.io.File + +import org.broadinstitute.gatk.queue.extensions.gatk.GATKIntervals +import org.broadinstitute.gatk.utils.io.IOUtils +import org.broadinstitute.gatk.queue.function.scattergather.{ CloneFunction, ScatterFunction } +import org.broadinstitute.gatk.utils.commandline.{ Output, _ } + +trait GATKScatterFunction extends ScatterFunction { + /* The runtime field to set for specifying intervals. */ + private final val intervalsField = "intervals" + private final val intervalsStringField = "intervalsString" + private final val excludeIntervalsField = "excludeIntervals" + private final val excludeIntervalsStringField = "excludeIntervalsString" + private final val intervalsSetRuleField = "interval_set_rule" + private final val intervalMergingField = "interval_merging" + private final val intervalPaddingField = "interval_padding" + + @Output(doc = "Scatter function outputs") + var scatterOutputFiles: Seq[File] = Nil + + /** The original GATK function. */ + protected var originalGATK: CommandLineGATK = _ + + /** Whether the last scatter job should also include any unmapped reads. */ + var includeUnmapped: Boolean = _ + + override def init() { + this.originalGATK = this.originalFunction.asInstanceOf[CommandLineGATK] + // If intervals have been specified check if unmapped is included + if (this.originalGATK.intervals.size + this.originalGATK.intervalsString.size > 0) + this.includeUnmapped = this.originalGATK.intervalsString.exists(interval => IntervalUtils.isUnmapped(interval)) + } + + override def isScatterGatherable = { + this.originalGATK.reference_sequence != null + } + + override def initCloneInputs(cloneFunction: CloneFunction, index: Int) { + cloneFunction.setFieldValue(this.intervalsField, Seq(new File("scatter.intervals"))) + if (index == this.scatterCount && this.includeUnmapped) + cloneFunction.setFieldValue(this.intervalsStringField, Seq("unmapped")) + else + cloneFunction.setFieldValue(this.intervalsStringField, Seq.empty[String]) + + cloneFunction.setFieldValue(this.intervalsSetRuleField, null) + cloneFunction.setFieldValue(this.intervalMergingField, null) + cloneFunction.setFieldValue(this.intervalPaddingField, None) + cloneFunction.setFieldValue(this.excludeIntervalsField, Seq.empty[File]) + cloneFunction.setFieldValue(this.excludeIntervalsStringField, Seq.empty[String]) + } + + override def bindCloneInputs(cloneFunction: CloneFunction, index: Int) { + val scatterPart = cloneFunction.getFieldValue(this.intervalsField) + .asInstanceOf[Seq[File]] + .map(file => IOUtils.absolute(cloneFunction.commandDirectory, file)) + cloneFunction.setFieldValue(this.intervalsField, scatterPart) + this.scatterOutputFiles ++= scatterPart + } + + /** + * @return true if all interval files exist. + */ + protected def intervalFilesExist = { + !(this.originalGATK.intervals ++ this.originalGATK.excludeIntervals).exists(interval => !interval.exists()) + } + + /** + * @return the maximum number of intervals or this.scatterCount if the maximum can't be determined ahead of time. + */ + protected def maxIntervals: Int +} + +object GATKScatterFunction { + var gatkIntervalsCache = Seq.empty[GATKIntervals] + + def getGATKIntervals(originalFunction: CommandLineGATK) = { + val gatkIntervals = new GATKIntervals( + originalFunction.reference_sequence, + originalFunction.intervals.toSeq, + originalFunction.intervalsString.toSeq, + originalFunction.interval_set_rule.getOrElse(null), + originalFunction.interval_merging.getOrElse(null), + originalFunction.interval_padding, + originalFunction.excludeIntervals.toSeq, originalFunction.excludeIntervalsString.toSeq) + gatkIntervalsCache.find(_ == gatkIntervals) match { + case Some(existingGatkIntervals) => existingGatkIntervals + case None => + gatkIntervalsCache :+= gatkIntervals + gatkIntervals + } + } +} diff --git a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/GenotypeGVCFs.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/GenotypeGVCFs.scala new file mode 100644 index 0000000000000000000000000000000000000000..b1a54e34f4b9a079fef323110c2b61b7d9c5ad25 --- /dev/null +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/GenotypeGVCFs.scala @@ -0,0 +1,149 @@ +package nl.lumc.sasc.biopet.extensions.gatk.broad + +import java.io.File + +import nl.lumc.sasc.biopet.utils.config.Configurable +import org.broadinstitute.gatk.queue.extensions.gatk.TaggedFile +import nl.lumc.sasc.biopet.core.ScatterGatherableFunction +import nl.lumc.sasc.biopet.utils.VcfUtils +import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Output, _ } + +class GenotypeGVCFs(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction { + def analysis_type = "GenotypeGVCFs" + scatterClass = classOf[LocusScatterFunction] + setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = false } + + /** One or more input gVCF files */ + @Input(fullName = "variant", shortName = "V", doc = "One or more input gVCF files", required = true, exclusiveOf = "", validation = "") + var variant: Seq[File] = Nil + + /** File to which variants should be written */ + @Output(fullName = "out", shortName = "o", doc = "File to which variants should be written", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[CatVariantsGatherer]) + var out: File = _ + + /** Include loci found to be non-variant after genotyping */ + @Argument(fullName = "includeNonVariantSites", shortName = "allSites", doc = "Include loci found to be non-variant after genotyping", required = false, exclusiveOf = "", validation = "") + var includeNonVariantSites: Boolean = config("includeNonVariantSites", default = false) + + /** Assume duplicate samples are present and uniquify all names with '.variant' and file number index */ + @Argument(fullName = "uniquifySamples", shortName = "uniquifySamples", doc = "Assume duplicate samples are present and uniquify all names with '.variant' and file number index", required = false, exclusiveOf = "", validation = "") + var uniquifySamples: Boolean = config("uniquifySamples", default = false) + + /** If provided, we will annotate records with the number of alternate alleles that were discovered (but not necessarily genotyped) at a given site */ + @Argument(fullName = "annotateNDA", shortName = "nda", doc = "If provided, we will annotate records with the number of alternate alleles that were discovered (but not necessarily genotyped) at a given site", required = false, exclusiveOf = "", validation = "") + var annotateNDA: Boolean = config("annotateNDA", default = false) + + /** Heterozygosity value used to compute prior likelihoods for any locus */ + @Argument(fullName = "heterozygosity", shortName = "hets", doc = "Heterozygosity value used to compute prior likelihoods for any locus", required = false, exclusiveOf = "", validation = "") + var heterozygosity: Option[Double] = config("heterozygosity") + + /** Format string for heterozygosity */ + @Argument(fullName = "heterozygosityFormat", shortName = "", doc = "Format string for heterozygosity", required = false, exclusiveOf = "", validation = "") + var heterozygosityFormat: String = "%s" + + /** Heterozygosity for indel calling */ + @Argument(fullName = "indel_heterozygosity", shortName = "indelHeterozygosity", doc = "Heterozygosity for indel calling", required = false, exclusiveOf = "", validation = "") + var indel_heterozygosity: Option[Double] = config("indel_heterozygosity") + + /** Format string for indel_heterozygosity */ + @Argument(fullName = "indel_heterozygosityFormat", shortName = "", doc = "Format string for indel_heterozygosity", required = false, exclusiveOf = "", validation = "") + var indel_heterozygosityFormat: String = "%s" + + /** The minimum phred-scaled confidence threshold at which variants should be called */ + @Argument(fullName = "standard_min_confidence_threshold_for_calling", shortName = "stand_call_conf", doc = "The minimum phred-scaled confidence threshold at which variants should be called", required = false, exclusiveOf = "", validation = "") + var standard_min_confidence_threshold_for_calling: Option[Double] = config("stand_call_conf") + + /** Format string for standard_min_confidence_threshold_for_calling */ + @Argument(fullName = "standard_min_confidence_threshold_for_callingFormat", shortName = "", doc = "Format string for standard_min_confidence_threshold_for_calling", required = false, exclusiveOf = "", validation = "") + var standard_min_confidence_threshold_for_callingFormat: String = "%s" + + /** The minimum phred-scaled confidence threshold at which variants should be emitted (and filtered with LowQual if less than the calling threshold) */ + @Argument(fullName = "standard_min_confidence_threshold_for_emitting", shortName = "stand_emit_conf", doc = "The minimum phred-scaled confidence threshold at which variants should be emitted (and filtered with LowQual if less than the calling threshold)", required = false, exclusiveOf = "", validation = "") + var standard_min_confidence_threshold_for_emitting: Option[Double] = config("stand_emit_conf") + + /** Format string for standard_min_confidence_threshold_for_emitting */ + @Argument(fullName = "standard_min_confidence_threshold_for_emittingFormat", shortName = "", doc = "Format string for standard_min_confidence_threshold_for_emitting", required = false, exclusiveOf = "", validation = "") + var standard_min_confidence_threshold_for_emittingFormat: String = "%s" + + /** Maximum number of alternate alleles to genotype */ + @Argument(fullName = "max_alternate_alleles", shortName = "maxAltAlleles", doc = "Maximum number of alternate alleles to genotype", required = false, exclusiveOf = "", validation = "") + var max_alternate_alleles: Option[Int] = config("max_alternate_alleles") + + /** Input prior for calls */ + @Argument(fullName = "input_prior", shortName = "inputPrior", doc = "Input prior for calls", required = false, exclusiveOf = "", validation = "") + var input_prior: List[Double] = config("input_prior", default = Nil) + + /** Ploidy (number of chromosomes) per sample. For pooled data, set to (Number of samples in each pool * Sample Ploidy). */ + @Argument(fullName = "sample_ploidy", shortName = "ploidy", doc = "Ploidy (number of chromosomes) per sample. For pooled data, set to (Number of samples in each pool * Sample Ploidy).", required = false, exclusiveOf = "", validation = "") + var sample_ploidy: Option[Int] = config("sample_ploidy") + + /** One or more specific annotations to recompute. The single value 'none' removes the default annotations */ + @Argument(fullName = "annotation", shortName = "A", doc = "One or more specific annotations to recompute. The single value 'none' removes the default annotations", required = false, exclusiveOf = "", validation = "") + var annotation: List[String] = config("annotation", default = Nil, freeVar = false) + + /** One or more classes/groups of annotations to apply to variant calls */ + @Argument(fullName = "group", shortName = "G", doc = "One or more classes/groups of annotations to apply to variant calls", required = false, exclusiveOf = "", validation = "") + var group: List[String] = config("group", default = Nil) + + /** dbSNP file */ + @Input(fullName = "dbsnp", shortName = "D", doc = "dbSNP file", required = false, exclusiveOf = "", validation = "") + var dbsnp: Option[File] = config("dbsnp") + + /** Filter out reads with CIGAR containing the N operator, instead of failing with an error */ + @Argument(fullName = "filter_reads_with_N_cigar", shortName = "filterRNC", doc = "Filter out reads with CIGAR containing the N operator, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_reads_with_N_cigar: Boolean = config("filter_reads_with_N_cigar", default = false) + + /** Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error */ + @Argument(fullName = "filter_mismatching_base_and_quals", shortName = "filterMBQ", doc = "Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_mismatching_base_and_quals: Boolean = config("filter_mismatching_base_and_quals", default = false) + + /** Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error */ + @Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_bases_not_stored: Boolean = config("filter_bases_not_stored", default = false) + + @Output + @Gather(enabled = false) + private var outputIndex: File = _ + + @Output + @Gather(enabled = false) + private var dbsnpIndex: File = _ + + override def beforeGraph() { + super.beforeGraph() + deps ++= variant.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig)) + if (out != null && !org.broadinstitute.gatk.utils.io.IOUtils.isSpecialFile(out)) + outputIndex = VcfUtils.getVcfIndexFile(out) + dbsnp.foreach(x => dbsnpIndex = VcfUtils.getVcfIndexFile(x)) + } + + override def cmdLine = super.cmdLine + + repeat("-V", variant, formatPrefix = TaggedFile.formatCommandLineParameter, spaceSeparated = true, escape = true, format = "%s") + + optional("-o", out, spaceSeparated = true, escape = true, format = "%s") + + conditional(includeNonVariantSites, "-allSites", escape = true, format = "%s") + + conditional(uniquifySamples, "-uniquifySamples", escape = true, format = "%s") + + conditional(annotateNDA, "-nda", escape = true, format = "%s") + + optional("-hets", heterozygosity, spaceSeparated = true, escape = true, format = heterozygosityFormat) + + optional("-indelHeterozygosity", indel_heterozygosity, spaceSeparated = true, escape = true, format = indel_heterozygosityFormat) + + optional("-stand_call_conf", standard_min_confidence_threshold_for_calling, spaceSeparated = true, escape = true, format = standard_min_confidence_threshold_for_callingFormat) + + optional("-stand_emit_conf", standard_min_confidence_threshold_for_emitting, spaceSeparated = true, escape = true, format = standard_min_confidence_threshold_for_emittingFormat) + + optional("-maxAltAlleles", max_alternate_alleles, spaceSeparated = true, escape = true, format = "%s") + + repeat("-inputPrior", input_prior, spaceSeparated = true, escape = true, format = "%s") + + optional("-ploidy", sample_ploidy, spaceSeparated = true, escape = true, format = "%s") + + repeat("-A", annotation, spaceSeparated = true, escape = true, format = "%s") + + repeat("-G", group, spaceSeparated = true, escape = true, format = "%s") + + optional(TaggedFile.formatCommandLineParameter("-D", dbsnp), dbsnp, spaceSeparated = true, escape = true, format = "%s") + + conditional(filter_reads_with_N_cigar, "-filterRNC", escape = true, format = "%s") + + conditional(filter_mismatching_base_and_quals, "-filterMBQ", escape = true, format = "%s") + + conditional(filter_bases_not_stored, "-filterNoBases", escape = true, format = "%s") +} + +object GenotypeGVCFs { + def apply(root: Configurable, gvcfFiles: List[File], output: File): GenotypeGVCFs = { + val gg = new GenotypeGVCFs(root) + gg.variant = gvcfFiles + gg.out = output + gg + } +} diff --git a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/HaplotypeCaller.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/HaplotypeCaller.scala new file mode 100644 index 0000000000000000000000000000000000000000..5ffdcb306b32bcc06152fd3e1a7457715443cee9 --- /dev/null +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/HaplotypeCaller.scala @@ -0,0 +1,519 @@ +package nl.lumc.sasc.biopet.extensions.gatk.broad + +import java.io.File + +import nl.lumc.sasc.biopet.utils.config.Configurable +import nl.lumc.sasc.biopet.core.ScatterGatherableFunction +import nl.lumc.sasc.biopet.utils.VcfUtils +import org.broadinstitute.gatk.queue.extensions.gatk.TaggedFile +import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Input, Output } + +class HaplotypeCaller(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction { + def analysis_type = "HaplotypeCaller" + scatterClass = classOf[LocusScatterFunction] + setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = false } + + /** File to which variants should be written */ + @Output(fullName = "out", shortName = "o", doc = "File to which variants should be written", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[CatVariantsGatherer]) + var out: File = _ + + /** What likelihood calculation engine to use to calculate the relative likelihood of reads vs haplotypes */ + @Argument(fullName = "likelihoodCalculationEngine", shortName = "likelihoodEngine", doc = "What likelihood calculation engine to use to calculate the relative likelihood of reads vs haplotypes", required = false, exclusiveOf = "", validation = "") + var likelihoodCalculationEngine: String = _ + + /** How to solve heterogeneous kmer situations using the fast method */ + @Argument(fullName = "heterogeneousKmerSizeResolution", shortName = "hksr", doc = "How to solve heterogeneous kmer situations using the fast method", required = false, exclusiveOf = "", validation = "") + var heterogeneousKmerSizeResolution: String = _ + + /** dbSNP file */ + @Input(fullName = "dbsnp", shortName = "D", doc = "dbSNP file", required = false, exclusiveOf = "", validation = "") + var dbsnp: Option[File] = config("dbsnp") + + /** If specified, we will not trim down the active region from the full region (active + extension) to just the active interval for genotyping */ + @Argument(fullName = "dontTrimActiveRegions", shortName = "dontTrimActiveRegions", doc = "If specified, we will not trim down the active region from the full region (active + extension) to just the active interval for genotyping", required = false, exclusiveOf = "", validation = "") + var dontTrimActiveRegions: Boolean = config("dontTrimActiveRegions", default = false) + + /** the maximum extent into the full active region extension that we're willing to go in genotyping our events for discovery */ + @Argument(fullName = "maxDiscARExtension", shortName = "maxDiscARExtension", doc = "the maximum extent into the full active region extension that we're willing to go in genotyping our events for discovery", required = false, exclusiveOf = "", validation = "") + var maxDiscARExtension: Option[Int] = config("maxDiscARExtension") + + /** the maximum extent into the full active region extension that we're willing to go in genotyping our events for GGA mode */ + @Argument(fullName = "maxGGAARExtension", shortName = "maxGGAARExtension", doc = "the maximum extent into the full active region extension that we're willing to go in genotyping our events for GGA mode", required = false, exclusiveOf = "", validation = "") + var maxGGAARExtension: Option[Int] = config("maxGGAARExtension") + + /** Include at least this many bases around an event for calling indels */ + @Argument(fullName = "paddingAroundIndels", shortName = "paddingAroundIndels", doc = "Include at least this many bases around an event for calling indels", required = false, exclusiveOf = "", validation = "") + var paddingAroundIndels: Option[Int] = config("paddingAroundIndels") + + /** Include at least this many bases around an event for calling snps */ + @Argument(fullName = "paddingAroundSNPs", shortName = "paddingAroundSNPs", doc = "Include at least this many bases around an event for calling snps", required = false, exclusiveOf = "", validation = "") + var paddingAroundSNPs: Option[Int] = config("paddingAroundSNPs") + + /** Comparison VCF file */ + @Input(fullName = "comp", shortName = "comp", doc = "Comparison VCF file", required = false, exclusiveOf = "", validation = "") + var comp: List[File] = config("comp", default = Nil) + + /** One or more specific annotations to apply to variant calls */ + @Argument(fullName = "annotation", shortName = "A", doc = "One or more specific annotations to apply to variant calls", required = false, exclusiveOf = "", validation = "") + var annotation: List[String] = config("annotation", default = Nil, freeVar = false) + + /** One or more specific annotations to exclude */ + @Argument(fullName = "excludeAnnotation", shortName = "XA", doc = "One or more specific annotations to exclude", required = false, exclusiveOf = "", validation = "") + var excludeAnnotation: List[String] = config("excludeAnnotation", default = Nil, freeVar = false) + + /** One or more classes/groups of annotations to apply to variant calls */ + @Argument(fullName = "group", shortName = "G", doc = "One or more classes/groups of annotations to apply to variant calls", required = false, exclusiveOf = "", validation = "") + var group: List[String] = config("group", default = Nil, freeVar = false) + + /** Print out very verbose debug information about each triggering active region */ + @Argument(fullName = "debug", shortName = "debug", doc = "Print out very verbose debug information about each triggering active region", required = false, exclusiveOf = "", validation = "") + var debug: Boolean = config("debug", default = false, freeVar = false) + + /** Use the contamination-filtered read maps for the purposes of annotating variants */ + @Argument(fullName = "useFilteredReadsForAnnotations", shortName = "useFilteredReadsForAnnotations", doc = "Use the contamination-filtered read maps for the purposes of annotating variants", required = false, exclusiveOf = "", validation = "") + var useFilteredReadsForAnnotations: Boolean = config("useFilteredReadsForAnnotations", default = false) + + /** Mode for emitting reference confidence scores */ + @Argument(fullName = "emitRefConfidence", shortName = "ERC", doc = "Mode for emitting reference confidence scores", required = false, exclusiveOf = "", validation = "") + var emitRefConfidence: String = _ + + /** File to which assembled haplotypes should be written */ + @Output(fullName = "bamOutput", shortName = "bamout", doc = "File to which assembled haplotypes should be written", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[BamGatherFunction]) + var bamOutput: File = _ + + /** Automatically generated md5 for bamOutput */ + @Output(fullName = "bamOutputMD5", shortName = "", doc = "Automatically generated md5 for bamOutput", required = false, exclusiveOf = "", validation = "") + @Gather(enabled = false) + private var bamOutputMD5: File = _ + + /** Which haplotypes should be written to the BAM */ + @Argument(fullName = "bamWriterType", shortName = "bamWriterType", doc = "Which haplotypes should be written to the BAM", required = false, exclusiveOf = "", validation = "") + var bamWriterType: String = _ + + /** Don't skip calculations in ActiveRegions with no variants */ + @Argument(fullName = "disableOptimizations", shortName = "disableOptimizations", doc = "Don't skip calculations in ActiveRegions with no variants", required = false, exclusiveOf = "", validation = "") + var disableOptimizations: Boolean = config("disableOptimizations", default = false) + + /** If provided, we will annotate records with the number of alternate alleles that were discovered (but not necessarily genotyped) at a given site */ + @Argument(fullName = "annotateNDA", shortName = "nda", doc = "If provided, we will annotate records with the number of alternate alleles that were discovered (but not necessarily genotyped) at a given site", required = false, exclusiveOf = "", validation = "") + var annotateNDA: Boolean = config("annotateNDA", default = false) + + /** Heterozygosity value used to compute prior likelihoods for any locus */ + @Argument(fullName = "heterozygosity", shortName = "hets", doc = "Heterozygosity value used to compute prior likelihoods for any locus", required = false, exclusiveOf = "", validation = "") + var heterozygosity: Option[Double] = config("heterozygosity") + + /** Format string for heterozygosity */ + @Argument(fullName = "heterozygosityFormat", shortName = "", doc = "Format string for heterozygosity", required = false, exclusiveOf = "", validation = "") + var heterozygosityFormat: String = "%s" + + /** Heterozygosity for indel calling */ + @Argument(fullName = "indel_heterozygosity", shortName = "indelHeterozygosity", doc = "Heterozygosity for indel calling", required = false, exclusiveOf = "", validation = "") + var indel_heterozygosity: Option[Double] = config("indel_heterozygosity") + + /** Format string for indel_heterozygosity */ + @Argument(fullName = "indel_heterozygosityFormat", shortName = "", doc = "Format string for indel_heterozygosity", required = false, exclusiveOf = "", validation = "") + var indel_heterozygosityFormat: String = "%s" + + /** The minimum phred-scaled confidence threshold at which variants should be called */ + @Argument(fullName = "standard_min_confidence_threshold_for_calling", shortName = "stand_call_conf", doc = "The minimum phred-scaled confidence threshold at which variants should be called", required = false, exclusiveOf = "", validation = "") + var standard_min_confidence_threshold_for_calling: Option[Double] = config("stand_call_conf") + + /** Format string for standard_min_confidence_threshold_for_calling */ + @Argument(fullName = "standard_min_confidence_threshold_for_callingFormat", shortName = "", doc = "Format string for standard_min_confidence_threshold_for_calling", required = false, exclusiveOf = "", validation = "") + var standard_min_confidence_threshold_for_callingFormat: String = "%s" + + /** The minimum phred-scaled confidence threshold at which variants should be emitted (and filtered with LowQual if less than the calling threshold) */ + @Argument(fullName = "standard_min_confidence_threshold_for_emitting", shortName = "stand_emit_conf", doc = "The minimum phred-scaled confidence threshold at which variants should be emitted (and filtered with LowQual if less than the calling threshold)", required = false, exclusiveOf = "", validation = "") + var standard_min_confidence_threshold_for_emitting: Option[Double] = config("stand_emit_conf") + + /** Format string for standard_min_confidence_threshold_for_emitting */ + @Argument(fullName = "standard_min_confidence_threshold_for_emittingFormat", shortName = "", doc = "Format string for standard_min_confidence_threshold_for_emitting", required = false, exclusiveOf = "", validation = "") + var standard_min_confidence_threshold_for_emittingFormat: String = "%s" + + /** Maximum number of alternate alleles to genotype */ + @Argument(fullName = "max_alternate_alleles", shortName = "maxAltAlleles", doc = "Maximum number of alternate alleles to genotype", required = false, exclusiveOf = "", validation = "") + var max_alternate_alleles: Option[Int] = config("max_alternate_alleles") + + /** Input prior for calls */ + @Argument(fullName = "input_prior", shortName = "inputPrior", doc = "Input prior for calls", required = false, exclusiveOf = "", validation = "") + var input_prior: List[Double] = config("input_prior", default = Nil) + + /** Ploidy (number of chromosomes) per sample. For pooled data, set to (Number of samples in each pool * Sample Ploidy). */ + @Argument(fullName = "sample_ploidy", shortName = "ploidy", doc = "Ploidy (number of chromosomes) per sample. For pooled data, set to (Number of samples in each pool * Sample Ploidy).", required = false, exclusiveOf = "", validation = "") + var sample_ploidy: Option[Int] = config("sample_ploidy") + + /** Specifies how to determine the alternate alleles to use for genotyping */ + @Argument(fullName = "genotyping_mode", shortName = "gt_mode", doc = "Specifies how to determine the alternate alleles to use for genotyping", required = false, exclusiveOf = "", validation = "") + var genotyping_mode: Option[String] = config("genotyping_mode") + + /** The set of alleles at which to genotype when --genotyping_mode is GENOTYPE_GIVEN_ALLELES */ + @Input(fullName = "alleles", shortName = "alleles", doc = "The set of alleles at which to genotype when --genotyping_mode is GENOTYPE_GIVEN_ALLELES", required = false, exclusiveOf = "", validation = "") + var alleles: Option[File] = None + + /** Fraction of contamination in sequencing data (for all samples) to aggressively remove */ + @Argument(fullName = "contamination_fraction_to_filter", shortName = "contamination", doc = "Fraction of contamination in sequencing data (for all samples) to aggressively remove", required = false, exclusiveOf = "", validation = "") + var contamination_fraction_to_filter: Option[Double] = config("contamination_fraction_to_filter") + + /** Format string for contamination_fraction_to_filter */ + @Argument(fullName = "contamination_fraction_to_filterFormat", shortName = "", doc = "Format string for contamination_fraction_to_filter", required = false, exclusiveOf = "", validation = "") + var contamination_fraction_to_filterFormat: String = "%s" + + /** Tab-separated File containing fraction of contamination in sequencing data (per sample) to aggressively remove. Format should be \"<SampleID><TAB><Contamination>\" (Contamination is double) per line; No header. */ + @Input(fullName = "contamination_fraction_per_sample_file", shortName = "contaminationFile", doc = "Tab-separated File containing fraction of contamination in sequencing data (per sample) to aggressively remove. Format should be \"<SampleID><TAB><Contamination>\" (Contamination is double) per line; No header.", required = false, exclusiveOf = "", validation = "") + var contamination_fraction_per_sample_file: Option[File] = config("contamination_fraction_per_sample_file") + + /** Non-reference probability calculation model to employ */ + @Argument(fullName = "p_nonref_model", shortName = "pnrm", doc = "Non-reference probability calculation model to employ", required = false, exclusiveOf = "", validation = "") + var p_nonref_model: Option[String] = config("p_nonref_model") + + /** x */ + @Argument(fullName = "exactcallslog", shortName = "logExactCalls", doc = "x", required = false, exclusiveOf = "", validation = "") + var exactcallslog: Option[File] = config("exactcallslog") + + /** Specifies which type of calls we should output */ + @Argument(fullName = "output_mode", shortName = "out_mode", doc = "Specifies which type of calls we should output", required = false, exclusiveOf = "", validation = "") + var output_mode: Option[String] = config("output_mode") + + /** Annotate all sites with PLs */ + @Argument(fullName = "allSitePLs", shortName = "allSitePLs", doc = "Annotate all sites with PLs", required = false, exclusiveOf = "", validation = "") + var allSitePLs: Boolean = config("allSitePLs", default = false) + + /** Flat gap continuation penalty for use in the Pair HMM */ + @Argument(fullName = "gcpHMM", shortName = "gcpHMM", doc = "Flat gap continuation penalty for use in the Pair HMM", required = false, exclusiveOf = "", validation = "") + var gcpHMM: Option[Int] = config("gcpHMM") + + /** The PairHMM implementation to use for genotype likelihood calculations */ + @Argument(fullName = "pair_hmm_implementation", shortName = "pairHMM", doc = "The PairHMM implementation to use for genotype likelihood calculations", required = false, exclusiveOf = "", validation = "") + var pair_hmm_implementation: org.broadinstitute.gatk.utils.pairhmm.PairHMM.HMM_IMPLEMENTATION = _ + + /** The PairHMM machine-dependent sub-implementation to use for genotype likelihood calculations */ + @Argument(fullName = "pair_hmm_sub_implementation", shortName = "pairHMMSub", doc = "The PairHMM machine-dependent sub-implementation to use for genotype likelihood calculations", required = false, exclusiveOf = "", validation = "") + var pair_hmm_sub_implementation: org.broadinstitute.gatk.utils.pairhmm.PairHMM.HMM_SUB_IMPLEMENTATION = _ + + /** Load the vector logless PairHMM library each time a GATK run is initiated in the test suite */ + @Argument(fullName = "always_load_vector_logless_PairHMM_lib", shortName = "alwaysloadVectorHMM", doc = "Load the vector logless PairHMM library each time a GATK run is initiated in the test suite", required = false, exclusiveOf = "", validation = "") + var always_load_vector_logless_PairHMM_lib: Boolean = config("always_load_vector_logless_PairHMM_lib", default = false) + + /** The global assumed mismapping rate for reads */ + @Argument(fullName = "phredScaledGlobalReadMismappingRate", shortName = "globalMAPQ", doc = "The global assumed mismapping rate for reads", required = false, exclusiveOf = "", validation = "") + var phredScaledGlobalReadMismappingRate: Option[Int] = config("phredScaledGlobalReadMismappingRate") + + /** Disable the use of the FPGA HMM implementation */ + @Argument(fullName = "noFpga", shortName = "noFpga", doc = "Disable the use of the FPGA HMM implementation", required = false, exclusiveOf = "", validation = "") + var noFpga: Boolean = config("noFpga", default = false) + + /** Name of single sample to use from a multi-sample bam */ + @Argument(fullName = "sample_name", shortName = "sn", doc = "Name of single sample to use from a multi-sample bam", required = false, exclusiveOf = "", validation = "") + var sample_name: Option[String] = config("sample_name") + + /** Kmer size to use in the read threading assembler */ + @Argument(fullName = "kmerSize", shortName = "kmerSize", doc = "Kmer size to use in the read threading assembler", required = false, exclusiveOf = "", validation = "") + var kmerSize: List[Int] = config("kmerSize", default = Nil) + + /** Disable iterating over kmer sizes when graph cycles are detected */ + @Argument(fullName = "dontIncreaseKmerSizesForCycles", shortName = "dontIncreaseKmerSizesForCycles", doc = "Disable iterating over kmer sizes when graph cycles are detected", required = false, exclusiveOf = "", validation = "") + var dontIncreaseKmerSizesForCycles: Boolean = config("dontIncreaseKmerSizesForCycles", default = false) + + /** Allow graphs that have non-unique kmers in the reference */ + @Argument(fullName = "allowNonUniqueKmersInRef", shortName = "allowNonUniqueKmersInRef", doc = "Allow graphs that have non-unique kmers in the reference", required = false, exclusiveOf = "", validation = "") + var allowNonUniqueKmersInRef: Boolean = config("allowNonUniqueKmersInRef", default = false) + + /** Number of samples that must pass the minPruning threshold */ + @Argument(fullName = "numPruningSamples", shortName = "numPruningSamples", doc = "Number of samples that must pass the minPruning threshold", required = false, exclusiveOf = "", validation = "") + var numPruningSamples: Option[Int] = config("numPruningSamples") + + /** Disable dangling head and tail recovery */ + @Argument(fullName = "doNotRecoverDanglingBranches", shortName = "doNotRecoverDanglingBranches", doc = "Disable dangling head and tail recovery", required = false, exclusiveOf = "", validation = "") + var doNotRecoverDanglingBranches: Boolean = config("doNotRecoverDanglingBranches", default = false) + + /** Minimum length of a dangling branch to attempt recovery */ + @Argument(fullName = "minDanglingBranchLength", shortName = "minDanglingBranchLength", doc = "Minimum length of a dangling branch to attempt recovery", required = false, exclusiveOf = "", validation = "") + var minDanglingBranchLength: Option[Int] = config("minDanglingBranchLength") + + /** 1000G consensus mode */ + @Argument(fullName = "consensus", shortName = "consensus", doc = "1000G consensus mode", required = false, exclusiveOf = "", validation = "") + var consensus: Boolean = config("consensus", default = false) + + /** Maximum number of haplotypes to consider for your population */ + @Argument(fullName = "maxNumHaplotypesInPopulation", shortName = "maxNumHaplotypesInPopulation", doc = "Maximum number of haplotypes to consider for your population", required = false, exclusiveOf = "", validation = "") + var maxNumHaplotypesInPopulation: Option[Int] = config("maxNumHaplotypesInPopulation") + + /** Use an exploratory algorithm to error correct the kmers used during assembly */ + @Argument(fullName = "errorCorrectKmers", shortName = "errorCorrectKmers", doc = "Use an exploratory algorithm to error correct the kmers used during assembly", required = false, exclusiveOf = "", validation = "") + var errorCorrectKmers: Boolean = _ + + /** Minimum support to not prune paths in the graph */ + @Argument(fullName = "minPruning", shortName = "minPruning", doc = "Minimum support to not prune paths in the graph", required = false, exclusiveOf = "", validation = "") + var minPruning: Option[Int] = config("minPruning") + + /** Write DOT formatted graph files out of the assembler for only this graph size */ + @Argument(fullName = "debugGraphTransformations", shortName = "debugGraphTransformations", doc = "Write DOT formatted graph files out of the assembler for only this graph size", required = false, exclusiveOf = "", validation = "") + var debugGraphTransformations: Boolean = config("debugGraphTransformations", default = false) + + /** Allow cycles in the kmer graphs to generate paths with multiple copies of the path sequenece rather than just the shortest paths */ + @Argument(fullName = "allowCyclesInKmerGraphToGeneratePaths", shortName = "allowCyclesInKmerGraphToGeneratePaths", doc = "Allow cycles in the kmer graphs to generate paths with multiple copies of the path sequenece rather than just the shortest paths", required = false, exclusiveOf = "", validation = "") + var allowCyclesInKmerGraphToGeneratePaths: Boolean = config("allowCyclesInKmerGraphToGeneratePaths", default = false) + + /** Write debug assembly graph information to this file */ + @Output(fullName = "graphOutput", shortName = "graph", doc = "Write debug assembly graph information to this file", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[org.broadinstitute.gatk.queue.function.scattergather.SimpleTextGatherFunction]) + var graphOutput: File = _ + + /** Use an exploratory algorithm to error correct the kmers used during assembly */ + @Argument(fullName = "kmerLengthForReadErrorCorrection", shortName = "kmerLengthForReadErrorCorrection", doc = "Use an exploratory algorithm to error correct the kmers used during assembly", required = false, exclusiveOf = "", validation = "") + var kmerLengthForReadErrorCorrection: Option[Int] = config("kmerLengthForReadErrorCorrection") + + /** A k-mer must be seen at least these times for it considered to be solid */ + @Argument(fullName = "minObservationsForKmerToBeSolid", shortName = "minObservationsForKmerToBeSolid", doc = "A k-mer must be seen at least these times for it considered to be solid", required = false, exclusiveOf = "", validation = "") + var minObservationsForKmerToBeSolid: Option[Int] = config("minObservationsForKmerToBeSolid") + + /** GQ thresholds for reference confidence bands */ + @Argument(fullName = "GVCFGQBands", shortName = "GQB", doc = "GQ thresholds for reference confidence bands", required = false, exclusiveOf = "", validation = "") + var GVCFGQBands: List[Int] = config("GVCFGQBands", default = Nil) + + /** The size of an indel to check for in the reference model */ + @Argument(fullName = "indelSizeToEliminateInRefModel", shortName = "ERCIS", doc = "The size of an indel to check for in the reference model", required = false, exclusiveOf = "", validation = "") + var indelSizeToEliminateInRefModel: Option[Int] = config("indelSizeToEliminateInRefModel") + + /** Minimum base quality required to consider a base for calling */ + @Argument(fullName = "min_base_quality_score", shortName = "mbq", doc = "Minimum base quality required to consider a base for calling", required = false, exclusiveOf = "", validation = "") + var min_base_quality_score: Option[Int] = config("min_base_quality_score") + + /** Include unmapped reads with chromosomal coordinates */ + @Argument(fullName = "includeUmappedReads", shortName = "unmapped", doc = "Include unmapped reads with chromosomal coordinates", required = false, exclusiveOf = "", validation = "") + var includeUmappedReads: Boolean = config("includeUmappedReads", default = false) + + /** Use additional trigger on variants found in an external alleles file */ + @Argument(fullName = "useAllelesTrigger", shortName = "allelesTrigger", doc = "Use additional trigger on variants found in an external alleles file", required = false, exclusiveOf = "", validation = "") + var useAllelesTrigger: Boolean = config("useAllelesTrigger", default = false) + + /** Disable physical phasing */ + @Argument(fullName = "doNotRunPhysicalPhasing", shortName = "doNotRunPhysicalPhasing", doc = "Disable physical phasing", required = false, exclusiveOf = "", validation = "") + var doNotRunPhysicalPhasing: Boolean = config("doNotRunPhysicalPhasing", default = false) + + /** Only use reads from this read group when making calls (but use all reads to build the assembly) */ + @Argument(fullName = "keepRG", shortName = "keepRG", doc = "Only use reads from this read group when making calls (but use all reads to build the assembly)", required = false, exclusiveOf = "", validation = "") + var keepRG: Option[String] = config("keepRG") + + /** Just determine ActiveRegions, don't perform assembly or calling */ + @Argument(fullName = "justDetermineActiveRegions", shortName = "justDetermineActiveRegions", doc = "Just determine ActiveRegions, don't perform assembly or calling", required = false, exclusiveOf = "", validation = "") + var justDetermineActiveRegions: Boolean = config("justDetermineActiveRegions", default = false) + + /** Perform assembly but do not genotype variants */ + @Argument(fullName = "dontGenotype", shortName = "dontGenotype", doc = "Perform assembly but do not genotype variants", required = false, exclusiveOf = "", validation = "") + var dontGenotype: Boolean = config("dontGenotype", default = false) + + /** Do not analyze soft clipped bases in the reads */ + @Argument(fullName = "dontUseSoftClippedBases", shortName = "dontUseSoftClippedBases", doc = "Do not analyze soft clipped bases in the reads", required = false, exclusiveOf = "", validation = "") + var dontUseSoftClippedBases: Boolean = config("dontUseSoftClippedBases", default = false) + + /** Write a BAM called assemblyFailure.bam capturing all of the reads that were in the active region when the assembler failed for any reason */ + @Argument(fullName = "captureAssemblyFailureBAM", shortName = "captureAssemblyFailureBAM", doc = "Write a BAM called assemblyFailure.bam capturing all of the reads that were in the active region when the assembler failed for any reason", required = false, exclusiveOf = "", validation = "") + var captureAssemblyFailureBAM: Boolean = config("captureAssemblyFailureBAM", default = false) + + /** Use an exploratory algorithm to error correct the kmers used during assembly */ + @Argument(fullName = "errorCorrectReads", shortName = "errorCorrectReads", doc = "Use an exploratory algorithm to error correct the kmers used during assembly", required = false, exclusiveOf = "", validation = "") + var errorCorrectReads: Boolean = config("errorCorrectReads", default = false) + + /** The PCR indel model to use */ + @Argument(fullName = "pcr_indel_model", shortName = "pcrModel", doc = "The PCR indel model to use", required = false, exclusiveOf = "", validation = "") + var pcr_indel_model: Option[String] = config("pcr_indel_model") + + /** Maximum reads in an active region */ + @Argument(fullName = "maxReadsInRegionPerSample", shortName = "maxReadsInRegionPerSample", doc = "Maximum reads in an active region", required = false, exclusiveOf = "", validation = "") + var maxReadsInRegionPerSample: Option[Int] = config("maxReadsInRegionPerSample") + + /** Minimum number of reads sharing the same alignment start for each genomic location in an active region */ + @Argument(fullName = "minReadsPerAlignmentStart", shortName = "minReadsPerAlignStart", doc = "Minimum number of reads sharing the same alignment start for each genomic location in an active region", required = false, exclusiveOf = "", validation = "") + var minReadsPerAlignmentStart: Option[Int] = config("minReadsPerAlignmentStart") + + /** Output the raw activity profile results in IGV format */ + @Output(fullName = "activityProfileOut", shortName = "APO", doc = "Output the raw activity profile results in IGV format", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[org.broadinstitute.gatk.queue.function.scattergather.SimpleTextGatherFunction]) + var activityProfileOut: File = _ + + /** Output the active region to this IGV formatted file */ + @Output(fullName = "activeRegionOut", shortName = "ARO", doc = "Output the active region to this IGV formatted file", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[org.broadinstitute.gatk.queue.function.scattergather.SimpleTextGatherFunction]) + var activeRegionOut: File = _ + + /** Use this interval list file as the active regions to process */ + @Input(fullName = "activeRegionIn", shortName = "AR", doc = "Use this interval list file as the active regions to process", required = false, exclusiveOf = "", validation = "") + var activeRegionIn: Seq[File] = Nil + + /** The active region extension; if not provided defaults to Walker annotated default */ + @Argument(fullName = "activeRegionExtension", shortName = "activeRegionExtension", doc = "The active region extension; if not provided defaults to Walker annotated default", required = false, exclusiveOf = "", validation = "") + var activeRegionExtension: Option[Int] = config("activeRegionExtension") + + /** If provided, all bases will be tagged as active */ + @Argument(fullName = "forceActive", shortName = "forceActive", doc = "If provided, all bases will be tagged as active", required = false, exclusiveOf = "", validation = "") + var forceActive: Boolean = config("forceActive", default = false) + + /** The active region maximum size; if not provided defaults to Walker annotated default */ + @Argument(fullName = "activeRegionMaxSize", shortName = "activeRegionMaxSize", doc = "The active region maximum size; if not provided defaults to Walker annotated default", required = false, exclusiveOf = "", validation = "") + var activeRegionMaxSize: Option[Int] = config("activeRegionMaxSize") + + /** The sigma of the band pass filter Gaussian kernel; if not provided defaults to Walker annotated default */ + @Argument(fullName = "bandPassSigma", shortName = "bandPassSigma", doc = "The sigma of the band pass filter Gaussian kernel; if not provided defaults to Walker annotated default", required = false, exclusiveOf = "", validation = "") + var bandPassSigma: Option[Double] = config("bandPassSigma") + + /** Format string for bandPassSigma */ + @Argument(fullName = "bandPassSigmaFormat", shortName = "", doc = "Format string for bandPassSigma", required = false, exclusiveOf = "", validation = "") + var bandPassSigmaFormat: String = "%s" + + /** Region probability propagation distance beyond it's maximum size. */ + @Argument(fullName = "maxProbPropagationDistance", shortName = "maxProbPropDist", doc = "Region probability propagation distance beyond it's maximum size.", required = false, exclusiveOf = "", validation = "") + var maxProbPropagationDistance: Option[Int] = config("maxProbPropagationDistance") + + /** Threshold for the probability of a profile state being active. */ + @Argument(fullName = "activeProbabilityThreshold", shortName = "ActProbThresh", doc = "Threshold for the probability of a profile state being active.", required = false, exclusiveOf = "", validation = "") + var activeProbabilityThreshold: Option[Double] = config("activeProbabilityThreshold") + + /** Format string for activeProbabilityThreshold */ + @Argument(fullName = "activeProbabilityThresholdFormat", shortName = "", doc = "Format string for activeProbabilityThreshold", required = false, exclusiveOf = "", validation = "") + var activeProbabilityThresholdFormat: String = "%s" + + /** Minimum read mapping quality required to consider a read for analysis with the HaplotypeCaller */ + @Argument(fullName = "min_mapping_quality_score", shortName = "mmq", doc = "Minimum read mapping quality required to consider a read for analysis with the HaplotypeCaller", required = false, exclusiveOf = "", validation = "") + var min_mapping_quality_score: Option[Int] = config("min_mapping_quality_score") + + /** Filter out reads with CIGAR containing the N operator, instead of failing with an error */ + @Argument(fullName = "filter_reads_with_N_cigar", shortName = "filterRNC", doc = "Filter out reads with CIGAR containing the N operator, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_reads_with_N_cigar: Boolean = config("filter_reads_with_N_cigar", default = false) + + /** Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error */ + @Argument(fullName = "filter_mismatching_base_and_quals", shortName = "filterMBQ", doc = "Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_mismatching_base_and_quals: Boolean = config("filter_mismatching_base_and_quals", default = false) + + /** Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error */ + @Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_bases_not_stored: Boolean = config("filter_bases_not_stored", default = false) + + @Output + @Gather(enabled = false) + private var outputIndex: File = _ + + @Output + @Gather(enabled = false) + private var outputBamIndex: File = _ + + override def beforeGraph() { + super.beforeGraph() + if (out != null && !org.broadinstitute.gatk.utils.io.IOUtils.isSpecialFile(out)) + outputIndex = VcfUtils.getVcfIndexFile(out) + dbsnp.foreach(deps :+= VcfUtils.getVcfIndexFile(_)) + deps ++= comp.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => new File(orig + ".idx")) + if (bamOutput != null && !org.broadinstitute.gatk.utils.io.IOUtils.isSpecialFile(bamOutput)) + if (!disable_bam_indexing) + outputBamIndex = new File(bamOutput.getPath.stripSuffix(".bam") + ".bai") + if (bamOutput != null && !org.broadinstitute.gatk.utils.io.IOUtils.isSpecialFile(bamOutput)) + if (generate_md5) + bamOutputMD5 = new File(bamOutput.getPath + ".md5") + alleles.foreach(deps :+= VcfUtils.getVcfIndexFile(_)) + num_cpu_threads_per_data_thread = Some(getThreads) + } + + override def cmdLine = super.cmdLine + + optional("-o", out, spaceSeparated = true, escape = true, format = "%s") + + optional("-likelihoodEngine", likelihoodCalculationEngine, spaceSeparated = true, escape = true, format = "%s") + + optional("-hksr", heterogeneousKmerSizeResolution, spaceSeparated = true, escape = true, format = "%s") + + optional(TaggedFile.formatCommandLineParameter("-D", dbsnp), dbsnp, spaceSeparated = true, escape = true, format = "%s") + + conditional(dontTrimActiveRegions, "-dontTrimActiveRegions", escape = true, format = "%s") + + optional("-maxDiscARExtension", maxDiscARExtension, spaceSeparated = true, escape = true, format = "%s") + + optional("-maxGGAARExtension", maxGGAARExtension, spaceSeparated = true, escape = true, format = "%s") + + optional("-paddingAroundIndels", paddingAroundIndels, spaceSeparated = true, escape = true, format = "%s") + + optional("-paddingAroundSNPs", paddingAroundSNPs, spaceSeparated = true, escape = true, format = "%s") + + repeat("-comp", comp, formatPrefix = TaggedFile.formatCommandLineParameter, spaceSeparated = true, escape = true, format = "%s") + + repeat("-A", annotation, spaceSeparated = true, escape = true, format = "%s") + + repeat("-XA", excludeAnnotation, spaceSeparated = true, escape = true, format = "%s") + + repeat("-G", group, spaceSeparated = true, escape = true, format = "%s") + + conditional(debug, "-debug", escape = true, format = "%s") + + conditional(useFilteredReadsForAnnotations, "-useFilteredReadsForAnnotations", escape = true, format = "%s") + + optional("-ERC", emitRefConfidence, spaceSeparated = true, escape = true, format = "%s") + + optional("-bamout", bamOutput, spaceSeparated = true, escape = true, format = "%s") + + optional("-bamWriterType", bamWriterType, spaceSeparated = true, escape = true, format = "%s") + + conditional(disableOptimizations, "-disableOptimizations", escape = true, format = "%s") + + conditional(annotateNDA, "-nda", escape = true, format = "%s") + + optional("-hets", heterozygosity, spaceSeparated = true, escape = true, format = heterozygosityFormat) + + optional("-indelHeterozygosity", indel_heterozygosity, spaceSeparated = true, escape = true, format = indel_heterozygosityFormat) + + optional("-stand_call_conf", standard_min_confidence_threshold_for_calling, spaceSeparated = true, escape = true, format = standard_min_confidence_threshold_for_callingFormat) + + optional("-stand_emit_conf", standard_min_confidence_threshold_for_emitting, spaceSeparated = true, escape = true, format = standard_min_confidence_threshold_for_emittingFormat) + + optional("-maxAltAlleles", max_alternate_alleles, spaceSeparated = true, escape = true, format = "%s") + + repeat("-inputPrior", input_prior, spaceSeparated = true, escape = true, format = "%s") + + optional("-ploidy", sample_ploidy, spaceSeparated = true, escape = true, format = "%s") + + optional("-gt_mode", genotyping_mode, spaceSeparated = true, escape = true, format = "%s") + + optional(TaggedFile.formatCommandLineParameter("-alleles", alleles), alleles, spaceSeparated = true, escape = true, format = "%s") + + optional("-contamination", contamination_fraction_to_filter, spaceSeparated = true, escape = true, format = contamination_fraction_to_filterFormat) + + optional("-contaminationFile", contamination_fraction_per_sample_file, spaceSeparated = true, escape = true, format = "%s") + + optional("-pnrm", p_nonref_model, spaceSeparated = true, escape = true, format = "%s") + + optional("-logExactCalls", exactcallslog, spaceSeparated = true, escape = true, format = "%s") + + optional("-out_mode", output_mode, spaceSeparated = true, escape = true, format = "%s") + conditional(allSitePLs, "-allSitePLs", escape = true, format = "%s") + + optional("-gcpHMM", gcpHMM, spaceSeparated = true, escape = true, format = "%s") + + optional("-pairHMM", pair_hmm_implementation, spaceSeparated = true, escape = true, format = "%s") + + optional("-pairHMMSub", pair_hmm_sub_implementation, spaceSeparated = true, escape = true, format = "%s") + + conditional(always_load_vector_logless_PairHMM_lib, "-alwaysloadVectorHMM", escape = true, format = "%s") + + optional("-globalMAPQ", phredScaledGlobalReadMismappingRate, spaceSeparated = true, escape = true, format = "%s") + + conditional(noFpga, "-noFpga", escape = true, format = "%s") + optional("-sn", sample_name, spaceSeparated = true, escape = true, format = "%s") + + repeat("-kmerSize", kmerSize, spaceSeparated = true, escape = true, format = "%s") + + conditional(dontIncreaseKmerSizesForCycles, "-dontIncreaseKmerSizesForCycles", escape = true, format = "%s") + + conditional(allowNonUniqueKmersInRef, "-allowNonUniqueKmersInRef", escape = true, format = "%s") + + optional("-numPruningSamples", numPruningSamples, spaceSeparated = true, escape = true, format = "%s") + + conditional(doNotRecoverDanglingBranches, "-doNotRecoverDanglingBranches", escape = true, format = "%s") + + optional("-minDanglingBranchLength", minDanglingBranchLength, spaceSeparated = true, escape = true, format = "%s") + + conditional(consensus, "-consensus", escape = true, format = "%s") + + optional("-maxNumHaplotypesInPopulation", maxNumHaplotypesInPopulation, spaceSeparated = true, escape = true, format = "%s") + + conditional(errorCorrectKmers, "-errorCorrectKmers", escape = true, format = "%s") + + optional("-minPruning", minPruning, spaceSeparated = true, escape = true, format = "%s") + + conditional(debugGraphTransformations, "-debugGraphTransformations", escape = true, format = "%s") + + conditional(allowCyclesInKmerGraphToGeneratePaths, "-allowCyclesInKmerGraphToGeneratePaths", escape = true, format = "%s") + + optional("-graph", graphOutput, spaceSeparated = true, escape = true, format = "%s") + + optional("-kmerLengthForReadErrorCorrection", kmerLengthForReadErrorCorrection, spaceSeparated = true, escape = true, format = "%s") + + optional("-minObservationsForKmerToBeSolid", minObservationsForKmerToBeSolid, spaceSeparated = true, escape = true, format = "%s") + + repeat("-GQB", GVCFGQBands, spaceSeparated = true, escape = true, format = "%s") + + optional("-ERCIS", indelSizeToEliminateInRefModel, spaceSeparated = true, escape = true, format = "%s") + + optional("-mbq", min_base_quality_score, spaceSeparated = true, escape = true, format = "%s") + + conditional(includeUmappedReads, "-unmapped", escape = true, format = "%s") + + conditional(useAllelesTrigger, "-allelesTrigger", escape = true, format = "%s") + + conditional(doNotRunPhysicalPhasing, "-doNotRunPhysicalPhasing", escape = true, format = "%s") + + optional("-keepRG", keepRG, spaceSeparated = true, escape = true, format = "%s") + + conditional(justDetermineActiveRegions, "-justDetermineActiveRegions", escape = true, format = "%s") + + conditional(dontGenotype, "-dontGenotype", escape = true, format = "%s") + + conditional(dontUseSoftClippedBases, "-dontUseSoftClippedBases", escape = true, format = "%s") + + conditional(captureAssemblyFailureBAM, "-captureAssemblyFailureBAM", escape = true, format = "%s") + + conditional(errorCorrectReads, "-errorCorrectReads", escape = true, format = "%s") + + optional("-pcrModel", pcr_indel_model, spaceSeparated = true, escape = true, format = "%s") + + optional("-maxReadsInRegionPerSample", maxReadsInRegionPerSample, spaceSeparated = true, escape = true, format = "%s") + + optional("-minReadsPerAlignStart", minReadsPerAlignmentStart, spaceSeparated = true, escape = true, format = "%s") + + optional("-APO", activityProfileOut, spaceSeparated = true, escape = true, format = "%s") + + optional("-ARO", activeRegionOut, spaceSeparated = true, escape = true, format = "%s") + + repeat("-AR", activeRegionIn, spaceSeparated = true, escape = true, format = "%s") + + optional("-activeRegionExtension", activeRegionExtension, spaceSeparated = true, escape = true, format = "%s") + + conditional(forceActive, "-forceActive", escape = true, format = "%s") + + optional("-activeRegionMaxSize", activeRegionMaxSize, spaceSeparated = true, escape = true, format = "%s") + + optional("-bandPassSigma", bandPassSigma, spaceSeparated = true, escape = true, format = bandPassSigmaFormat) + + optional("-maxProbPropDist", maxProbPropagationDistance, spaceSeparated = true, escape = true, format = "%s") + + optional("-ActProbThresh", activeProbabilityThreshold, spaceSeparated = true, escape = true, format = activeProbabilityThresholdFormat) + + optional("-mmq", min_mapping_quality_score, spaceSeparated = true, escape = true, format = "%s") + + conditional(filter_reads_with_N_cigar, "-filterRNC", escape = true, format = "%s") + + conditional(filter_mismatching_base_and_quals, "-filterMBQ", escape = true, format = "%s") + + conditional(filter_bases_not_stored, "-filterNoBases", escape = true, format = "%s") +} + +object HaplotypeCaller { + def apply(root: Configurable, inputFiles: List[File], outputFile: File): HaplotypeCaller = { + val hc = new HaplotypeCaller(root) + hc.input_file = inputFiles + hc.out = outputFile + hc + } + + def gvcf(root: Configurable, inputFile: File, outputFile: File): HaplotypeCaller = { + val hc = apply(root, List(inputFile), outputFile) + hc.emitRefConfidence = "GVCF" + hc.variant_index_type = Some("LINEAR") + hc.variant_index_parameter = Some(hc.config("variant_index_parameter", default = 128000).asInt) + hc + } +} diff --git a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/IndelRealigner.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/IndelRealigner.scala new file mode 100644 index 0000000000000000000000000000000000000000..34b7c58f9af92fdaee68bb710fc800779984e953 --- /dev/null +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/IndelRealigner.scala @@ -0,0 +1,179 @@ +package nl.lumc.sasc.biopet.extensions.gatk.broad + +import java.io.File + +import nl.lumc.sasc.biopet.utils.config.Configurable +import org.broadinstitute.gatk.queue.extensions.gatk.TaggedFile +import nl.lumc.sasc.biopet.core.ScatterGatherableFunction +import nl.lumc.sasc.biopet.utils.VcfUtils +import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Output, _ } + +class IndelRealigner(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction { + def analysis_type = "IndelRealigner" + scatterClass = classOf[ContigScatterFunction] + setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = true } + + /** Input VCF file(s) with known indels */ + @Input(fullName = "knownAlleles", shortName = "known", doc = "Input VCF file(s) with known indels", required = false, exclusiveOf = "", validation = "") + var knownAlleles: Seq[File] = Nil + + /** Intervals file output from RealignerTargetCreator */ + @Input(fullName = "targetIntervals", shortName = "targetIntervals", doc = "Intervals file output from RealignerTargetCreator", required = true, exclusiveOf = "", validation = "") + var targetIntervals: File = _ + + /** LOD threshold above which the cleaner will clean */ + @Argument(fullName = "LODThresholdForCleaning", shortName = "LOD", doc = "LOD threshold above which the cleaner will clean", required = false, exclusiveOf = "", validation = "") + var LODThresholdForCleaning: Option[Double] = config("LODThresholdForCleaning") + + /** Format string for LODThresholdForCleaning */ + @Argument(fullName = "LODThresholdForCleaningFormat", shortName = "", doc = "Format string for LODThresholdForCleaning", required = false, exclusiveOf = "", validation = "") + var LODThresholdForCleaningFormat: String = "%s" + + /** Output bam */ + @Output(fullName = "out", shortName = "o", doc = "Output bam", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[BamGatherFunction]) + var out: File = _ + + /** Automatically generated md5 for out */ + @Output(fullName = "outMD5", shortName = "", doc = "Automatically generated md5 for out", required = false, exclusiveOf = "", validation = "") + @Gather(enabled = false) + private var outMD5: File = _ + + /** Determines how to compute the possible alternate consenses */ + @Argument(fullName = "consensusDeterminationModel", shortName = "model", doc = "Determines how to compute the possible alternate consenses", required = false, exclusiveOf = "", validation = "") + var consensusDeterminationModel: Option[String] = config("consensusDeterminationModel") + + /** Percentage of mismatches at a locus to be considered having high entropy (0.0 < entropy <= 1.0) */ + @Argument(fullName = "entropyThreshold", shortName = "entropy", doc = "Percentage of mismatches at a locus to be considered having high entropy (0.0 < entropy <= 1.0)", required = false, exclusiveOf = "", validation = "") + var entropyThreshold: Option[Double] = config("entropyThreshold") + + /** Format string for entropyThreshold */ + @Argument(fullName = "entropyThresholdFormat", shortName = "", doc = "Format string for entropyThreshold", required = false, exclusiveOf = "", validation = "") + var entropyThresholdFormat: String = "%s" + + /** max reads allowed to be kept in memory at a time by the SAMFileWriter */ + @Argument(fullName = "maxReadsInMemory", shortName = "maxInMemory", doc = "max reads allowed to be kept in memory at a time by the SAMFileWriter", required = false, exclusiveOf = "", validation = "") + var maxReadsInMemory: Option[Int] = config("maxReadsInMemory") + + /** maximum insert size of read pairs that we attempt to realign */ + @Argument(fullName = "maxIsizeForMovement", shortName = "maxIsize", doc = "maximum insert size of read pairs that we attempt to realign", required = false, exclusiveOf = "", validation = "") + var maxIsizeForMovement: Option[Int] = config("maxIsizeForMovement") + + /** Maximum positional move in basepairs that a read can be adjusted during realignment */ + @Argument(fullName = "maxPositionalMoveAllowed", shortName = "maxPosMove", doc = "Maximum positional move in basepairs that a read can be adjusted during realignment", required = false, exclusiveOf = "", validation = "") + var maxPositionalMoveAllowed: Option[Int] = config("maxPositionalMoveAllowed") + + /** Max alternate consensuses to try (necessary to improve performance in deep coverage) */ + @Argument(fullName = "maxConsensuses", shortName = "maxConsensuses", doc = "Max alternate consensuses to try (necessary to improve performance in deep coverage)", required = false, exclusiveOf = "", validation = "") + var maxConsensuses: Option[Int] = config("maxConsensuses") + + /** Max reads used for finding the alternate consensuses (necessary to improve performance in deep coverage) */ + @Argument(fullName = "maxReadsForConsensuses", shortName = "greedy", doc = "Max reads used for finding the alternate consensuses (necessary to improve performance in deep coverage)", required = false, exclusiveOf = "", validation = "") + var maxReadsForConsensuses: Option[Int] = config("maxReadsForConsensuses") + + /** Max reads allowed at an interval for realignment */ + @Argument(fullName = "maxReadsForRealignment", shortName = "maxReads", doc = "Max reads allowed at an interval for realignment", required = false, exclusiveOf = "", validation = "") + var maxReadsForRealignment: Option[Int] = config("maxReadsForRealignment") + + /** Don't output the original cigar or alignment start tags for each realigned read in the output bam */ + @Argument(fullName = "noOriginalAlignmentTags", shortName = "noTags", doc = "Don't output the original cigar or alignment start tags for each realigned read in the output bam", required = false, exclusiveOf = "", validation = "") + var noOriginalAlignmentTags: Boolean = config("noOriginalAlignmentTags", default = false) + + /** Generate one output file for each input (-I) bam file (not compatible with -output) */ + @Argument(fullName = "nWayOut", shortName = "nWayOut", doc = "Generate one output file for each input (-I) bam file (not compatible with -output)", required = false, exclusiveOf = "", validation = "") + var nWayOut: Option[String] = config("nWayOut") + + /** Generate md5sums for BAMs */ + @Argument(fullName = "generate_nWayOut_md5s", shortName = "", doc = "Generate md5sums for BAMs", required = false, exclusiveOf = "", validation = "") + var generate_nWayOut_md5s: Boolean = config("generate_nWayOut_md5s", default = false) + + /** Do early check of reads against existing consensuses */ + @Argument(fullName = "check_early", shortName = "check_early", doc = "Do early check of reads against existing consensuses", required = false, exclusiveOf = "", validation = "") + var check_early: Boolean = config("check_early", default = false) + + /** Don't output the usual PG tag in the realigned bam file header. FOR DEBUGGING PURPOSES ONLY. This option is required in order to pass integration tests. */ + @Argument(fullName = "noPGTag", shortName = "noPG", doc = "Don't output the usual PG tag in the realigned bam file header. FOR DEBUGGING PURPOSES ONLY. This option is required in order to pass integration tests.", required = false, exclusiveOf = "", validation = "") + var noPGTag: Boolean = config("noPGTag", default = false) + + /** Keep older PG tags left in the bam header by previous runs of this tool (by default, all these historical tags will be replaced by the latest tag generated in the current run). */ + @Argument(fullName = "keepPGTags", shortName = "keepPG", doc = "Keep older PG tags left in the bam header by previous runs of this tool (by default, all these historical tags will be replaced by the latest tag generated in the current run).", required = false, exclusiveOf = "", validation = "") + var keepPGTags: Boolean = config("keepPGTags", default = false) + + /** Output file (text) for the indels found; FOR DEBUGGING PURPOSES ONLY */ + @Output(fullName = "indelsFileForDebugging", shortName = "indels", doc = "Output file (text) for the indels found; FOR DEBUGGING PURPOSES ONLY", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[org.broadinstitute.gatk.queue.function.scattergather.SimpleTextGatherFunction]) + var indelsFileForDebugging: File = _ + + /** print out statistics (what does or doesn't get cleaned); FOR DEBUGGING PURPOSES ONLY */ + @Output(fullName = "statisticsFileForDebugging", shortName = "stats", doc = "print out statistics (what does or doesn't get cleaned); FOR DEBUGGING PURPOSES ONLY", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[org.broadinstitute.gatk.queue.function.scattergather.SimpleTextGatherFunction]) + var statisticsFileForDebugging: File = _ + + /** print out whether mismatching columns do or don't get cleaned out; FOR DEBUGGING PURPOSES ONLY */ + @Output(fullName = "SNPsFileForDebugging", shortName = "snps", doc = "print out whether mismatching columns do or don't get cleaned out; FOR DEBUGGING PURPOSES ONLY", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[org.broadinstitute.gatk.queue.function.scattergather.SimpleTextGatherFunction]) + var SNPsFileForDebugging: File = _ + + /** Filter out reads with CIGAR containing the N operator, instead of failing with an error */ + @Argument(fullName = "filter_reads_with_N_cigar", shortName = "filterRNC", doc = "Filter out reads with CIGAR containing the N operator, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_reads_with_N_cigar: Boolean = config("filter_reads_with_N_cigar", default = false) + + /** Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error */ + @Argument(fullName = "filter_mismatching_base_and_quals", shortName = "filterMBQ", doc = "Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_mismatching_base_and_quals: Boolean = config("filter_mismatching_base_and_quals", default = false) + + /** Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error */ + @Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_bases_not_stored: Boolean = config("filter_bases_not_stored", default = false) + + @Output + @Gather(enabled = false) + private var outputIndex: File = _ + + override def beforeGraph() { + super.beforeGraph() + deps ++= knownAlleles.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig)) + if (out != null && !org.broadinstitute.gatk.utils.io.IOUtils.isSpecialFile(out)) + if (!disable_bam_indexing) + outputIndex = new File(out.getPath.stripSuffix(".bam") + ".bai") + if (out != null && !org.broadinstitute.gatk.utils.io.IOUtils.isSpecialFile(out)) + if (generate_md5) + outMD5 = new File(out.getPath + ".md5") + } + + override def cmdLine = super.cmdLine + + repeat("-known", knownAlleles, formatPrefix = TaggedFile.formatCommandLineParameter, spaceSeparated = true, escape = true, format = "%s") + + required("-targetIntervals", targetIntervals, spaceSeparated = true, escape = true, format = "%s") + + optional("-LOD", LODThresholdForCleaning, spaceSeparated = true, escape = true, format = LODThresholdForCleaningFormat) + + optional("-o", out, spaceSeparated = true, escape = true, format = "%s") + + optional("-model", consensusDeterminationModel, spaceSeparated = true, escape = true, format = "%s") + + optional("-entropy", entropyThreshold, spaceSeparated = true, escape = true, format = entropyThresholdFormat) + + optional("-maxInMemory", maxReadsInMemory, spaceSeparated = true, escape = true, format = "%s") + + optional("-maxIsize", maxIsizeForMovement, spaceSeparated = true, escape = true, format = "%s") + + optional("-maxPosMove", maxPositionalMoveAllowed, spaceSeparated = true, escape = true, format = "%s") + + optional("-maxConsensuses", maxConsensuses, spaceSeparated = true, escape = true, format = "%s") + + optional("-greedy", maxReadsForConsensuses, spaceSeparated = true, escape = true, format = "%s") + + optional("-maxReads", maxReadsForRealignment, spaceSeparated = true, escape = true, format = "%s") + + conditional(noOriginalAlignmentTags, "-noTags", escape = true, format = "%s") + + optional("-nWayOut", nWayOut, spaceSeparated = true, escape = true, format = "%s") + + conditional(generate_nWayOut_md5s, "--generate_nWayOut_md5s", escape = true, format = "%s") + + conditional(check_early, "-check_early", escape = true, format = "%s") + + conditional(noPGTag, "-noPG", escape = true, format = "%s") + + conditional(keepPGTags, "-keepPG", escape = true, format = "%s") + + optional("-indels", indelsFileForDebugging, spaceSeparated = true, escape = true, format = "%s") + + optional("-stats", statisticsFileForDebugging, spaceSeparated = true, escape = true, format = "%s") + + optional("-snps", SNPsFileForDebugging, spaceSeparated = true, escape = true, format = "%s") + + conditional(filter_reads_with_N_cigar, "-filterRNC", escape = true, format = "%s") + + conditional(filter_mismatching_base_and_quals, "-filterMBQ", escape = true, format = "%s") + + conditional(filter_bases_not_stored, "-filterNoBases", escape = true, format = "%s") +} + +object IndelRealigner { + def apply(root: Configurable, input: File, targetIntervals: File, outputDir: File): IndelRealigner = { + val ir = new IndelRealigner(root) + ir.input_file :+= input + ir.targetIntervals = targetIntervals + ir.out = new File(outputDir, input.getName.stripSuffix(".bam") + ".realign.bam") + ir + } +} diff --git a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/LocusScatterFunction.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/LocusScatterFunction.scala new file mode 100644 index 0000000000000000000000000000000000000000..853d185b37d7cb1838b2c3f2928a91cdb8b82548 --- /dev/null +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/LocusScatterFunction.scala @@ -0,0 +1,18 @@ +package nl.lumc.sasc.biopet.extensions.gatk.broad + +import collection.JavaConversions._ +import org.broadinstitute.gatk.utils.interval.IntervalUtils +import org.broadinstitute.gatk.queue.function.InProcessFunction + +/** + * A scatter function that divides down to the locus level. + */ +class LocusScatterFunction extends GATKScatterFunction with InProcessFunction { + protected override def maxIntervals = scatterCount + + def run() { + val gi = GATKScatterFunction.getGATKIntervals(this.originalGATK) + val splits = IntervalUtils.splitLocusIntervals(gi.locs, this.scatterOutputFiles.size) + IntervalUtils.scatterFixedIntervals(gi.samFileHeader, splits, this.scatterOutputFiles) + } +} \ No newline at end of file diff --git a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/PrintReads.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/PrintReads.scala new file mode 100644 index 0000000000000000000000000000000000000000..9f18533cf8f78dcf9ebc8f3749112db9e6d6bd4f --- /dev/null +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/PrintReads.scala @@ -0,0 +1,98 @@ +package nl.lumc.sasc.biopet.extensions.gatk.broad + +import java.io.File + +import nl.lumc.sasc.biopet.utils.config.Configurable +import nl.lumc.sasc.biopet.core.ScatterGatherableFunction +import org.broadinstitute.gatk.utils.commandline._ + +class PrintReads(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction { + def analysis_type = "PrintReads" + scatterClass = classOf[ContigScatterFunction] + setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = true } + + /** Write output to this BAM filename instead of STDOUT */ + @Output(fullName = "out", shortName = "o", doc = "Write output to this BAM filename instead of STDOUT", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[BamGatherFunction]) + var out: File = _ + + /** Exclude all reads with this read group from the output */ + @Argument(fullName = "readGroup", shortName = "readGroup", doc = "Exclude all reads with this read group from the output", required = false, exclusiveOf = "", validation = "") + var readGroup: Option[String] = config("readGroup", default = false) + + /** Exclude all reads with this platform from the output */ + @Argument(fullName = "platform", shortName = "platform", doc = "Exclude all reads with this platform from the output", required = false, exclusiveOf = "", validation = "") + var platform: Option[String] = config("platform") + + /** Print the first n reads from the file, discarding the rest */ + @Argument(fullName = "number", shortName = "n", doc = "Print the first n reads from the file, discarding the rest", required = false, exclusiveOf = "", validation = "") + var number: Option[Int] = config("number") + + /** File containing a list of samples (one per line). Can be specified multiple times */ + @Argument(fullName = "sample_file", shortName = "sf", doc = "File containing a list of samples (one per line). Can be specified multiple times", required = false, exclusiveOf = "", validation = "") + var sample_file: List[File] = config("sample_file", default = Nil) + + /** Sample name to be included in the analysis. Can be specified multiple times. */ + @Argument(fullName = "sample_name", shortName = "sn", doc = "Sample name to be included in the analysis. Can be specified multiple times.", required = false, exclusiveOf = "", validation = "") + var sample_name: List[String] = config("sample_name", default = Nil) + + /** Simplify all reads */ + @Argument(fullName = "simplify", shortName = "s", doc = "Simplify all reads", required = false, exclusiveOf = "", validation = "") + var simplify: Boolean = config("simplify", default = false) + + /** Don't output a program tag */ + @Argument(fullName = "no_pg_tag", shortName = "npt", doc = "Don't output a program tag", required = false, exclusiveOf = "", validation = "") + var no_pg_tag: Boolean = config("no_pg_tag", default = false) + + /** Filter out reads with CIGAR containing the N operator, instead of failing with an error */ + @Argument(fullName = "filter_reads_with_N_cigar", shortName = "filterRNC", doc = "Filter out reads with CIGAR containing the N operator, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_reads_with_N_cigar: Boolean = config("filter_reads_with_N_cigar", default = false) + + /** Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error */ + @Argument(fullName = "filter_mismatching_base_and_quals", shortName = "filterMBQ", doc = "Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_mismatching_base_and_quals: Boolean = config("filter_mismatching_base_and_quals", default = false) + + /** Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error */ + @Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_bases_not_stored: Boolean = config("filter_bases_not_stored", default = false) + + @Output + @Gather(enabled = false) + private var outputIndex: File = _ + + @Output + @Gather(enabled = false) + private var outputMd5: File = _ + + override def beforeGraph() { + super.beforeGraph() + if (out != null && !org.broadinstitute.gatk.utils.io.IOUtils.isSpecialFile(out)) + if (!disable_bam_indexing) + outputIndex = new File(out.getPath.stripSuffix(".bam") + ".bai") + if (out != null && !org.broadinstitute.gatk.utils.io.IOUtils.isSpecialFile(out)) + if (generate_md5) + outputMd5 = new File(out.getPath + ".md5") + } + + override def cmdLine = super.cmdLine + + optional("-o", out, spaceSeparated = true, escape = true, format = "%s") + + optional("-readGroup", readGroup, spaceSeparated = true, escape = true, format = "%s") + + optional("-platform", platform, spaceSeparated = true, escape = true, format = "%s") + + optional("-n", number, spaceSeparated = true, escape = true, format = "%s") + + repeat("-sf", sample_file, spaceSeparated = true, escape = true, format = "%s") + + repeat("-sn", sample_name, spaceSeparated = true, escape = true, format = "%s") + + conditional(simplify, "-s", escape = true, format = "%s") + + conditional(no_pg_tag, "-npt", escape = true, format = "%s") + + conditional(filter_reads_with_N_cigar, "-filterRNC", escape = true, format = "%s") + + conditional(filter_mismatching_base_and_quals, "-filterMBQ", escape = true, format = "%s") + + conditional(filter_bases_not_stored, "-filterNoBases", escape = true, format = "%s") +} + +object PrintReads { + def apply(root: Configurable, input: File, output: File): PrintReads = { + val br = new PrintReads(root) + br.input_file :+= input + br.out = output + br + } +} diff --git a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/RealignerTargetCreator.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/RealignerTargetCreator.scala new file mode 100644 index 0000000000000000000000000000000000000000..383e74fbf0e4055c2fb5ec296b5a4ccaf72ead39 --- /dev/null +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/RealignerTargetCreator.scala @@ -0,0 +1,83 @@ +package nl.lumc.sasc.biopet.extensions.gatk.broad + +import java.io.File + +import nl.lumc.sasc.biopet.utils.config.Configurable +import org.broadinstitute.gatk.queue.extensions.gatk.{ TaggedFile } +import nl.lumc.sasc.biopet.core.ScatterGatherableFunction +import nl.lumc.sasc.biopet.utils.VcfUtils +import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Input, _ } + +class RealignerTargetCreator(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction { + def analysis_type = "RealignerTargetCreator" + scatterClass = classOf[LocusScatterFunction] + setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = false } + + /** An output file created by the walker. Will overwrite contents if file exists */ + @Output(fullName = "out", shortName = "o", doc = "An output file created by the walker. Will overwrite contents if file exists", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[org.broadinstitute.gatk.queue.function.scattergather.SimpleTextGatherFunction]) + var out: File = _ + + /** Input VCF file with known indels */ + @Input(fullName = "known", shortName = "known", doc = "Input VCF file with known indels", required = false, exclusiveOf = "", validation = "") + var known: List[File] = config("known", default = Nil) + + /** window size for calculating entropy or SNP clusters */ + @Argument(fullName = "windowSize", shortName = "window", doc = "window size for calculating entropy or SNP clusters", required = false, exclusiveOf = "", validation = "") + var windowSize: Option[Int] = config("windowSize") + + /** fraction of base qualities needing to mismatch for a position to have high entropy */ + @Argument(fullName = "mismatchFraction", shortName = "mismatch", doc = "fraction of base qualities needing to mismatch for a position to have high entropy", required = false, exclusiveOf = "", validation = "") + var mismatchFraction: Option[Double] = config("mismatchFraction") + + /** Format string for mismatchFraction */ + @Argument(fullName = "mismatchFractionFormat", shortName = "", doc = "Format string for mismatchFraction", required = false, exclusiveOf = "", validation = "") + var mismatchFractionFormat: String = "%s" + + /** minimum reads at a locus to enable using the entropy calculation */ + @Argument(fullName = "minReadsAtLocus", shortName = "minReads", doc = "minimum reads at a locus to enable using the entropy calculation", required = false, exclusiveOf = "", validation = "") + var minReadsAtLocus: Option[Int] = config("minReadsAtLocus") + + /** maximum interval size; any intervals larger than this value will be dropped */ + @Argument(fullName = "maxIntervalSize", shortName = "maxInterval", doc = "maximum interval size; any intervals larger than this value will be dropped", required = false, exclusiveOf = "", validation = "") + var maxIntervalSize: Option[Int] = config("maxIntervalSize") + + /** Filter out reads with CIGAR containing the N operator, instead of failing with an error */ + @Argument(fullName = "filter_reads_with_N_cigar", shortName = "filterRNC", doc = "Filter out reads with CIGAR containing the N operator, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_reads_with_N_cigar: Boolean = config("filter_reads_with_N_cigar", default = false) + + /** Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error */ + @Argument(fullName = "filter_mismatching_base_and_quals", shortName = "filterMBQ", doc = "Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_mismatching_base_and_quals: Boolean = config("filter_mismatching_base_and_quals", default = false) + + /** Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error */ + @Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_bases_not_stored: Boolean = config("", default = false) + + if (config.contains("dbsnp")) known :+= new File(config("dbsnp").asString) + + override def beforeGraph() { + super.beforeGraph() + deps ++= known.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig)) + } + + override def cmdLine = super.cmdLine + + optional("-o", out, spaceSeparated = true, escape = true, format = "%s") + + repeat("-known", known, formatPrefix = TaggedFile.formatCommandLineParameter, spaceSeparated = true, escape = true, format = "%s") + + optional("-window", windowSize, spaceSeparated = true, escape = true, format = "%s") + + optional("-mismatch", mismatchFraction, spaceSeparated = true, escape = true, format = mismatchFractionFormat) + + optional("-minReads", minReadsAtLocus, spaceSeparated = true, escape = true, format = "%s") + + optional("-maxInterval", maxIntervalSize, spaceSeparated = true, escape = true, format = "%s") + + conditional(filter_reads_with_N_cigar, "-filterRNC", escape = true, format = "%s") + + conditional(filter_mismatching_base_and_quals, "-filterMBQ", escape = true, format = "%s") + + conditional(filter_bases_not_stored, "-filterNoBases", escape = true, format = "%s") +} + +object RealignerTargetCreator { + def apply(root: Configurable, input: File, outputDir: File): RealignerTargetCreator = { + val re = new RealignerTargetCreator(root) + re.input_file :+= input + re.out = new File(outputDir, input.getName.stripSuffix(".bam") + ".realign.intervals") + re + } +} diff --git a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/SelectVariants.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/SelectVariants.scala new file mode 100644 index 0000000000000000000000000000000000000000..dd49dd75da5fb6d91f5cc0826338796799a198c3 --- /dev/null +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/SelectVariants.scala @@ -0,0 +1,262 @@ +package nl.lumc.sasc.biopet.extensions.gatk.broad + +import java.io.File + +import nl.lumc.sasc.biopet.utils.config.Configurable +import org.broadinstitute.gatk.queue.extensions.gatk.TaggedFile +import nl.lumc.sasc.biopet.core.ScatterGatherableFunction +import nl.lumc.sasc.biopet.utils.VcfUtils +import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Output, _ } + +class SelectVariants(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction { + def analysis_type = "SelectVariants" + scatterClass = classOf[LocusScatterFunction] + setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = false } + + /** Input VCF file */ + @Input(fullName = "variant", shortName = "V", doc = "Input VCF file", required = true, exclusiveOf = "", validation = "") + var variant: File = _ + + /** Output variants not called in this comparison track */ + @Input(fullName = "discordance", shortName = "disc", doc = "Output variants not called in this comparison track", required = false, exclusiveOf = "", validation = "") + var discordance: Option[File] = None + + /** Output variants also called in this comparison track */ + @Input(fullName = "concordance", shortName = "conc", doc = "Output variants also called in this comparison track", required = false, exclusiveOf = "", validation = "") + var concordance: Option[File] = None + + /** File to which variants should be written */ + @Output(fullName = "out", shortName = "o", doc = "File to which variants should be written", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[CatVariantsGatherer]) + var out: File = _ + + /** Include genotypes from this sample */ + @Argument(fullName = "sample_name", shortName = "sn", doc = "Include genotypes from this sample", required = false, exclusiveOf = "", validation = "") + var sample_name: List[String] = config("sample_name", default = Nil) + + /** Regular expression to select multiple samples */ + @Argument(fullName = "sample_expressions", shortName = "se", doc = "Regular expression to select multiple samples", required = false, exclusiveOf = "", validation = "") + var sample_expressions: List[String] = config("sample_expressions", default = Nil) + + /** File containing a list of samples to include */ + @Input(fullName = "sample_file", shortName = "sf", doc = "File containing a list of samples to include", required = false, exclusiveOf = "", validation = "") + var sample_file: List[File] = config("sample_file", default = Nil) + + /** Exclude genotypes from this sample */ + @Argument(fullName = "exclude_sample_name", shortName = "xl_sn", doc = "Exclude genotypes from this sample", required = false, exclusiveOf = "", validation = "") + var exclude_sample_name: List[String] = config("exclude_sample_name", default = Nil) + + /** List of samples to exclude */ + @Input(fullName = "exclude_sample_file", shortName = "xl_sf", doc = "List of samples to exclude", required = false, exclusiveOf = "", validation = "") + var exclude_sample_file: List[File] = config("exclude_sample_file", default = Nil) + + /** List of sample expressions to exclude */ + @Input(fullName = "exclude_sample_expressions", shortName = "xl_se", doc = "List of sample expressions to exclude", required = false, exclusiveOf = "", validation = "") + var exclude_sample_expressions: List[File] = config("exclude_sample_expressions", default = Nil) + + /** One or more criteria to use when selecting the data */ + @Argument(fullName = "selectexpressions", shortName = "select", doc = "One or more criteria to use when selecting the data", required = false, exclusiveOf = "", validation = "") + var selectexpressions: List[String] = config("selectexpressions", default = Nil) + + /** Invert the selection criteria for -select */ + @Argument(fullName = "invertselect", shortName = "invertSelect", doc = "Invert the selection criteria for -select", required = false, exclusiveOf = "", validation = "") + var invertselect: Boolean = config("invertselect", default = false) + + /** Don't include non-variant sites */ + @Argument(fullName = "excludeNonVariants", shortName = "env", doc = "Don't include non-variant sites", required = false, exclusiveOf = "", validation = "") + var excludeNonVariants: Boolean = config("excludeNonVariants", default = false) + + /** Don't include filtered sites */ + @Argument(fullName = "excludeFiltered", shortName = "ef", doc = "Don't include filtered sites", required = false, exclusiveOf = "", validation = "") + var excludeFiltered: Boolean = config("excludeFiltered", default = false) + + /** Preserve original alleles, do not trim */ + @Argument(fullName = "preserveAlleles", shortName = "noTrim", doc = "Preserve original alleles, do not trim", required = false, exclusiveOf = "", validation = "") + var preserveAlleles: Boolean = config("preserveAlleles", default = false) + + /** Remove alternate alleles not present in any genotypes */ + @Argument(fullName = "removeUnusedAlternates", shortName = "trimAlternates", doc = "Remove alternate alleles not present in any genotypes", required = false, exclusiveOf = "", validation = "") + var removeUnusedAlternates: Boolean = config("removeUnusedAlternates", default = false) + + /** Select only variants of a particular allelicity */ + @Argument(fullName = "restrictAllelesTo", shortName = "restrictAllelesTo", doc = "Select only variants of a particular allelicity", required = false, exclusiveOf = "", validation = "") + var restrictAllelesTo: Option[String] = config("restrictAllelesTo") + + /** Store the original AC, AF, and AN values after subsetting */ + @Argument(fullName = "keepOriginalAC", shortName = "keepOriginalAC", doc = "Store the original AC, AF, and AN values after subsetting", required = false, exclusiveOf = "", validation = "") + var keepOriginalAC: Boolean = config("keepOriginalAC", default = false) + + /** Store the original DP value after subsetting */ + @Argument(fullName = "keepOriginalDP", shortName = "keepOriginalDP", doc = "Store the original DP value after subsetting", required = false, exclusiveOf = "", validation = "") + var keepOriginalDP: Boolean = config("keepOriginalDP", default = false) + + /** Output mendelian violation sites only */ + @Argument(fullName = "mendelianViolation", shortName = "mv", doc = "Output mendelian violation sites only", required = false, exclusiveOf = "", validation = "") + var mendelianViolation: Boolean = config("mendelianViolation", default = false) + + /** Output non-mendelian violation sites only */ + @Argument(fullName = "invertMendelianViolation", shortName = "invMv", doc = "Output non-mendelian violation sites only", required = false, exclusiveOf = "", validation = "") + var invertMendelianViolation: Boolean = config("invertMendelianViolation", default = false) + + /** Minimum GQ score for each trio member to accept a site as a violation */ + @Argument(fullName = "mendelianViolationQualThreshold", shortName = "mvq", doc = "Minimum GQ score for each trio member to accept a site as a violation", required = false, exclusiveOf = "", validation = "") + var mendelianViolationQualThreshold: Option[Double] = config("mendelianViolationQualThreshold") + + /** Format string for mendelianViolationQualThreshold */ + @Argument(fullName = "mendelianViolationQualThresholdFormat", shortName = "", doc = "Format string for mendelianViolationQualThreshold", required = false, exclusiveOf = "", validation = "") + var mendelianViolationQualThresholdFormat: String = "%s" + + /** Select a fraction of variants at random from the input */ + @Argument(fullName = "select_random_fraction", shortName = "fraction", doc = "Select a fraction of variants at random from the input", required = false, exclusiveOf = "", validation = "") + var select_random_fraction: Option[Double] = config("select_random_fraction") + + /** Format string for select_random_fraction */ + @Argument(fullName = "select_random_fractionFormat", shortName = "", doc = "Format string for select_random_fraction", required = false, exclusiveOf = "", validation = "") + var select_random_fractionFormat: String = "%s" + + /** Select a fraction of genotypes at random from the input and sets them to no-call */ + @Argument(fullName = "remove_fraction_genotypes", shortName = "fractionGenotypes", doc = "Select a fraction of genotypes at random from the input and sets them to no-call", required = false, exclusiveOf = "", validation = "") + var remove_fraction_genotypes: Option[Double] = config("remove_fraction_genotypes") + + /** Format string for remove_fraction_genotypes */ + @Argument(fullName = "remove_fraction_genotypesFormat", shortName = "", doc = "Format string for remove_fraction_genotypes", required = false, exclusiveOf = "", validation = "") + var remove_fraction_genotypesFormat: String = "%s" + + /** Select only a certain type of variants from the input file */ + @Argument(fullName = "selectTypeToInclude", shortName = "selectType", doc = "Select only a certain type of variants from the input file", required = false, exclusiveOf = "", validation = "") + var selectTypeToInclude: List[String] = config("selectTypeToInclude", default = Nil) + + /** Do not select certain type of variants from the input file */ + @Argument(fullName = "selectTypeToExclude", shortName = "xlSelectType", doc = "Do not select certain type of variants from the input file", required = false, exclusiveOf = "", validation = "") + var selectTypeToExclude: Seq[String] = config("selectTypeToExclude", default = Nil) + + /** List of variant IDs to select */ + @Input(fullName = "keepIDs", shortName = "IDs", doc = "List of variant IDs to select", required = false, exclusiveOf = "", validation = "") + var keepIDs: Option[File] = config("keepIDs") + + /** List of variant IDs to select */ + @Argument(fullName = "excludeIDs", shortName = "xlIDs", doc = "List of variant IDs to select", required = false, exclusiveOf = "", validation = "") + var excludeIDs: Option[File] = config("excludeIDs") + + /** If true, the incoming VariantContext will be fully decoded */ + @Argument(fullName = "fullyDecode", shortName = "", doc = "If true, the incoming VariantContext will be fully decoded", required = false, exclusiveOf = "", validation = "") + var fullyDecode: Boolean = config("fullyDecode", default = false) + + /** If true, we won't actually write the output file. For efficiency testing only */ + @Argument(fullName = "justRead", shortName = "", doc = "If true, we won't actually write the output file. For efficiency testing only", required = false, exclusiveOf = "", validation = "") + var justRead: Boolean = config("justRead", default = false) + + /** Maximum size of indels to include */ + @Argument(fullName = "maxIndelSize", shortName = "", doc = "Maximum size of indels to include", required = false, exclusiveOf = "", validation = "") + var maxIndelSize: Option[Int] = config("maxIndelSize") + + /** Minimum size of indels to include */ + @Argument(fullName = "minIndelSize", shortName = "", doc = "Minimum size of indels to include", required = false, exclusiveOf = "", validation = "") + var minIndelSize: Option[Int] = config("minIndelSize") + + /** Maximum number of samples filtered at the genotype level */ + @Argument(fullName = "maxFilteredGenotypes", shortName = "", doc = "Maximum number of samples filtered at the genotype level", required = false, exclusiveOf = "", validation = "") + var maxFilteredGenotypes: Option[Int] = config("maxFilteredGenotypes") + + /** Minimum number of samples filtered at the genotype level */ + @Argument(fullName = "minFilteredGenotypes", shortName = "", doc = "Minimum number of samples filtered at the genotype level", required = false, exclusiveOf = "", validation = "") + var minFilteredGenotypes: Option[Int] = config("minFilteredGenotypes") + + /** Maximum fraction of samples filtered at the genotype level */ + @Argument(fullName = "maxFractionFilteredGenotypes", shortName = "", doc = "Maximum fraction of samples filtered at the genotype level", required = false, exclusiveOf = "", validation = "") + var maxFractionFilteredGenotypes: Option[Double] = config("maxFractionFilteredGenotypes") + + /** Format string for maxFractionFilteredGenotypes */ + @Argument(fullName = "maxFractionFilteredGenotypesFormat", shortName = "", doc = "Format string for maxFractionFilteredGenotypes", required = false, exclusiveOf = "", validation = "") + var maxFractionFilteredGenotypesFormat: String = "%s" + + /** Maximum fraction of samples filtered at the genotype level */ + @Argument(fullName = "minFractionFilteredGenotypes", shortName = "", doc = "Maximum fraction of samples filtered at the genotype level", required = false, exclusiveOf = "", validation = "") + var minFractionFilteredGenotypes: Option[Double] = config("minFractionFilteredGenotypes") + + /** Format string for minFractionFilteredGenotypes */ + @Argument(fullName = "minFractionFilteredGenotypesFormat", shortName = "", doc = "Format string for minFractionFilteredGenotypes", required = false, exclusiveOf = "", validation = "") + var minFractionFilteredGenotypesFormat: String = "%s" + + /** Set filtered genotypes to no-call */ + @Argument(fullName = "setFilteredGtToNocall", shortName = "", doc = "Set filtered genotypes to no-call", required = false, exclusiveOf = "", validation = "") + var setFilteredGtToNocall: Boolean = config("setFilteredGtToNocall", default = false) + + /** Allow samples other than those in the VCF to be specified on the command line. These samples will be ignored. */ + @Argument(fullName = "ALLOW_NONOVERLAPPING_COMMAND_LINE_SAMPLES", shortName = "", doc = "Allow samples other than those in the VCF to be specified on the command line. These samples will be ignored.", required = false, exclusiveOf = "", validation = "") + var ALLOW_NONOVERLAPPING_COMMAND_LINE_SAMPLES: Boolean = config("ALLOW_NONOVERLAPPING_COMMAND_LINE_SAMPLES", default = false) + + /** Forces output VCF to be compliant to up-to-date version */ + @Argument(fullName = "forceValidOutput", shortName = "", doc = "Forces output VCF to be compliant to up-to-date version", required = false, exclusiveOf = "", validation = "") + var forceValidOutput: Boolean = config("forceValidOutput", default = false) + + /** Filter out reads with CIGAR containing the N operator, instead of failing with an error */ + @Argument(fullName = "filter_reads_with_N_cigar", shortName = "filterRNC", doc = "Filter out reads with CIGAR containing the N operator, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_reads_with_N_cigar: Boolean = config("filter_reads_with_N_cigar", default = false) + + /** Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error */ + @Argument(fullName = "filter_mismatching_base_and_quals", shortName = "filterMBQ", doc = "Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_mismatching_base_and_quals: Boolean = config("filter_mismatching_base_and_quals", default = false) + + /** Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error */ + @Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_bases_not_stored: Boolean = config("filter_bases_not_stored", default = false) + + @Output + @Gather(enabled = false) + private var outputIndex: File = _ + + override def beforeGraph() { + super.beforeGraph() + if (variant != null) + deps :+= VcfUtils.getVcfIndexFile(variant) + discordance.foreach(deps :+= VcfUtils.getVcfIndexFile(_)) + concordance.foreach(deps :+= VcfUtils.getVcfIndexFile(_)) + if (out != null && !org.broadinstitute.gatk.utils.io.IOUtils.isSpecialFile(out)) + outputIndex = VcfUtils.getVcfIndexFile(out) + } + + override def cmdLine = super.cmdLine + + required(TaggedFile.formatCommandLineParameter("-V", variant), variant, spaceSeparated = true, escape = true, format = "%s") + + optional(TaggedFile.formatCommandLineParameter("-disc", discordance), discordance, spaceSeparated = true, escape = true, format = "%s") + + optional(TaggedFile.formatCommandLineParameter("-conc", concordance), concordance, spaceSeparated = true, escape = true, format = "%s") + + optional("-o", out, spaceSeparated = true, escape = true, format = "%s") + + repeat("-sn", sample_name, spaceSeparated = true, escape = true, format = "%s") + + repeat("-se", sample_expressions, spaceSeparated = true, escape = true, format = "%s") + + repeat("-sf", sample_file, spaceSeparated = true, escape = true, format = "%s") + + repeat("-xl_sn", exclude_sample_name, spaceSeparated = true, escape = true, format = "%s") + + repeat("-xl_sf", exclude_sample_file, spaceSeparated = true, escape = true, format = "%s") + + repeat("-xl_se", exclude_sample_expressions, spaceSeparated = true, escape = true, format = "%s") + + repeat("-select", selectexpressions, spaceSeparated = true, escape = true, format = "%s") + + conditional(invertselect, "-invertSelect", escape = true, format = "%s") + + conditional(excludeNonVariants, "-env", escape = true, format = "%s") + + conditional(excludeFiltered, "-ef", escape = true, format = "%s") + + conditional(preserveAlleles, "-noTrim", escape = true, format = "%s") + + conditional(removeUnusedAlternates, "-trimAlternates", escape = true, format = "%s") + + optional("-restrictAllelesTo", restrictAllelesTo, spaceSeparated = true, escape = true, format = "%s") + + conditional(keepOriginalAC, "-keepOriginalAC", escape = true, format = "%s") + + conditional(keepOriginalDP, "-keepOriginalDP", escape = true, format = "%s") + + conditional(mendelianViolation, "-mv", escape = true, format = "%s") + + conditional(invertMendelianViolation, "-invMv", escape = true, format = "%s") + + optional("-mvq", mendelianViolationQualThreshold, spaceSeparated = true, escape = true, format = mendelianViolationQualThresholdFormat) + + optional("-fraction", select_random_fraction, spaceSeparated = true, escape = true, format = select_random_fractionFormat) + + optional("-fractionGenotypes", remove_fraction_genotypes, spaceSeparated = true, escape = true, format = remove_fraction_genotypesFormat) + + repeat("-selectType", selectTypeToInclude, spaceSeparated = true, escape = true, format = "%s") + + repeat("-xlSelectType", selectTypeToExclude, spaceSeparated = true, escape = true, format = "%s") + + optional("-IDs", keepIDs, spaceSeparated = true, escape = true, format = "%s") + + optional("-xlIDs", excludeIDs, spaceSeparated = true, escape = true, format = "%s") + + conditional(fullyDecode, "--fullyDecode", escape = true, format = "%s") + + conditional(justRead, "--justRead", escape = true, format = "%s") + + optional("--maxIndelSize", maxIndelSize, spaceSeparated = true, escape = true, format = "%s") + + optional("--minIndelSize", minIndelSize, spaceSeparated = true, escape = true, format = "%s") + + optional("--maxFilteredGenotypes", maxFilteredGenotypes, spaceSeparated = true, escape = true, format = "%s") + + optional("--minFilteredGenotypes", minFilteredGenotypes, spaceSeparated = true, escape = true, format = "%s") + + optional("--maxFractionFilteredGenotypes", maxFractionFilteredGenotypes, spaceSeparated = true, escape = true, format = maxFractionFilteredGenotypesFormat) + + optional("--minFractionFilteredGenotypes", minFractionFilteredGenotypes, spaceSeparated = true, escape = true, format = minFractionFilteredGenotypesFormat) + + conditional(setFilteredGtToNocall, "--setFilteredGtToNocall", escape = true, format = "%s") + + conditional(ALLOW_NONOVERLAPPING_COMMAND_LINE_SAMPLES, "--ALLOW_NONOVERLAPPING_COMMAND_LINE_SAMPLES", escape = true, format = "%s") + + conditional(forceValidOutput, "--forceValidOutput", escape = true, format = "%s") + + conditional(filter_reads_with_N_cigar, "-filterRNC", escape = true, format = "%s") + + conditional(filter_mismatching_base_and_quals, "-filterMBQ", escape = true, format = "%s") + + conditional(filter_bases_not_stored, "-filterNoBases", escape = true, format = "%s") +} diff --git a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/UnifiedGenotyper.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/UnifiedGenotyper.scala new file mode 100644 index 0000000000000000000000000000000000000000..fbb4423898d3f0c688a71cce40a2f1ad2b632978 --- /dev/null +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/UnifiedGenotyper.scala @@ -0,0 +1,322 @@ +package nl.lumc.sasc.biopet.extensions.gatk.broad + +import java.io.File + +import nl.lumc.sasc.biopet.utils.config.Configurable +import org.broadinstitute.gatk.queue.extensions.gatk.TaggedFile +import nl.lumc.sasc.biopet.core.ScatterGatherableFunction +import nl.lumc.sasc.biopet.utils.VcfUtils +import org.broadinstitute.gatk.utils.commandline.{ Gather, Input, Output, _ } + +class UnifiedGenotyper(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction { + def analysis_type = "UnifiedGenotyper" + scatterClass = classOf[LocusScatterFunction] + setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = false } + + /** Genotype likelihoods calculation model to employ -- SNP is the default option, while INDEL is also available for calling indels and BOTH is available for calling both together */ + @Argument(fullName = "genotype_likelihoods_model", shortName = "glm", doc = "Genotype likelihoods calculation model to employ -- SNP is the default option, while INDEL is also available for calling indels and BOTH is available for calling both together", required = false, exclusiveOf = "", validation = "") + var genotype_likelihoods_model: Option[String] = config("genotype_likelihoods_model") + + /** The PCR error rate to be used for computing fragment-based likelihoods */ + @Argument(fullName = "pcr_error_rate", shortName = "pcr_error", doc = "The PCR error rate to be used for computing fragment-based likelihoods", required = false, exclusiveOf = "", validation = "") + var pcr_error_rate: Option[Double] = config("pcr_error_rate") + + /** Format string for pcr_error_rate */ + @Argument(fullName = "pcr_error_rateFormat", shortName = "", doc = "Format string for pcr_error_rate", required = false, exclusiveOf = "", validation = "") + var pcr_error_rateFormat: String = "%s" + + /** If provided, we will calculate the SLOD (SB annotation) */ + @Argument(fullName = "computeSLOD", shortName = "slod", doc = "If provided, we will calculate the SLOD (SB annotation)", required = false, exclusiveOf = "", validation = "") + var computeSLOD: Boolean = config("computeSLOD", default = false) + + /** The PairHMM implementation to use for -glm INDEL genotype likelihood calculations */ + @Argument(fullName = "pair_hmm_implementation", shortName = "pairHMM", doc = "The PairHMM implementation to use for -glm INDEL genotype likelihood calculations", required = false, exclusiveOf = "", validation = "") + var pair_hmm_implementation: Option[String] = config("pair_hmm_implementation") + + /** Minimum base quality required to consider a base for calling */ + @Argument(fullName = "min_base_quality_score", shortName = "mbq", doc = "Minimum base quality required to consider a base for calling", required = false, exclusiveOf = "", validation = "") + var min_base_quality_score: Option[Int] = config("min_base_quality_score") + + /** Maximum fraction of reads with deletions spanning this locus for it to be callable */ + @Argument(fullName = "max_deletion_fraction", shortName = "deletions", doc = "Maximum fraction of reads with deletions spanning this locus for it to be callable", required = false, exclusiveOf = "", validation = "") + var max_deletion_fraction: Option[Double] = config("max_deletion_fraction") + + /** Format string for max_deletion_fraction */ + @Argument(fullName = "max_deletion_fractionFormat", shortName = "", doc = "Format string for max_deletion_fraction", required = false, exclusiveOf = "", validation = "") + var max_deletion_fractionFormat: String = "%s" + + /** Minimum number of consensus indels required to trigger genotyping run */ + @Argument(fullName = "min_indel_count_for_genotyping", shortName = "minIndelCnt", doc = "Minimum number of consensus indels required to trigger genotyping run", required = false, exclusiveOf = "", validation = "") + var min_indel_count_for_genotyping: Option[Int] = config("min_indel_count_for_genotyping") + + /** Minimum fraction of all reads at a locus that must contain an indel (of any allele) for that sample to contribute to the indel count for alleles */ + @Argument(fullName = "min_indel_fraction_per_sample", shortName = "minIndelFrac", doc = "Minimum fraction of all reads at a locus that must contain an indel (of any allele) for that sample to contribute to the indel count for alleles", required = false, exclusiveOf = "", validation = "") + var min_indel_fraction_per_sample: Option[Double] = config("min_indel_fraction_per_sample") + + /** Format string for min_indel_fraction_per_sample */ + @Argument(fullName = "min_indel_fraction_per_sampleFormat", shortName = "", doc = "Format string for min_indel_fraction_per_sample", required = false, exclusiveOf = "", validation = "") + var min_indel_fraction_per_sampleFormat: String = "%s" + + /** Indel gap continuation penalty, as Phred-scaled probability. I.e., 30 => 10 -30/10 */ + @Argument(fullName = "indelGapContinuationPenalty", shortName = "indelGCP", doc = "Indel gap continuation penalty, as Phred-scaled probability. I.e., 30 => 10^-30/10", required = false, exclusiveOf = "", validation = "") + var indelGapContinuationPenalty: Option[String] = config("indelGapContinuationPenalty") + + /** Indel gap open penalty, as Phred-scaled probability. I.e., 30 => 10 -30/10 */ + @Argument(fullName = "indelGapOpenPenalty", shortName = "indelGOP", doc = "Indel gap open penalty, as Phred-scaled probability. I.e., 30 => 10^-30/10", required = false, exclusiveOf = "", validation = "") + var indelGapOpenPenalty: Option[String] = config("indelGapOpenPenalty") + + /** Indel haplotype size */ + @Argument(fullName = "indelHaplotypeSize", shortName = "indelHSize", doc = "Indel haplotype size", required = false, exclusiveOf = "", validation = "") + var indelHaplotypeSize: Option[Int] = config("indelHaplotypeSize") + + /** Output indel debug info */ + @Argument(fullName = "indelDebug", shortName = "indelDebug", doc = "Output indel debug info", required = false, exclusiveOf = "", validation = "") + var indelDebug: Boolean = config("indelDebug", default = false) + + /** expt */ + @Argument(fullName = "ignoreSNPAlleles", shortName = "ignoreSNPAlleles", doc = "expt", required = false, exclusiveOf = "", validation = "") + var ignoreSNPAlleles: Boolean = config("ignoreSNPAlleles", default = false) + + /** expt */ + @Argument(fullName = "allReadsSP", shortName = "dl", doc = "expt", required = false, exclusiveOf = "", validation = "") + var allReadsSP: Boolean = config("allReadsSP", default = false) + + /** Ignore lane when building error model, error model is then per-site */ + @Argument(fullName = "ignoreLaneInfo", shortName = "ignoreLane", doc = "Ignore lane when building error model, error model is then per-site", required = false, exclusiveOf = "", validation = "") + var ignoreLaneInfo: Boolean = config("ignoreLaneInfo", default = false) + + /** VCF file with the truth callset for the reference sample */ + @Input(fullName = "reference_sample_calls", shortName = "referenceCalls", doc = "VCF file with the truth callset for the reference sample", required = false, exclusiveOf = "", validation = "") + var reference_sample_calls: Option[File] = config("reference_sample_calls") + + /** Reference sample name. */ + @Argument(fullName = "reference_sample_name", shortName = "refsample", doc = "Reference sample name.", required = false, exclusiveOf = "", validation = "") + var reference_sample_name: Option[String] = config("reference_sample_name") + + /** Min quality score to consider. Smaller numbers process faster. Default: Q1. */ + @Argument(fullName = "min_quality_score", shortName = "minqs", doc = "Min quality score to consider. Smaller numbers process faster. Default: Q1.", required = false, exclusiveOf = "", validation = "") + var min_quality_score: Option[String] = config("min_quality_score") + + /** Max quality score to consider. Smaller numbers process faster. Default: Q40. */ + @Argument(fullName = "max_quality_score", shortName = "maxqs", doc = "Max quality score to consider. Smaller numbers process faster. Default: Q40.", required = false, exclusiveOf = "", validation = "") + var max_quality_score: Option[String] = config("max_quality_score") + + /** Phred-Scaled prior quality of the site. Default: Q20. */ + @Argument(fullName = "site_quality_prior", shortName = "site_prior", doc = "Phred-Scaled prior quality of the site. Default: Q20.", required = false, exclusiveOf = "", validation = "") + var site_quality_prior: Option[String] = config("site_quality_prior") + + /** The minimum confidence in the error model to make a call. Number should be between 0 (no power requirement) and 1 (maximum power required). */ + @Argument(fullName = "min_power_threshold_for_calling", shortName = "min_call_power", doc = "The minimum confidence in the error model to make a call. Number should be between 0 (no power requirement) and 1 (maximum power required).", required = false, exclusiveOf = "", validation = "") + var min_power_threshold_for_calling: Option[Double] = config("min_power_threshold_for_calling") + + /** Format string for min_power_threshold_for_calling */ + @Argument(fullName = "min_power_threshold_for_callingFormat", shortName = "", doc = "Format string for min_power_threshold_for_calling", required = false, exclusiveOf = "", validation = "") + var min_power_threshold_for_callingFormat: String = "%s" + + /** If provided, we will annotate records with the number of alternate alleles that were discovered (but not necessarily genotyped) at a given site */ + @Argument(fullName = "annotateNDA", shortName = "nda", doc = "If provided, we will annotate records with the number of alternate alleles that were discovered (but not necessarily genotyped) at a given site", required = false, exclusiveOf = "", validation = "") + var annotateNDA: Boolean = config("annotateNDA", default = false) + + /** Heterozygosity value used to compute prior likelihoods for any locus */ + @Argument(fullName = "heterozygosity", shortName = "hets", doc = "Heterozygosity value used to compute prior likelihoods for any locus", required = false, exclusiveOf = "", validation = "") + var heterozygosity: Option[Double] = config("heterozygosity") + + /** Format string for heterozygosity */ + @Argument(fullName = "heterozygosityFormat", shortName = "", doc = "Format string for heterozygosity", required = false, exclusiveOf = "", validation = "") + var heterozygosityFormat: String = "%s" + + /** Heterozygosity for indel calling */ + @Argument(fullName = "indel_heterozygosity", shortName = "indelHeterozygosity", doc = "Heterozygosity for indel calling", required = false, exclusiveOf = "", validation = "") + var indel_heterozygosity: Option[Double] = config("indel_heterozygosity") + + /** Format string for indel_heterozygosity */ + @Argument(fullName = "indel_heterozygosityFormat", shortName = "", doc = "Format string for indel_heterozygosity", required = false, exclusiveOf = "", validation = "") + var indel_heterozygosityFormat: String = "%s" + + /** The minimum phred-scaled confidence threshold at which variants should be called */ + @Argument(fullName = "standard_min_confidence_threshold_for_calling", shortName = "stand_call_conf", doc = "The minimum phred-scaled confidence threshold at which variants should be called", required = false, exclusiveOf = "", validation = "") + var standard_min_confidence_threshold_for_calling: Option[Double] = config("stand_call_conf") + + /** Format string for standard_min_confidence_threshold_for_calling */ + @Argument(fullName = "standard_min_confidence_threshold_for_callingFormat", shortName = "", doc = "Format string for standard_min_confidence_threshold_for_calling", required = false, exclusiveOf = "", validation = "") + var standard_min_confidence_threshold_for_callingFormat: String = "%s" + + /** The minimum phred-scaled confidence threshold at which variants should be emitted (and filtered with LowQual if less than the calling threshold) */ + @Argument(fullName = "standard_min_confidence_threshold_for_emitting", shortName = "stand_emit_conf", doc = "The minimum phred-scaled confidence threshold at which variants should be emitted (and filtered with LowQual if less than the calling threshold)", required = false, exclusiveOf = "", validation = "") + var standard_min_confidence_threshold_for_emitting: Option[Double] = config("stand_emit_conf") + + /** Format string for standard_min_confidence_threshold_for_emitting */ + @Argument(fullName = "standard_min_confidence_threshold_for_emittingFormat", shortName = "", doc = "Format string for standard_min_confidence_threshold_for_emitting", required = false, exclusiveOf = "", validation = "") + var standard_min_confidence_threshold_for_emittingFormat: String = "%s" + + /** Maximum number of alternate alleles to genotype */ + @Argument(fullName = "max_alternate_alleles", shortName = "maxAltAlleles", doc = "Maximum number of alternate alleles to genotype", required = false, exclusiveOf = "", validation = "") + var max_alternate_alleles: Option[Int] = config("max_alternate_alleles") + + /** Input prior for calls */ + @Argument(fullName = "input_prior", shortName = "inputPrior", doc = "Input prior for calls", required = false, exclusiveOf = "", validation = "") + var input_prior: List[Double] = config("input_prior", default = Nil) + + /** Ploidy (number of chromosomes) per sample. For pooled data, set to (Number of samples in each pool * Sample Ploidy). */ + @Argument(fullName = "sample_ploidy", shortName = "ploidy", doc = "Ploidy (number of chromosomes) per sample. For pooled data, set to (Number of samples in each pool * Sample Ploidy).", required = false, exclusiveOf = "", validation = "") + var sample_ploidy: Option[Int] = config("sample_ploidy") + + /** Specifies how to determine the alternate alleles to use for genotyping */ + @Argument(fullName = "genotyping_mode", shortName = "gt_mode", doc = "Specifies how to determine the alternate alleles to use for genotyping", required = false, exclusiveOf = "", validation = "") + var genotyping_mode: Option[String] = config("genotyping_mode") + + /** The set of alleles at which to genotype when --genotyping_mode is GENOTYPE_GIVEN_ALLELES */ + @Input(fullName = "alleles", shortName = "alleles", doc = "The set of alleles at which to genotype when --genotyping_mode is GENOTYPE_GIVEN_ALLELES", required = false, exclusiveOf = "", validation = "") + var alleles: Option[File] = config("alleles") + + /** Fraction of contamination in sequencing data (for all samples) to aggressively remove */ + @Argument(fullName = "contamination_fraction_to_filter", shortName = "contamination", doc = "Fraction of contamination in sequencing data (for all samples) to aggressively remove", required = false, exclusiveOf = "", validation = "") + var contamination_fraction_to_filter: Option[Double] = config("contamination_fraction_to_filter") + + /** Format string for contamination_fraction_to_filter */ + @Argument(fullName = "contamination_fraction_to_filterFormat", shortName = "", doc = "Format string for contamination_fraction_to_filter", required = false, exclusiveOf = "", validation = "") + var contamination_fraction_to_filterFormat: String = "%s" + + /** Tab-separated File containing fraction of contamination in sequencing data (per sample) to aggressively remove. Format should be \"<SampleID><TAB><Contamination>\" (Contamination is double) per line; No header. */ + @Argument(fullName = "contamination_fraction_per_sample_file", shortName = "contaminationFile", doc = "Tab-separated File containing fraction of contamination in sequencing data (per sample) to aggressively remove. Format should be \"<SampleID><TAB><Contamination>\" (Contamination is double) per line; No header.", required = false, exclusiveOf = "", validation = "") + var contamination_fraction_per_sample_file: Option[File] = config("contamination_fraction_per_sample_file") + + /** Non-reference probability calculation model to employ */ + @Argument(fullName = "p_nonref_model", shortName = "pnrm", doc = "Non-reference probability calculation model to employ", required = false, exclusiveOf = "", validation = "") + var p_nonref_model: Option[String] = config("p_nonref_model") + + /** x */ + @Argument(fullName = "exactcallslog", shortName = "logExactCalls", doc = "x", required = false, exclusiveOf = "", validation = "") + var exactcallslog: Option[File] = config("exactcallslog") + + /** Specifies which type of calls we should output */ + @Argument(fullName = "output_mode", shortName = "out_mode", doc = "Specifies which type of calls we should output", required = false, exclusiveOf = "", validation = "") + var output_mode: Option[String] = config("output_mode") + + /** Annotate all sites with PLs */ + @Argument(fullName = "allSitePLs", shortName = "allSitePLs", doc = "Annotate all sites with PLs", required = false, exclusiveOf = "", validation = "") + var allSitePLs: Boolean = config("allSitePLs", default = false) + + /** dbSNP file */ + @Input(fullName = "dbsnp", shortName = "D", doc = "dbSNP file", required = false, exclusiveOf = "", validation = "") + var dbsnp: Option[File] = config("dbsnp") + + /** Comparison VCF file */ + @Input(fullName = "comp", shortName = "comp", doc = "Comparison VCF file", required = false, exclusiveOf = "", validation = "") + var comp: List[File] = config("comp", default = Nil) + + /** File to which variants should be written */ + @Output(fullName = "out", shortName = "o", doc = "File to which variants should be written", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[CatVariantsGatherer]) + var out: File = _ + + /** If provided, only these samples will be emitted into the VCF, regardless of which samples are present in the BAM file */ + @Argument(fullName = "onlyEmitSamples", shortName = "onlyEmitSamples", doc = "If provided, only these samples will be emitted into the VCF, regardless of which samples are present in the BAM file", required = false, exclusiveOf = "", validation = "") + var onlyEmitSamples: List[String] = config("onlyEmitSamples", default = Nil) + + /** File to print all of the annotated and detailed debugging output */ + @Argument(fullName = "debug_file", shortName = "debug_file", doc = "File to print all of the annotated and detailed debugging output", required = false, exclusiveOf = "", validation = "") + var debug_file: File = _ + + /** File to print any relevant callability metrics output */ + @Argument(fullName = "metrics_file", shortName = "metrics", doc = "File to print any relevant callability metrics output", required = false, exclusiveOf = "", validation = "") + var metrics_file: File = _ + + /** One or more specific annotations to apply to variant calls */ + @Argument(fullName = "annotation", shortName = "A", doc = "One or more specific annotations to apply to variant calls", required = false, exclusiveOf = "", validation = "") + var annotation: List[String] = config("annotation", default = Nil, freeVar = false) + + /** One or more specific annotations to exclude */ + @Argument(fullName = "excludeAnnotation", shortName = "XA", doc = "One or more specific annotations to exclude", required = false, exclusiveOf = "", validation = "") + var excludeAnnotation: List[String] = config("excludeAnnotation", default = Nil) + + /** One or more classes/groups of annotations to apply to variant calls. The single value 'none' removes the default group */ + @Argument(fullName = "group", shortName = "G", doc = "One or more classes/groups of annotations to apply to variant calls. The single value 'none' removes the default group", required = false, exclusiveOf = "", validation = "") + var group: List[String] = config("group", default = Nil) + + /** Filter out reads with CIGAR containing the N operator, instead of failing with an error */ + @Argument(fullName = "filter_reads_with_N_cigar", shortName = "filterRNC", doc = "Filter out reads with CIGAR containing the N operator, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_reads_with_N_cigar: Boolean = config("filter_reads_with_N_cigar", default = false) + + /** Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error */ + @Argument(fullName = "filter_mismatching_base_and_quals", shortName = "filterMBQ", doc = "Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_mismatching_base_and_quals: Boolean = config("filter_mismatching_base_and_quals", default = false) + + /** Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error */ + @Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_bases_not_stored: Boolean = config("filter_bases_not_stored", default = false) + + @Output + @Gather(enabled = false) + private var outputIndex: File = _ + + override def beforeGraph() { + super.beforeGraph() + reference_sample_calls.foreach(deps :+= VcfUtils.getVcfIndexFile(_)) + alleles.foreach(deps :+= VcfUtils.getVcfIndexFile(_)) + dbsnp.foreach(deps :+= VcfUtils.getVcfIndexFile(_)) + deps ++= comp.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig)) + if (out != null && !org.broadinstitute.gatk.utils.io.IOUtils.isSpecialFile(out)) + outputIndex = VcfUtils.getVcfIndexFile(out) + } + + override def cmdLine = super.cmdLine + + optional("-glm", genotype_likelihoods_model, spaceSeparated = true, escape = true, format = "%s") + + optional("-pcr_error", pcr_error_rate, spaceSeparated = true, escape = true, format = pcr_error_rateFormat) + + conditional(computeSLOD, "-slod", escape = true, format = "%s") + + optional("-pairHMM", pair_hmm_implementation, spaceSeparated = true, escape = true, format = "%s") + + optional("-mbq", min_base_quality_score, spaceSeparated = true, escape = true, format = "%s") + + optional("-deletions", max_deletion_fraction, spaceSeparated = true, escape = true, format = max_deletion_fractionFormat) + + optional("-minIndelCnt", min_indel_count_for_genotyping, spaceSeparated = true, escape = true, format = "%s") + + optional("-minIndelFrac", min_indel_fraction_per_sample, spaceSeparated = true, escape = true, format = min_indel_fraction_per_sampleFormat) + + optional("-indelGCP", indelGapContinuationPenalty, spaceSeparated = true, escape = true, format = "%s") + + optional("-indelGOP", indelGapOpenPenalty, spaceSeparated = true, escape = true, format = "%s") + + optional("-indelHSize", indelHaplotypeSize, spaceSeparated = true, escape = true, format = "%s") + + conditional(indelDebug, "-indelDebug", escape = true, format = "%s") + + conditional(ignoreSNPAlleles, "-ignoreSNPAlleles", escape = true, format = "%s") + + conditional(allReadsSP, "-dl", escape = true, format = "%s") + + conditional(ignoreLaneInfo, "-ignoreLane", escape = true, format = "%s") + + optional(TaggedFile.formatCommandLineParameter("-referenceCalls", reference_sample_calls), reference_sample_calls, spaceSeparated = true, escape = true, format = "%s") + + optional("-refsample", reference_sample_name, spaceSeparated = true, escape = true, format = "%s") + + optional("-minqs", min_quality_score, spaceSeparated = true, escape = true, format = "%s") + + optional("-maxqs", max_quality_score, spaceSeparated = true, escape = true, format = "%s") + + optional("-site_prior", site_quality_prior, spaceSeparated = true, escape = true, format = "%s") + + optional("-min_call_power", min_power_threshold_for_calling, spaceSeparated = true, escape = true, format = min_power_threshold_for_callingFormat) + + conditional(annotateNDA, "-nda", escape = true, format = "%s") + + optional("-hets", heterozygosity, spaceSeparated = true, escape = true, format = heterozygosityFormat) + + optional("-indelHeterozygosity", indel_heterozygosity, spaceSeparated = true, escape = true, format = indel_heterozygosityFormat) + + optional("-stand_call_conf", standard_min_confidence_threshold_for_calling, spaceSeparated = true, escape = true, format = standard_min_confidence_threshold_for_callingFormat) + + optional("-stand_emit_conf", standard_min_confidence_threshold_for_emitting, spaceSeparated = true, escape = true, format = standard_min_confidence_threshold_for_emittingFormat) + + optional("-maxAltAlleles", max_alternate_alleles, spaceSeparated = true, escape = true, format = "%s") + + repeat("-inputPrior", input_prior, spaceSeparated = true, escape = true, format = "%s") + + optional("-ploidy", sample_ploidy, spaceSeparated = true, escape = true, format = "%s") + + optional("-gt_mode", genotyping_mode, spaceSeparated = true, escape = true, format = "%s") + + optional(TaggedFile.formatCommandLineParameter("-alleles", alleles), alleles, spaceSeparated = true, escape = true, format = "%s") + + optional("-contamination", contamination_fraction_to_filter, spaceSeparated = true, escape = true, format = contamination_fraction_to_filterFormat) + + optional("-contaminationFile", contamination_fraction_per_sample_file, spaceSeparated = true, escape = true, format = "%s") + + optional("-pnrm", p_nonref_model, spaceSeparated = true, escape = true, format = "%s") + + optional("-logExactCalls", exactcallslog, spaceSeparated = true, escape = true, format = "%s") + + optional("-out_mode", output_mode, spaceSeparated = true, escape = true, format = "%s") + + conditional(allSitePLs, "-allSitePLs", escape = true, format = "%s") + + optional(TaggedFile.formatCommandLineParameter("-D", dbsnp), dbsnp, spaceSeparated = true, escape = true, format = "%s") + + repeat("-comp", comp, formatPrefix = TaggedFile.formatCommandLineParameter, spaceSeparated = true, escape = true, format = "%s") + + optional("-o", out, spaceSeparated = true, escape = true, format = "%s") + + repeat("-onlyEmitSamples", onlyEmitSamples, spaceSeparated = true, escape = true, format = "%s") + + optional("-debug_file", debug_file, spaceSeparated = true, escape = true, format = "%s") + + optional("-metrics", metrics_file, spaceSeparated = true, escape = true, format = "%s") + + repeat("-A", annotation, spaceSeparated = true, escape = true, format = "%s") + + repeat("-XA", excludeAnnotation, spaceSeparated = true, escape = true, format = "%s") + + repeat("-G", group, spaceSeparated = true, escape = true, format = "%s") + + conditional(filter_reads_with_N_cigar, "-filterRNC", escape = true, format = "%s") + + conditional(filter_mismatching_base_and_quals, "-filterMBQ", escape = true, format = "%s") + + conditional(filter_bases_not_stored, "-filterNoBases", escape = true, format = "%s") +} + +object UnifiedGenotyper { + def apply(root: Configurable, inputFiles: List[File], outputFile: File): UnifiedGenotyper = { + val ug = new UnifiedGenotyper(root) + ug.input_file = inputFiles + ug.out = outputFile + ug + } +} diff --git a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantAnnotator.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantAnnotator.scala new file mode 100644 index 0000000000000000000000000000000000000000..7fa034cfe6c48b3e4498a7ee4f968404a157a88c --- /dev/null +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantAnnotator.scala @@ -0,0 +1,123 @@ +package nl.lumc.sasc.biopet.extensions.gatk.broad + +import java.io.File + +import nl.lumc.sasc.biopet.core.ScatterGatherableFunction +import nl.lumc.sasc.biopet.utils.VcfUtils +import nl.lumc.sasc.biopet.utils.config.Configurable +import org.broadinstitute.gatk.queue.extensions.gatk.TaggedFile +import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Output, _ } + +class VariantAnnotator(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction { + def analysis_type = "VariantAnnotator" + scatterClass = classOf[LocusScatterFunction] + setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = false } + + /** Input VCF file */ + @Input(fullName = "variant", shortName = "V", doc = "Input VCF file", required = true, exclusiveOf = "", validation = "") + var variant: File = _ + + /** SnpEff file from which to get annotations */ + @Input(fullName = "snpEffFile", shortName = "snpEffFile", doc = "SnpEff file from which to get annotations", required = false, exclusiveOf = "", validation = "") + var snpEffFile: Option[File] = config("snpEffFile") + + /** dbSNP file */ + @Input(fullName = "dbsnp", shortName = "D", doc = "dbSNP file", required = false, exclusiveOf = "", validation = "") + var dbsnp: Option[File] = config("dbsnp") + + /** Comparison VCF file */ + @Input(fullName = "comp", shortName = "comp", doc = "Comparison VCF file", required = false, exclusiveOf = "", validation = "") + var comp: List[File] = config("comp", default = Nil) + + /** External resource VCF file */ + @Input(fullName = "resource", shortName = "resource", doc = "External resource VCF file", required = false, exclusiveOf = "", validation = "") + var resource: List[File] = config("resource") + + /** File to which variants should be written */ + @Output(fullName = "out", shortName = "o", doc = "File to which variants should be written", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[CatVariantsGatherer]) + var out: File = _ + + /** One or more specific annotations to apply to variant calls */ + @Argument(fullName = "annotation", shortName = "A", doc = "One or more specific annotations to apply to variant calls", required = false, exclusiveOf = "", validation = "") + var annotation: List[String] = config("annotation", default = Nil, freeVar = false) + + /** One or more specific annotations to exclude */ + @Argument(fullName = "excludeAnnotation", shortName = "XA", doc = "One or more specific annotations to exclude", required = false, exclusiveOf = "", validation = "") + var excludeAnnotation: List[String] = config("excludeAnnotation", default = Nil) + + /** One or more classes/groups of annotations to apply to variant calls */ + @Argument(fullName = "group", shortName = "G", doc = "One or more classes/groups of annotations to apply to variant calls", required = false, exclusiveOf = "", validation = "") + var group: List[String] = config("group", default = Nil) + + /** One or more specific expressions to apply to variant calls */ + @Argument(fullName = "expression", shortName = "E", doc = "One or more specific expressions to apply to variant calls", required = false, exclusiveOf = "", validation = "") + var expression: List[String] = config("expression", default = Nil) + + /** Check for allele concordances when using an external resource VCF file */ + @Argument(fullName = "resourceAlleleConcordance", shortName = "rac", doc = "Check for allele concordances when using an external resource VCF file", required = false, exclusiveOf = "", validation = "") + var resourceAlleleConcordance: Boolean = config("resourceAlleleConcordance", default = false) + + /** Use all possible annotations (not for the faint of heart) */ + @Argument(fullName = "useAllAnnotations", shortName = "all", doc = "Use all possible annotations (not for the faint of heart)", required = false, exclusiveOf = "", validation = "") + var useAllAnnotations: Boolean = config("useAllAnnotations", default = false) + + /** Add dbSNP ID even if one is already present */ + @Argument(fullName = "alwaysAppendDbsnpId", shortName = "alwaysAppendDbsnpId", doc = "Add dbSNP ID even if one is already present", required = false, exclusiveOf = "", validation = "") + var alwaysAppendDbsnpId: Boolean = config("alwaysAppendDbsnpId", default = false) + + /** GQ threshold for annotating MV ratio */ + @Argument(fullName = "MendelViolationGenotypeQualityThreshold", shortName = "mvq", doc = "GQ threshold for annotating MV ratio", required = false, exclusiveOf = "", validation = "") + var MendelViolationGenotypeQualityThreshold: Option[Double] = config("MendelViolationGenotypeQualityThreshold") + + /** Format string for MendelViolationGenotypeQualityThreshold */ + @Argument(fullName = "MendelViolationGenotypeQualityThresholdFormat", shortName = "", doc = "Format string for MendelViolationGenotypeQualityThreshold", required = false, exclusiveOf = "", validation = "") + var MendelViolationGenotypeQualityThresholdFormat: String = "%s" + + /** Filter out reads with CIGAR containing the N operator, instead of failing with an error */ + @Argument(fullName = "filter_reads_with_N_cigar", shortName = "filterRNC", doc = "Filter out reads with CIGAR containing the N operator, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_reads_with_N_cigar: Boolean = config("filter_reads_with_N_cigar", default = false) + + /** Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error */ + @Argument(fullName = "filter_mismatching_base_and_quals", shortName = "filterMBQ", doc = "Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_mismatching_base_and_quals: Boolean = config("filter_mismatching_base_and_quals", default = false) + + /** Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error */ + @Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_bases_not_stored: Boolean = config("filter_bases_not_stored", default = false) + + @Output + @Gather(enabled = false) + private var outputIndex: File = _ + + override def beforeGraph() { + super.beforeGraph() + if (variant != null) + deps :+= VcfUtils.getVcfIndexFile(variant) + snpEffFile.foreach(deps :+= VcfUtils.getVcfIndexFile(_)) + dbsnp.foreach(deps :+= VcfUtils.getVcfIndexFile(_)) + deps ++= comp.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig)) + deps ++= resource.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig)) + if (out != null && !org.broadinstitute.gatk.utils.io.IOUtils.isSpecialFile(out)) + outputIndex = VcfUtils.getVcfIndexFile(out) + } + + override def cmdLine = super.cmdLine + + required(TaggedFile.formatCommandLineParameter("-V", variant), variant, spaceSeparated = true, escape = true, format = "%s") + + optional(TaggedFile.formatCommandLineParameter("-snpEffFile", snpEffFile), snpEffFile, spaceSeparated = true, escape = true, format = "%s") + + optional(TaggedFile.formatCommandLineParameter("-D", dbsnp), dbsnp, spaceSeparated = true, escape = true, format = "%s") + + repeat("-comp", comp, formatPrefix = TaggedFile.formatCommandLineParameter, spaceSeparated = true, escape = true, format = "%s") + + repeat("-resource", resource, formatPrefix = TaggedFile.formatCommandLineParameter, spaceSeparated = true, escape = true, format = "%s") + + optional("-o", out, spaceSeparated = true, escape = true, format = "%s") + + repeat("-A", annotation, spaceSeparated = true, escape = true, format = "%s") + + repeat("-XA", excludeAnnotation, spaceSeparated = true, escape = true, format = "%s") + + repeat("-G", group, spaceSeparated = true, escape = true, format = "%s") + + repeat("-E", expression, spaceSeparated = true, escape = true, format = "%s") + + conditional(resourceAlleleConcordance, "-rac", escape = true, format = "%s") + + conditional(useAllAnnotations, "-all", escape = true, format = "%s") + + conditional(alwaysAppendDbsnpId, "-alwaysAppendDbsnpId", escape = true, format = "%s") + + optional("-mvq", MendelViolationGenotypeQualityThreshold, spaceSeparated = true, escape = true, format = MendelViolationGenotypeQualityThresholdFormat) + + conditional(filter_reads_with_N_cigar, "-filterRNC", escape = true, format = "%s") + + conditional(filter_mismatching_base_and_quals, "-filterMBQ", escape = true, format = "%s") + + conditional(filter_bases_not_stored, "-filterNoBases", escape = true, format = "%s") +} diff --git a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantEval.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantEval.scala new file mode 100644 index 0000000000000000000000000000000000000000..a595ce5c1494101ac9104220db3a2c28d3120d2a --- /dev/null +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantEval.scala @@ -0,0 +1,163 @@ +package nl.lumc.sasc.biopet.extensions.gatk.broad + +import nl.lumc.sasc.biopet.utils.VcfUtils +import nl.lumc.sasc.biopet.utils.config.Configurable +import org.broadinstitute.gatk.queue.extensions.gatk.TaggedFile +import java.io.File +import org.broadinstitute.gatk.utils.commandline.Argument +import org.broadinstitute.gatk.utils.commandline.Gather +import org.broadinstitute.gatk.utils.commandline.Input +import org.broadinstitute.gatk.utils.commandline.Output + +class VariantEval(val root: Configurable) extends CommandLineGATK { + def analysis_type = "VariantEval" + + /** An output file created by the walker. Will overwrite contents if file exists */ + @Output(fullName = "out", shortName = "o", doc = "An output file created by the walker. Will overwrite contents if file exists", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[org.broadinstitute.gatk.queue.function.scattergather.SimpleTextGatherFunction]) + var out: File = _ + + /** Input evaluation file(s) */ + @Input(fullName = "eval", shortName = "eval", doc = "Input evaluation file(s)", required = true, exclusiveOf = "", validation = "") + var eval: Seq[File] = Nil + + /** Input comparison file(s) */ + @Input(fullName = "comp", shortName = "comp", doc = "Input comparison file(s)", required = false, exclusiveOf = "", validation = "") + var comp: Seq[File] = Nil + + /** dbSNP file */ + @Input(fullName = "dbsnp", shortName = "D", doc = "dbSNP file", required = false, exclusiveOf = "", validation = "") + var dbsnp: Option[File] = config("dbsnp") + + /** Evaluations that count calls at sites of true variation (e.g., indel calls) will use this argument as their gold standard for comparison */ + @Input(fullName = "goldStandard", shortName = "gold", doc = "Evaluations that count calls at sites of true variation (e.g., indel calls) will use this argument as their gold standard for comparison", required = false, exclusiveOf = "", validation = "") + var goldStandard: Option[File] = config("goldStandard") + + /** One or more stratifications to use when evaluating the data */ + @Argument(fullName = "select_exps", shortName = "select", doc = "One or more stratifications to use when evaluating the data", required = false, exclusiveOf = "", validation = "") + var select_exps: List[String] = config("select_exps", default = Nil) + + /** Names to use for the list of stratifications (must be a 1-to-1 mapping) */ + @Argument(fullName = "select_names", shortName = "selectName", doc = "Names to use for the list of stratifications (must be a 1-to-1 mapping)", required = false, exclusiveOf = "", validation = "") + var select_names: List[String] = config("select_names", default = Nil) + + /** Derive eval and comp contexts using only these sample genotypes, when genotypes are available in the original context */ + @Argument(fullName = "sample", shortName = "sn", doc = "Derive eval and comp contexts using only these sample genotypes, when genotypes are available in the original context", required = false, exclusiveOf = "", validation = "") + var sample: List[String] = config("sample", default = Nil, freeVar = false) + + /** Name of ROD bindings containing variant sites that should be treated as known when splitting eval rods into known and novel subsets */ + @Argument(fullName = "known_names", shortName = "knownName", doc = "Name of ROD bindings containing variant sites that should be treated as known when splitting eval rods into known and novel subsets", required = false, exclusiveOf = "", validation = "") + var known_names: List[String] = config("known_names", default = Nil) + + /** One or more specific stratification modules to apply to the eval track(s) (in addition to the standard stratifications, unless -noS is specified) */ + @Argument(fullName = "stratificationModule", shortName = "ST", doc = "One or more specific stratification modules to apply to the eval track(s) (in addition to the standard stratifications, unless -noS is specified)", required = false, exclusiveOf = "", validation = "") + var stratificationModule: List[String] = config("stratificationModule", default = Nil) + + /** Do not use the standard stratification modules by default (instead, only those that are specified with the -S option) */ + @Argument(fullName = "doNotUseAllStandardStratifications", shortName = "noST", doc = "Do not use the standard stratification modules by default (instead, only those that are specified with the -S option)", required = false, exclusiveOf = "", validation = "") + var doNotUseAllStandardStratifications: Boolean = config("doNotUseAllStandardStratifications", default = false) + + /** One or more specific eval modules to apply to the eval track(s) (in addition to the standard modules, unless -noEV is specified) */ + @Argument(fullName = "evalModule", shortName = "EV", doc = "One or more specific eval modules to apply to the eval track(s) (in addition to the standard modules, unless -noEV is specified)", required = false, exclusiveOf = "", validation = "") + var evalModule: List[String] = config("evalModule", default = Nil) + + /** Do not use the standard modules by default (instead, only those that are specified with the -EV option) */ + @Argument(fullName = "doNotUseAllStandardModules", shortName = "noEV", doc = "Do not use the standard modules by default (instead, only those that are specified with the -EV option)", required = false, exclusiveOf = "", validation = "") + var doNotUseAllStandardModules: Boolean = config("doNotUseAllStandardModules", default = false) + + /** Minimum phasing quality */ + @Argument(fullName = "minPhaseQuality", shortName = "mpq", doc = "Minimum phasing quality", required = false, exclusiveOf = "", validation = "") + var minPhaseQuality: Option[Double] = config("minPhaseQuality") + + /** Format string for minPhaseQuality */ + @Argument(fullName = "minPhaseQualityFormat", shortName = "", doc = "Format string for minPhaseQuality", required = false, exclusiveOf = "", validation = "") + var minPhaseQualityFormat: String = "%s" + + /** Minimum genotype QUAL score for each trio member required to accept a site as a violation. Default is 50. */ + @Argument(fullName = "mendelianViolationQualThreshold", shortName = "mvq", doc = "Minimum genotype QUAL score for each trio member required to accept a site as a violation. Default is 50.", required = false, exclusiveOf = "", validation = "") + var mendelianViolationQualThreshold: Option[Double] = config("mendelianViolationQualThreshold") + + /** Format string for mendelianViolationQualThreshold */ + @Argument(fullName = "mendelianViolationQualThresholdFormat", shortName = "", doc = "Format string for mendelianViolationQualThreshold", required = false, exclusiveOf = "", validation = "") + var mendelianViolationQualThresholdFormat: String = "%s" + + /** Per-sample ploidy (number of chromosomes per sample) */ + @Argument(fullName = "samplePloidy", shortName = "ploidy", doc = "Per-sample ploidy (number of chromosomes per sample)", required = false, exclusiveOf = "", validation = "") + var samplePloidy: Option[Int] = config("samplePloidy") + + /** Fasta file with ancestral alleles */ + @Argument(fullName = "ancestralAlignments", shortName = "aa", doc = "Fasta file with ancestral alleles", required = false, exclusiveOf = "", validation = "") + var ancestralAlignments: Option[File] = config("ancestralAlignments") + + /** If provided only comp and eval tracks with exactly matching reference and alternate alleles will be counted as overlapping */ + @Argument(fullName = "requireStrictAlleleMatch", shortName = "strict", doc = "If provided only comp and eval tracks with exactly matching reference and alternate alleles will be counted as overlapping", required = false, exclusiveOf = "", validation = "") + var requireStrictAlleleMatch: Boolean = config("requireStrictAlleleMatch", default = false) + + /** If provided, modules that track polymorphic sites will not require that a site have AC > 0 when the input eval has genotypes */ + @Argument(fullName = "keepAC0", shortName = "keepAC0", doc = "If provided, modules that track polymorphic sites will not require that a site have AC > 0 when the input eval has genotypes", required = false, exclusiveOf = "", validation = "") + var keepAC0: Boolean = config("keepAC0", default = false) + + /** If provided, modules that track polymorphic sites will not require that a site have AC > 0 when the input eval has genotypes */ + @Argument(fullName = "numSamples", shortName = "numSamples", doc = "If provided, modules that track polymorphic sites will not require that a site have AC > 0 when the input eval has genotypes", required = false, exclusiveOf = "", validation = "") + var numSamples: Option[Int] = config("numSamples") + + /** If provided, all -eval tracks will be merged into a single eval track */ + @Argument(fullName = "mergeEvals", shortName = "mergeEvals", doc = "If provided, all -eval tracks will be merged into a single eval track", required = false, exclusiveOf = "", validation = "") + var mergeEvals: Boolean = config("mergeEvals", default = false) + + /** File containing tribble-readable features for the IntervalStratificiation */ + @Input(fullName = "stratIntervals", shortName = "stratIntervals", doc = "File containing tribble-readable features for the IntervalStratificiation", required = false, exclusiveOf = "", validation = "") + var stratIntervals: Option[File] = config("stratIntervals") + + /** File containing tribble-readable features describing a known list of copy number variants */ + @Input(fullName = "knownCNVs", shortName = "knownCNVs", doc = "File containing tribble-readable features describing a known list of copy number variants", required = false, exclusiveOf = "", validation = "") + var knownCNVs: Option[File] = config("knownCNVs") + + /** Filter out reads with CIGAR containing the N operator, instead of failing with an error */ + @Argument(fullName = "filter_reads_with_N_cigar", shortName = "filterRNC", doc = "Filter out reads with CIGAR containing the N operator, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_reads_with_N_cigar: Boolean = config("filter_reads_with_N_cigar", default = false) + + /** Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error */ + @Argument(fullName = "filter_mismatching_base_and_quals", shortName = "filterMBQ", doc = "Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_mismatching_base_and_quals: Boolean = config("filter_mismatching_base_and_quals", default = false) + + /** Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error */ + @Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_bases_not_stored: Boolean = config("filter_bases_not_stored", default = false) + + override def beforeGraph() { + super.beforeGraph() + deps ++= eval.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig)) + deps ++= comp.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig)) + dbsnp.foreach(deps :+= VcfUtils.getVcfIndexFile(_)) + goldStandard.foreach(deps :+= VcfUtils.getVcfIndexFile(_)) + } + + override def cmdLine = super.cmdLine + + optional("-o", out, spaceSeparated = true, escape = true, format = "%s") + + repeat("-eval", eval, formatPrefix = TaggedFile.formatCommandLineParameter, spaceSeparated = true, escape = true, format = "%s") + + repeat("-comp", comp, formatPrefix = TaggedFile.formatCommandLineParameter, spaceSeparated = true, escape = true, format = "%s") + + optional(TaggedFile.formatCommandLineParameter("-D", dbsnp), dbsnp, spaceSeparated = true, escape = true, format = "%s") + + optional(TaggedFile.formatCommandLineParameter("-gold", goldStandard), goldStandard, spaceSeparated = true, escape = true, format = "%s") + + repeat("-select", select_exps, spaceSeparated = true, escape = true, format = "%s") + + repeat("-selectName", select_names, spaceSeparated = true, escape = true, format = "%s") + + repeat("-sn", sample, spaceSeparated = true, escape = true, format = "%s") + + repeat("-knownName", known_names, spaceSeparated = true, escape = true, format = "%s") + + repeat("-ST", stratificationModule, spaceSeparated = true, escape = true, format = "%s") + + conditional(doNotUseAllStandardStratifications, "-noST", escape = true, format = "%s") + + repeat("-EV", evalModule, spaceSeparated = true, escape = true, format = "%s") + + conditional(doNotUseAllStandardModules, "-noEV", escape = true, format = "%s") + + optional("-mpq", minPhaseQuality, spaceSeparated = true, escape = true, format = minPhaseQualityFormat) + + optional("-mvq", mendelianViolationQualThreshold, spaceSeparated = true, escape = true, format = mendelianViolationQualThresholdFormat) + + optional("-ploidy", samplePloidy, spaceSeparated = true, escape = true, format = "%s") + + optional("-aa", ancestralAlignments, spaceSeparated = true, escape = true, format = "%s") + + conditional(requireStrictAlleleMatch, "-strict", escape = true, format = "%s") + + conditional(keepAC0, "-keepAC0", escape = true, format = "%s") + + optional("-numSamples", numSamples, spaceSeparated = true, escape = true, format = "%s") + + conditional(mergeEvals, "-mergeEvals", escape = true, format = "%s") + + optional("-stratIntervals", stratIntervals, spaceSeparated = true, escape = true, format = "%s") + + optional("-knownCNVs", knownCNVs, spaceSeparated = true, escape = true, format = "%s") + + conditional(filter_reads_with_N_cigar, "-filterRNC", escape = true, format = "%s") + + conditional(filter_mismatching_base_and_quals, "-filterMBQ", escape = true, format = "%s") + + conditional(filter_bases_not_stored, "-filterNoBases", escape = true, format = "%s") +} diff --git a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantRecalibrator.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantRecalibrator.scala new file mode 100644 index 0000000000000000000000000000000000000000..db631449a9e6c59112832247367634ee8d256983 --- /dev/null +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantRecalibrator.scala @@ -0,0 +1,213 @@ +package nl.lumc.sasc.biopet.extensions.gatk.broad + +import java.io.File + +import nl.lumc.sasc.biopet.utils.VcfUtils +import nl.lumc.sasc.biopet.utils.config.Configurable +import org.broadinstitute.gatk.queue.extensions.gatk.TaggedFile +import org.broadinstitute.gatk.utils.commandline.{ Gather, Input, Output, _ } + +class VariantRecalibrator(val root: Configurable) extends CommandLineGATK { + def analysis_type = "VariantRecalibrator" + + /** Recalibration mode to employ */ + @Argument(fullName = "mode", shortName = "mode", doc = "Recalibration mode to employ", required = true, exclusiveOf = "", validation = "") + var mode: String = _ + + /** Max number of Gaussians for the positive model */ + @Argument(fullName = "maxGaussians", shortName = "mG", doc = "Max number of Gaussians for the positive model", required = false, exclusiveOf = "", validation = "") + var maxGaussians: Option[Int] = config("maxGaussians") + + /** Max number of Gaussians for the negative model */ + @Argument(fullName = "maxNegativeGaussians", shortName = "mNG", doc = "Max number of Gaussians for the negative model", required = false, exclusiveOf = "", validation = "") + var maxNegativeGaussians: Option[Int] = config("maxNegativeGaussians") + + /** Maximum number of VBEM iterations */ + @Argument(fullName = "maxIterations", shortName = "mI", doc = "Maximum number of VBEM iterations", required = false, exclusiveOf = "", validation = "") + var maxIterations: Option[Int] = config("maxIterations") + + /** Number of k-means iterations */ + @Argument(fullName = "numKMeans", shortName = "nKM", doc = "Number of k-means iterations", required = false, exclusiveOf = "", validation = "") + var numKMeans: Option[Int] = config("numKMeans") + + /** Annotation value divergence threshold (number of standard deviations from the means) */ + @Argument(fullName = "stdThreshold", shortName = "std", doc = "Annotation value divergence threshold (number of standard deviations from the means) ", required = false, exclusiveOf = "", validation = "") + var stdThreshold: Option[Double] = config("stdThreshold") + + /** Format string for stdThreshold */ + @Argument(fullName = "stdThresholdFormat", shortName = "", doc = "Format string for stdThreshold", required = false, exclusiveOf = "", validation = "") + var stdThresholdFormat: String = "%s" + + /** The shrinkage parameter in the variational Bayes algorithm. */ + @Argument(fullName = "shrinkage", shortName = "shrinkage", doc = "The shrinkage parameter in the variational Bayes algorithm.", required = false, exclusiveOf = "", validation = "") + var shrinkage: Option[Double] = config("shrinkage") + + /** Format string for shrinkage */ + @Argument(fullName = "shrinkageFormat", shortName = "", doc = "Format string for shrinkage", required = false, exclusiveOf = "", validation = "") + var shrinkageFormat: String = "%s" + + /** The dirichlet parameter in the variational Bayes algorithm. */ + @Argument(fullName = "dirichlet", shortName = "dirichlet", doc = "The dirichlet parameter in the variational Bayes algorithm.", required = false, exclusiveOf = "", validation = "") + var dirichlet: Option[Double] = config("dirichlet") + + /** Format string for dirichlet */ + @Argument(fullName = "dirichletFormat", shortName = "", doc = "Format string for dirichlet", required = false, exclusiveOf = "", validation = "") + var dirichletFormat: String = "%s" + + /** The number of prior counts to use in the variational Bayes algorithm. */ + @Argument(fullName = "priorCounts", shortName = "priorCounts", doc = "The number of prior counts to use in the variational Bayes algorithm.", required = false, exclusiveOf = "", validation = "") + var priorCounts: Option[Double] = config("priorCounts") + + /** Format string for priorCounts */ + @Argument(fullName = "priorCountsFormat", shortName = "", doc = "Format string for priorCounts", required = false, exclusiveOf = "", validation = "") + var priorCountsFormat: String = "%s" + + /** Maximum number of training data */ + @Argument(fullName = "maxNumTrainingData", shortName = "maxNumTrainingData", doc = "Maximum number of training data", required = false, exclusiveOf = "", validation = "") + var maxNumTrainingData: Option[Int] = config("maxNumTrainingData") + + /** Minimum number of bad variants */ + @Argument(fullName = "minNumBadVariants", shortName = "minNumBad", doc = "Minimum number of bad variants", required = false, exclusiveOf = "", validation = "") + var minNumBadVariants: Option[Int] = config("minNumBadVariants") + + /** LOD score cutoff for selecting bad variants */ + @Argument(fullName = "badLodCutoff", shortName = "badLodCutoff", doc = "LOD score cutoff for selecting bad variants", required = false, exclusiveOf = "", validation = "") + var badLodCutoff: Option[Double] = config("badLodCutoff") + + /** Format string for badLodCutoff */ + @Argument(fullName = "badLodCutoffFormat", shortName = "", doc = "Format string for badLodCutoff", required = false, exclusiveOf = "", validation = "") + var badLodCutoffFormat: String = "%s" + + /** Apply logit transform and jitter to MQ values */ + @Argument(fullName = "MQCapForLogitJitterTransform", shortName = "MQCap", doc = "Apply logit transform and jitter to MQ values", required = false, exclusiveOf = "", validation = "") + var MQCapForLogitJitterTransform: Option[Int] = config("MQCapForLogitJitterTransform") + + /** MQ is by default transformed to log[(MQ_cap + epsilon - MQ)/(MQ + epsilon)] to make it more Gaussian-like. Use this flag to not do that. */ + @Argument(fullName = "no_MQ_logit", shortName = "NoMQLogit", doc = "MQ is by default transformed to log[(MQ_cap + epsilon - MQ)/(MQ + epsilon)] to make it more Gaussian-like. Use this flag to not do that.", required = false, exclusiveOf = "", validation = "") + var no_MQ_logit: Boolean = config("no_MQ_logit", default = false) + + /** Amount of jitter (as a factor to a Normal(0,1) noise) to add to the MQ capped values */ + @Argument(fullName = "MQ_jitter", shortName = "MQJitt", doc = "Amount of jitter (as a factor to a Normal(0,1) noise) to add to the MQ capped values", required = false, exclusiveOf = "", validation = "") + var MQ_jitter: Option[Double] = config("MQ_jitter", default = false) + + /** Format string for MQ_jitter */ + @Argument(fullName = "MQ_jitterFormat", shortName = "", doc = "Format string for MQ_jitter", required = false, exclusiveOf = "", validation = "") + var MQ_jitterFormat: String = "%s" + + /** The raw input variants to be recalibrated */ + @Input(fullName = "input", shortName = "input", doc = "The raw input variants to be recalibrated", required = true, exclusiveOf = "", validation = "") + var input: Seq[File] = Nil + + /** Additional raw input variants to be used in building the model */ + @Input(fullName = "aggregate", shortName = "aggregate", doc = "Additional raw input variants to be used in building the model", required = false, exclusiveOf = "", validation = "") + var aggregate: List[File] = config("aggregate", default = Nil) + + /** A list of sites for which to apply a prior probability of being correct but which aren't used by the algorithm (training and truth sets are required to run) */ + @Input(fullName = "resource", shortName = "resource", doc = "A list of sites for which to apply a prior probability of being correct but which aren't used by the algorithm (training and truth sets are required to run)", required = true, exclusiveOf = "", validation = "") + var resource: List[File] = config("resource", default = Nil) + + /** The output recal file used by ApplyRecalibration */ + @Output(fullName = "recal_file", shortName = "recalFile", doc = "The output recal file used by ApplyRecalibration", required = true, exclusiveOf = "", validation = "") + @Gather(classOf[CatVariantsGatherer]) + var recal_file: File = _ + + /** The output tranches file used by ApplyRecalibration */ + @Output(fullName = "tranches_file", shortName = "tranchesFile", doc = "The output tranches file used by ApplyRecalibration", required = true, exclusiveOf = "", validation = "") + @Gather(classOf[org.broadinstitute.gatk.queue.function.scattergather.SimpleTextGatherFunction]) + var tranches_file: File = _ + + /** The expected novel Ti/Tv ratio to use when calculating FDR tranches and for display on the optimization curve output figures. (approx 2.15 for whole genome experiments). ONLY USED FOR PLOTTING PURPOSES! */ + @Argument(fullName = "target_titv", shortName = "titv", doc = "The expected novel Ti/Tv ratio to use when calculating FDR tranches and for display on the optimization curve output figures. (approx 2.15 for whole genome experiments). ONLY USED FOR PLOTTING PURPOSES!", required = false, exclusiveOf = "", validation = "") + var target_titv: Option[Double] = config("target_titv") + + /** Format string for target_titv */ + @Argument(fullName = "target_titvFormat", shortName = "", doc = "Format string for target_titv", required = false, exclusiveOf = "", validation = "") + var target_titvFormat: String = "%s" + + /** The names of the annotations which should used for calculations */ + @Argument(fullName = "use_annotation", shortName = "an", doc = "The names of the annotations which should used for calculations", required = true, exclusiveOf = "", validation = "") + var use_annotation: List[String] = config("use_annotation", default = Nil) + + /** The levels of truth sensitivity at which to slice the data. (in percent, that is 1.0 for 1 percent) */ + @Argument(fullName = "TStranche", shortName = "tranche", doc = "The levels of truth sensitivity at which to slice the data. (in percent, that is 1.0 for 1 percent)", required = false, exclusiveOf = "", validation = "") + var TStranche: List[Double] = config("TStranche", default = Nil) + + /** If specified, the variant recalibrator will also use variants marked as filtered by the specified filter name in the input VCF file */ + @Argument(fullName = "ignore_filter", shortName = "ignoreFilter", doc = "If specified, the variant recalibrator will also use variants marked as filtered by the specified filter name in the input VCF file", required = false, exclusiveOf = "", validation = "") + var ignore_filter: List[String] = config("ignore_filter", default = Nil) + + /** If specified, the variant recalibrator will ignore all input filters. Useful to rerun the VQSR from a filtered output file. */ + @Argument(fullName = "ignore_all_filters", shortName = "ignoreAllFilters", doc = "If specified, the variant recalibrator will ignore all input filters. Useful to rerun the VQSR from a filtered output file.", required = false, exclusiveOf = "", validation = "") + var ignore_all_filters: Boolean = _ + + /** The output rscript file generated by the VQSR to aid in visualization of the input data and learned model */ + @Output(fullName = "rscript_file", shortName = "rscriptFile", doc = "The output rscript file generated by the VQSR to aid in visualization of the input data and learned model", required = false, exclusiveOf = "", validation = "") + @Gather(classOf[org.broadinstitute.gatk.queue.function.scattergather.SimpleTextGatherFunction]) + var rscript_file: File = _ + + /** Used to debug the random number generation inside the VQSR. Do not use. */ + @Argument(fullName = "replicate", shortName = "replicate", doc = "Used to debug the random number generation inside the VQSR. Do not use.", required = false, exclusiveOf = "", validation = "") + var replicate: Option[Int] = config("replicate") + + /** Trust that all the input training sets' unfiltered records contain only polymorphic sites to drastically speed up the computation. */ + @Argument(fullName = "trustAllPolymorphic", shortName = "allPoly", doc = "Trust that all the input training sets' unfiltered records contain only polymorphic sites to drastically speed up the computation.", required = false, exclusiveOf = "", validation = "") + var trustAllPolymorphic: Boolean = config("trustAllPolymorphic", default = false) + + /** Filter out reads with CIGAR containing the N operator, instead of failing with an error */ + @Argument(fullName = "filter_reads_with_N_cigar", shortName = "filterRNC", doc = "Filter out reads with CIGAR containing the N operator, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_reads_with_N_cigar: Boolean = config("filter_reads_with_N_cigar", default = false) + + /** Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error */ + @Argument(fullName = "filter_mismatching_base_and_quals", shortName = "filterMBQ", doc = "Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_mismatching_base_and_quals: Boolean = config("filter_mismatching_base_and_quals", default = false) + + /** Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error */ + @Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "") + var filter_bases_not_stored: Boolean = config("filter_bases_not_stored", default = false) + + @Output + @Gather(enabled = false) + private var outputIndex: File = _ + + override def beforeGraph() { + super.beforeGraph() + deps ++= input.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig)) + deps ++= aggregate.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig)) + deps ++= resource.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig)) + if (recal_file != null && !org.broadinstitute.gatk.utils.io.IOUtils.isSpecialFile(recal_file)) + outputIndex = VcfUtils.getVcfIndexFile(recal_file) + } + + override def cmdLine = super.cmdLine + + required("-mode", mode, spaceSeparated = true, escape = true, format = "%s") + + optional("-mG", maxGaussians, spaceSeparated = true, escape = true, format = "%s") + + optional("-mNG", maxNegativeGaussians, spaceSeparated = true, escape = true, format = "%s") + + optional("-mI", maxIterations, spaceSeparated = true, escape = true, format = "%s") + + optional("-nKM", numKMeans, spaceSeparated = true, escape = true, format = "%s") + + optional("-std", stdThreshold, spaceSeparated = true, escape = true, format = stdThresholdFormat) + + optional("-shrinkage", shrinkage, spaceSeparated = true, escape = true, format = shrinkageFormat) + + optional("-dirichlet", dirichlet, spaceSeparated = true, escape = true, format = dirichletFormat) + + optional("-priorCounts", priorCounts, spaceSeparated = true, escape = true, format = priorCountsFormat) + + optional("-maxNumTrainingData", maxNumTrainingData, spaceSeparated = true, escape = true, format = "%s") + + optional("-minNumBad", minNumBadVariants, spaceSeparated = true, escape = true, format = "%s") + + optional("-badLodCutoff", badLodCutoff, spaceSeparated = true, escape = true, format = badLodCutoffFormat) + + optional("-MQCap", MQCapForLogitJitterTransform, spaceSeparated = true, escape = true, format = "%s") + + conditional(no_MQ_logit, "-NoMQLogit", escape = true, format = "%s") + + optional("-MQJitt", MQ_jitter, spaceSeparated = true, escape = true, format = MQ_jitterFormat) + + repeat("-input", input, formatPrefix = TaggedFile.formatCommandLineParameter, spaceSeparated = true, escape = true, format = "%s") + + repeat("-aggregate", aggregate, formatPrefix = TaggedFile.formatCommandLineParameter, spaceSeparated = true, escape = true, format = "%s") + + repeat("-resource", resource, formatPrefix = TaggedFile.formatCommandLineParameter, spaceSeparated = true, escape = true, format = "%s") + + required("-recalFile", recal_file, spaceSeparated = true, escape = true, format = "%s") + + required("-tranchesFile", tranches_file, spaceSeparated = true, escape = true, format = "%s") + + optional("-titv", target_titv, spaceSeparated = true, escape = true, format = target_titvFormat) + + repeat("-an", use_annotation, spaceSeparated = true, escape = true, format = "%s") + + repeat("-tranche", TStranche, spaceSeparated = true, escape = true, format = "%s") + + repeat("-ignoreFilter", ignore_filter, spaceSeparated = true, escape = true, format = "%s") + + conditional(ignore_all_filters, "-ignoreAllFilters", escape = true, format = "%s") + + optional("-rscriptFile", rscript_file, spaceSeparated = true, escape = true, format = "%s") + + optional("-replicate", replicate, spaceSeparated = true, escape = true, format = "%s") + + conditional(trustAllPolymorphic, "-allPoly", escape = true, format = "%s") + + conditional(filter_reads_with_N_cigar, "-filterRNC", escape = true, format = "%s") + + conditional(filter_mismatching_base_and_quals, "-filterMBQ", escape = true, format = "%s") + + conditional(filter_bases_not_stored, "-filterNoBases", escape = true, format = "%s") +} diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gmap/GmapBuild.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gmap/GmapBuild.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gmap/GmapBuild.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gmap/GmapBuild.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gmap/Gsnap.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gmap/Gsnap.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gmap/Gsnap.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gmap/Gsnap.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/igvtools/IGVTools.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/igvtools/IGVTools.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/igvtools/IGVTools.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/igvtools/IGVTools.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/igvtools/IGVToolsCount.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/igvtools/IGVToolsCount.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/igvtools/IGVToolsCount.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/igvtools/IGVToolsCount.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/kraken/Kraken.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/kraken/Kraken.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/kraken/Kraken.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/kraken/Kraken.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/kraken/KrakenReport.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/kraken/KrakenReport.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/kraken/KrakenReport.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/kraken/KrakenReport.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/macs2/Macs2.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/macs2/Macs2.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/macs2/Macs2.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/macs2/Macs2.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/macs2/Macs2CallPeak.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/macs2/Macs2CallPeak.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/macs2/Macs2CallPeak.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/macs2/Macs2CallPeak.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/Manwe.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/Manwe.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/Manwe.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/Manwe.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweAnnotateBed.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweAnnotateBed.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweAnnotateBed.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweAnnotateBed.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweAnnotateVcf.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweAnnotateVcf.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweAnnotateVcf.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweAnnotateVcf.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweDataSourcesAnnotate.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweDataSourcesAnnotate.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweDataSourcesAnnotate.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweDataSourcesAnnotate.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweDataSourcesDownload.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweDataSourcesDownload.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweDataSourcesDownload.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweDataSourcesDownload.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweDataSourcesList.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweDataSourcesList.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweDataSourcesList.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweDataSourcesList.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweDataSourcesShow.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweDataSourcesShow.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweDataSourcesShow.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweDataSourcesShow.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesActivate.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesActivate.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesActivate.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesActivate.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesAdd.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesAdd.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesAdd.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesAdd.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesAnnotateVariations.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesAnnotateVariations.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesAnnotateVariations.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesAnnotateVariations.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesImport.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesImport.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesImport.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesImport.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesImportBed.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesImportBed.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesImportBed.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesImportBed.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesImportVcf.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesImportVcf.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesImportVcf.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesImportVcf.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesList.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesList.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesList.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesList.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesShow.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesShow.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesShow.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/ManweSamplesShow.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/AddOrReplaceReadGroups.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/AddOrReplaceReadGroups.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/AddOrReplaceReadGroups.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/AddOrReplaceReadGroups.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/BedToIntervalList.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/BedToIntervalList.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/BedToIntervalList.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/BedToIntervalList.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/BuildBamIndex.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/BuildBamIndex.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/BuildBamIndex.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/BuildBamIndex.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CalculateHsMetrics.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CalculateHsMetrics.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CalculateHsMetrics.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CalculateHsMetrics.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectAlignmentSummaryMetrics.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectAlignmentSummaryMetrics.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectAlignmentSummaryMetrics.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectAlignmentSummaryMetrics.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectGcBiasMetrics.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectGcBiasMetrics.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectGcBiasMetrics.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectGcBiasMetrics.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectInsertSizeMetrics.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectInsertSizeMetrics.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectInsertSizeMetrics.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectInsertSizeMetrics.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectMultipleMetrics.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectMultipleMetrics.scala similarity index 99% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectMultipleMetrics.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectMultipleMetrics.scala index fed464a7391ad3f618e3755c2b8addc3cfb608b1..f39300d8d0a4dbd57f80d373a7592f41b76bb45e 100644 --- a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectMultipleMetrics.scala +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectMultipleMetrics.scala @@ -54,6 +54,9 @@ class CollectMultipleMetrics(val root: Configurable) extends Picard with Summari @Argument(doc = "Stop after processing N reads", required = false) var stopAfter: Option[Long] = config("stop_after") + @Output + private var outputFiles: List[File] = Nil + override def beforeGraph(): Unit = { super.beforeGraph() if (reference == null) reference = referenceFasta() diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectRnaSeqMetrics.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectRnaSeqMetrics.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectRnaSeqMetrics.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectRnaSeqMetrics.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectTargetedPcrMetrics.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectTargetedPcrMetrics.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectTargetedPcrMetrics.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectTargetedPcrMetrics.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectWgsMetrics.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectWgsMetrics.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectWgsMetrics.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectWgsMetrics.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CreateSequenceDictionary.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CreateSequenceDictionary.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CreateSequenceDictionary.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CreateSequenceDictionary.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/GatherBamFiles.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/GatherBamFiles.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/GatherBamFiles.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/GatherBamFiles.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/MarkDuplicates.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/MarkDuplicates.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/MarkDuplicates.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/MarkDuplicates.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/MergeSamFiles.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/MergeSamFiles.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/MergeSamFiles.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/MergeSamFiles.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/Picard.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/Picard.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/Picard.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/Picard.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/ReorderSam.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/ReorderSam.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/ReorderSam.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/ReorderSam.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/SamToFastq.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/SamToFastq.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/SamToFastq.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/SamToFastq.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/SortSam.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/SortSam.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/SortSam.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/SortSam.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/SortVcf.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/SortVcf.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/SortVcf.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/SortVcf.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelCaller.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelCaller.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelCaller.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelCaller.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelConfig.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelConfig.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelConfig.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelConfig.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelVCF.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelVCF.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelVCF.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelVCF.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/AssignTaxonomy.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/AssignTaxonomy.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/AssignTaxonomy.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/AssignTaxonomy.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/MergeOtuMaps.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/MergeOtuMaps.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/MergeOtuMaps.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/MergeOtuMaps.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/MergeOtuTables.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/MergeOtuTables.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/MergeOtuTables.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/MergeOtuTables.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/PickClosedReferenceOtus.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/PickClosedReferenceOtus.scala similarity index 95% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/PickClosedReferenceOtus.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/PickClosedReferenceOtus.scala index 07fef8aef1ee831aa258555b2358660a396dea69..16c65021d0a33d5ab89915c17211b959782aaa56 100644 --- a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/PickClosedReferenceOtus.scala +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/PickClosedReferenceOtus.scala @@ -19,7 +19,7 @@ import java.io.File import nl.lumc.sasc.biopet.core.{ BiopetCommandLineFunction, Version } import nl.lumc.sasc.biopet.utils.config.Configurable -import org.broadinstitute.gatk.utils.commandline.Input +import org.broadinstitute.gatk.utils.commandline.{ Input, Output } /** * Created by pjvan_thof on 12/4/15. @@ -54,6 +54,9 @@ class PickClosedReferenceOtus(val root: Configurable) extends BiopetCommandLineF def otuTable = new File(outputDir, "otu_table.biom") def otuMap = new File(outputDir, "uclust_ref_picked_otus" + File.separator + "seqs_otus.txt") + @Output + private var outputFiles: List[File] = Nil + override def beforeGraph(): Unit = { super.beforeGraph() jobOutputFile = new File(outputDir, ".std.out") diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/PickOtus.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/PickOtus.scala similarity index 97% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/PickOtus.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/PickOtus.scala index 744c52e29c8f1f9a53c166648d09cad6ae25f3a4..d0a0b235516bc9793398a8ee79023d69066cffdd 100644 --- a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/PickOtus.scala +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/PickOtus.scala @@ -17,9 +17,9 @@ package nl.lumc.sasc.biopet.extensions.qiime import java.io.File -import nl.lumc.sasc.biopet.core.{ Version, BiopetCommandLineFunction } +import nl.lumc.sasc.biopet.core.{ BiopetCommandLineFunction, Version } import nl.lumc.sasc.biopet.utils.config.Configurable -import org.broadinstitute.gatk.utils.commandline.Input +import org.broadinstitute.gatk.utils.commandline.{ Input, Output } /** * Created by pjvan_thof on 12/4/15. @@ -98,6 +98,9 @@ class PickOtus(val root: Configurable) extends BiopetCommandLineFunction with Ve def logFile = new File(outputDir, s"${name}_otus.log") def otusTxt = new File(outputDir, s"${name}_otus.txt") + @Output + private var outputFiles: List[File] = Nil + override def beforeGraph(): Unit = { super.beforeGraph() outputFiles :+= clustersFile diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/PickRepSet.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/PickRepSet.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/PickRepSet.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/PickRepSet.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/SplitLibrariesFastq.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/SplitLibrariesFastq.scala similarity index 94% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/SplitLibrariesFastq.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/SplitLibrariesFastq.scala index d9295dee037381a4ff0504f0a7bf465cebd0f6b7..ce159b70ff3424a0eb0777f3995e4952a5ac562c 100644 --- a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/SplitLibrariesFastq.scala +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/SplitLibrariesFastq.scala @@ -17,9 +17,9 @@ package nl.lumc.sasc.biopet.extensions.qiime import java.io.File -import nl.lumc.sasc.biopet.core.{ Version, BiopetCommandLineFunction } +import nl.lumc.sasc.biopet.core.{ BiopetCommandLineFunction, Version } import nl.lumc.sasc.biopet.utils.config.Configurable -import org.broadinstitute.gatk.utils.commandline.Input +import org.broadinstitute.gatk.utils.commandline.{ Input, Output } /** * Created by pjvan_thof on 12/10/15. @@ -56,13 +56,16 @@ class SplitLibrariesFastq(val root: Configurable) extends BiopetCommandLineFunct def outputSeqs = new File(outputDir, "seqs.fna") + @Output + private var _outputSeqs: File = _ + override def defaultCoreMemory = 4.0 override def beforeGraph(): Unit = { super.beforeGraph() require(input.nonEmpty) require(outputDir != null) - outputFiles :+= outputSeqs + _outputSeqs = outputSeqs } def cmdLine = executable + diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/Sambamba.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/Sambamba.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/Sambamba.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/Sambamba.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaFlagstat.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaFlagstat.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaFlagstat.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaFlagstat.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaIndex.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaIndex.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaIndex.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaIndex.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaMarkdup.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaMarkdup.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaMarkdup.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaMarkdup.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaMerge.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaMerge.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaMerge.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaMerge.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaView.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaView.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaView.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/sambamba/SambambaView.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/FixMpileup.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/FixMpileup.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/FixMpileup.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/FixMpileup.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/Samtools.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/Samtools.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/Samtools.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/Samtools.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsFaidx.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsFaidx.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsFaidx.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsFaidx.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsFlagstat.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsFlagstat.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsFlagstat.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsFlagstat.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsMpileup.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsMpileup.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsMpileup.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsMpileup.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsSort.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsSort.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsSort.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsSort.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsView.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsView.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsView.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsView.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/seqtk/Seqtk.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/seqtk/Seqtk.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/seqtk/Seqtk.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/seqtk/Seqtk.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/seqtk/SeqtkSeq.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/seqtk/SeqtkSeq.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/seqtk/SeqtkSeq.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/seqtk/SeqtkSeq.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/varscan/FixMpileup.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/varscan/FixMpileup.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/varscan/FixMpileup.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/varscan/FixMpileup.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/varscan/Varscan.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/varscan/Varscan.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/varscan/Varscan.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/varscan/Varscan.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/varscan/VarscanMpileup2cns.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/varscan/VarscanMpileup2cns.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/varscan/VarscanMpileup2cns.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/varscan/VarscanMpileup2cns.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/vt/Vt.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/vt/Vt.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/vt/Vt.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/vt/Vt.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/vt/VtDecompose.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/vt/VtDecompose.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/vt/VtDecompose.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/vt/VtDecompose.scala diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/vt/VtNormalize.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/vt/VtNormalize.scala similarity index 100% rename from public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/vt/VtNormalize.scala rename to biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/vt/VtNormalize.scala diff --git a/public/biopet-extensions/src/test/resources/log4j.properties b/biopet-extensions/src/test/resources/log4j.properties similarity index 100% rename from public/biopet-extensions/src/test/resources/log4j.properties rename to biopet-extensions/src/test/resources/log4j.properties diff --git a/public/biopet-extensions/src/test/resources/nl/lumc/sasc/biopet/extensions/picard/picard.alignmentMetrics b/biopet-extensions/src/test/resources/nl/lumc/sasc/biopet/extensions/picard/picard.alignmentMetrics similarity index 100% rename from public/biopet-extensions/src/test/resources/nl/lumc/sasc/biopet/extensions/picard/picard.alignmentMetrics rename to biopet-extensions/src/test/resources/nl/lumc/sasc/biopet/extensions/picard/picard.alignmentMetrics diff --git a/public/biopet-extensions/src/test/resources/nl/lumc/sasc/biopet/extensions/picard/picard.dedup.metrics b/biopet-extensions/src/test/resources/nl/lumc/sasc/biopet/extensions/picard/picard.dedup.metrics similarity index 100% rename from public/biopet-extensions/src/test/resources/nl/lumc/sasc/biopet/extensions/picard/picard.dedup.metrics rename to biopet-extensions/src/test/resources/nl/lumc/sasc/biopet/extensions/picard/picard.dedup.metrics diff --git a/public/biopet-extensions/src/test/resources/nl/lumc/sasc/biopet/extensions/picard/picard.insertsizemetrics b/biopet-extensions/src/test/resources/nl/lumc/sasc/biopet/extensions/picard/picard.insertsizemetrics similarity index 100% rename from public/biopet-extensions/src/test/resources/nl/lumc/sasc/biopet/extensions/picard/picard.insertsizemetrics rename to biopet-extensions/src/test/resources/nl/lumc/sasc/biopet/extensions/picard/picard.insertsizemetrics diff --git a/public/biopet-extensions/src/test/resources/vep.metrics b/biopet-extensions/src/test/resources/vep.metrics similarity index 100% rename from public/biopet-extensions/src/test/resources/vep.metrics rename to biopet-extensions/src/test/resources/vep.metrics diff --git a/public/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/BcfToolsTest.scala b/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/BcfToolsTest.scala similarity index 100% rename from public/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/BcfToolsTest.scala rename to biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/BcfToolsTest.scala diff --git a/public/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/GsnapTest.scala b/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/GsnapTest.scala similarity index 100% rename from public/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/GsnapTest.scala rename to biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/GsnapTest.scala diff --git a/public/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/HtseqCountTest.scala b/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/HtseqCountTest.scala similarity index 100% rename from public/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/HtseqCountTest.scala rename to biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/HtseqCountTest.scala diff --git a/public/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/LnTest.scala b/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/LnTest.scala similarity index 100% rename from public/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/LnTest.scala rename to biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/LnTest.scala diff --git a/public/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/ManweTest.scala b/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/ManweTest.scala similarity index 100% rename from public/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/ManweTest.scala rename to biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/ManweTest.scala diff --git a/public/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/VariantEffectPredictorTest.scala b/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/VariantEffectPredictorTest.scala similarity index 100% rename from public/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/VariantEffectPredictorTest.scala rename to biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/VariantEffectPredictorTest.scala diff --git a/public/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/picard/CollectAlignmentSummaryMetricsTest.scala b/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/picard/CollectAlignmentSummaryMetricsTest.scala similarity index 100% rename from public/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/picard/CollectAlignmentSummaryMetricsTest.scala rename to biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/picard/CollectAlignmentSummaryMetricsTest.scala diff --git a/public/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/picard/CollectInsertSizeMetricsTest.scala b/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/picard/CollectInsertSizeMetricsTest.scala similarity index 100% rename from public/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/picard/CollectInsertSizeMetricsTest.scala rename to biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/picard/CollectInsertSizeMetricsTest.scala diff --git a/public/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/picard/MarkDuplicatesTest.scala b/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/picard/MarkDuplicatesTest.scala similarity index 100% rename from public/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/picard/MarkDuplicatesTest.scala rename to biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/picard/MarkDuplicatesTest.scala diff --git a/public/bam2wig/.gitignore b/biopet-package/.gitignore similarity index 100% rename from public/bam2wig/.gitignore rename to biopet-package/.gitignore diff --git a/public/biopet-public-package/pom.xml b/biopet-package/pom.xml similarity index 97% rename from public/biopet-public-package/pom.xml rename to biopet-package/pom.xml index 2272ea90129dd466c9eeaf09dad4a244b2a97965..9aa9e059fac9138178e193b0c8a60eca3dd12c63 100644 --- a/public/biopet-public-package/pom.xml +++ b/biopet-package/pom.xml @@ -19,7 +19,7 @@ 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> - <artifactId>BiopetPublicPackage</artifactId> + <artifactId>BiopetPackage</artifactId> <packaging>jar</packaging> <parent> @@ -30,12 +30,12 @@ </parent> <inceptionYear>2014</inceptionYear> - <name>BiopetPublicPackage</name> + <name>BiopetPackage</name> <url>http://maven.apache.org</url> <properties> <sting.shade.phase>package</sting.shade.phase> - <app.main.class>nl.lumc.sasc.biopet.BiopetExecutablePublic</app.main.class> + <app.main.class>nl.lumc.sasc.biopet.BiopetExecutableMain</app.main.class> </properties> <dependencies> diff --git a/public/biopet-public-package/src/main/scala/nl/lumc/sasc/biopet/BiopetExecutablePublic.scala b/biopet-package/src/main/scala/nl/lumc/sasc/biopet/BiopetExecutableMain.scala similarity index 81% rename from public/biopet-public-package/src/main/scala/nl/lumc/sasc/biopet/BiopetExecutablePublic.scala rename to biopet-package/src/main/scala/nl/lumc/sasc/biopet/BiopetExecutableMain.scala index 8b21fd806b6ed32cf81d02f7adce43bad41e2562..3fe224735e6541f5b8280a1e56bd11572f4d3ffe 100644 --- a/public/biopet-public-package/src/main/scala/nl/lumc/sasc/biopet/BiopetExecutablePublic.scala +++ b/biopet-package/src/main/scala/nl/lumc/sasc/biopet/BiopetExecutableMain.scala @@ -15,11 +15,10 @@ */ package nl.lumc.sasc.biopet -import nl.lumc.sasc.biopet.pipelines.shiva.ShivaVariantcalling import nl.lumc.sasc.biopet.utils.{ BiopetExecutable, MainCommand } -object BiopetExecutablePublic extends BiopetExecutable { - def publicPipelines: List[MainCommand] = List( +object BiopetExecutableMain extends BiopetExecutable { + def pipelines: List[MainCommand] = List( nl.lumc.sasc.biopet.pipelines.flexiprep.Flexiprep, nl.lumc.sasc.biopet.pipelines.mapping.Mapping, nl.lumc.sasc.biopet.pipelines.mapping.MultisampleMapping, @@ -33,14 +32,11 @@ object BiopetExecutablePublic extends BiopetExecutable { nl.lumc.sasc.biopet.pipelines.shiva.ShivaSvCalling, nl.lumc.sasc.biopet.pipelines.gears.GearsSingle, nl.lumc.sasc.biopet.pipelines.gears.Gears, - nl.lumc.sasc.biopet.pipelines.gwastest.GwasTest + nl.lumc.sasc.biopet.pipelines.gwastest.GwasTest, + nl.lumc.sasc.biopet.pipelines.shiva.ShivaVariantcalling, + nl.lumc.sasc.biopet.pipelines.basty.Basty, + nl.lumc.sasc.biopet.pipelines.shiva.Shiva ) - def pipelines: List[MainCommand] = List( - nl.lumc.sasc.biopet.pipelines.shiva.Shiva, - ShivaVariantcalling, - nl.lumc.sasc.biopet.pipelines.basty.Basty - ) ::: publicPipelines - def tools: List[MainCommand] = BiopetToolsExecutable.tools } diff --git a/public/biopet-public-package/src/test/resources/log4j.properties b/biopet-package/src/test/resources/log4j.properties similarity index 100% rename from public/biopet-public-package/src/test/resources/log4j.properties rename to biopet-package/src/test/resources/log4j.properties diff --git a/public/biopet-tools-extensions/pom.xml b/biopet-tools-extensions/pom.xml similarity index 100% rename from public/biopet-tools-extensions/pom.xml rename to biopet-tools-extensions/pom.xml diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/BaseCounter.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/BaseCounter.scala similarity index 99% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/BaseCounter.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/BaseCounter.scala index 751053b55bac3e60c09e0b3c0566648cbe997f49..5b23f6d047df7d13f0f2c492720a4a332c8b5b87 100644 --- a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/BaseCounter.scala +++ b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/BaseCounter.scala @@ -75,6 +75,9 @@ class BaseCounter(val root: Configurable) extends ToolCommandFunction { def strandedSenseMetaExonCounts = new File(outputDir, s"$prefix.base.metaexons.stranded.sense.counts") def strandedAntiSenseMetaExonCounts = new File(outputDir, s"$prefix.base.metaexons.stranded.antisense.counts") + @Output + private var outputFiles: List[File] = Nil + override def beforeGraph(): Unit = { outputFiles ++= List(transcriptTotalCounts, transcriptTotalSenseCounts, transcriptTotalAntiSenseCounts, transcriptExonicCounts, transcriptExonicSenseCounts, transcriptExonicAntiSenseCounts, diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/BastyGenerateFasta.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/BastyGenerateFasta.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/BastyGenerateFasta.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/BastyGenerateFasta.scala diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/BedToInterval.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/BedToInterval.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/BedToInterval.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/BedToInterval.scala diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/BedtoolsCoverageToCounts.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/BedtoolsCoverageToCounts.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/BedtoolsCoverageToCounts.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/BedtoolsCoverageToCounts.scala diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/BiopetFlagstat.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/BiopetFlagstat.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/BiopetFlagstat.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/BiopetFlagstat.scala diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/FastqSplitter.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/FastqSplitter.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/FastqSplitter.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/FastqSplitter.scala diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/FastqSync.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/FastqSync.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/FastqSync.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/FastqSync.scala diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/GensToVcf.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/GensToVcf.scala similarity index 90% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/GensToVcf.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/GensToVcf.scala index 10e5eca751baceeb659e3f602efa0fdc5093b9d0..8ceed9500621b7659b9907a66b6892532ea1137a 100644 --- a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/GensToVcf.scala +++ b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/GensToVcf.scala @@ -18,9 +18,9 @@ package nl.lumc.sasc.biopet.extensions.tools import java.io.File import nl.lumc.sasc.biopet.core.{ Reference, ToolCommandFunction } -import nl.lumc.sasc.biopet.utils.Logging +import nl.lumc.sasc.biopet.utils.{ Logging, VcfUtils } import nl.lumc.sasc.biopet.utils.config.Configurable -import org.broadinstitute.gatk.utils.commandline.{ Output, Input } +import org.broadinstitute.gatk.utils.commandline.{ Input, Output } /** * @@ -49,11 +49,14 @@ class GensToVcf(val root: Configurable) extends ToolCommandFunction with Referen override def defaultCoreMemory = 6.0 + @Output + private var outputIndex: File = _ + override def beforeGraph(): Unit = { super.beforeGraph() if (reference == null) reference = referenceFasta() if (contig == null) throw new IllegalStateException("Contig is missing") - if (outputVcf.getName.endsWith(".vcf.gz")) outputFiles :+= new File(outputVcf.getAbsolutePath + ".tbi") + outputIndex = VcfUtils.getVcfIndexFile(outputVcf) } override def setupRetry(): Unit = { diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/GvcfToBed.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/GvcfToBed.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/GvcfToBed.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/GvcfToBed.scala diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/KrakenReportToJson.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/KrakenReportToJson.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/KrakenReportToJson.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/KrakenReportToJson.scala diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/MergeAlleles.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/MergeAlleles.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/MergeAlleles.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/MergeAlleles.scala diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/MergeOtuMaps.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/MergeOtuMaps.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/MergeOtuMaps.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/MergeOtuMaps.scala diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/MergeTables.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/MergeTables.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/MergeTables.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/MergeTables.scala diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/MpileupToVcf.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/MpileupToVcf.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/MpileupToVcf.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/MpileupToVcf.scala diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/PrefixFastq.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/PrefixFastq.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/PrefixFastq.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/PrefixFastq.scala diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/SageCountFastq.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/SageCountFastq.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/SageCountFastq.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/SageCountFastq.scala diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/SageCreateLibrary.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/SageCreateLibrary.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/SageCreateLibrary.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/SageCreateLibrary.scala diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/SageCreateTagCounts.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/SageCreateTagCounts.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/SageCreateTagCounts.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/SageCreateTagCounts.scala diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/SeqStat.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/SeqStat.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/SeqStat.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/SeqStat.scala diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/SnptestToVcf.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/SnptestToVcf.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/SnptestToVcf.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/SnptestToVcf.scala diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/SquishBed.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/SquishBed.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/SquishBed.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/SquishBed.scala diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/ValidateFastq.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/ValidateFastq.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/ValidateFastq.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/ValidateFastq.scala diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/VcfFilter.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/VcfFilter.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/VcfFilter.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/VcfFilter.scala diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/VcfStats.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/VcfStats.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/VcfStats.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/VcfStats.scala diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/VcfWithVcf.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/VcfWithVcf.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/VcfWithVcf.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/VcfWithVcf.scala diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/VepNormalizer.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/VepNormalizer.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/VepNormalizer.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/VepNormalizer.scala diff --git a/public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/WipeReads.scala b/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/WipeReads.scala similarity index 100% rename from public/biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/WipeReads.scala rename to biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/WipeReads.scala diff --git a/public/biopet-tools-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/tools/VcfFilterTest.scala b/biopet-tools-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/tools/VcfFilterTest.scala similarity index 100% rename from public/biopet-tools-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/tools/VcfFilterTest.scala rename to biopet-tools-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/tools/VcfFilterTest.scala diff --git a/public/biopet-tools-package/pom.xml b/biopet-tools-package/pom.xml similarity index 100% rename from public/biopet-tools-package/pom.xml rename to biopet-tools-package/pom.xml diff --git a/public/biopet-tools-package/src/main/scala/nl/lumc/sasc/biopet/BiopetToolsExecutable.scala b/biopet-tools-package/src/main/scala/nl/lumc/sasc/biopet/BiopetToolsExecutable.scala similarity index 100% rename from public/biopet-tools-package/src/main/scala/nl/lumc/sasc/biopet/BiopetToolsExecutable.scala rename to biopet-tools-package/src/main/scala/nl/lumc/sasc/biopet/BiopetToolsExecutable.scala diff --git a/public/biopet-tools/pom.xml b/biopet-tools/pom.xml similarity index 100% rename from public/biopet-tools/pom.xml rename to biopet-tools/pom.xml diff --git a/public/biopet-tools/src/main/resources/log4j.properties b/biopet-tools/src/main/resources/log4j.properties similarity index 100% rename from public/biopet-tools/src/main/resources/log4j.properties rename to biopet-tools/src/main/resources/log4j.properties diff --git a/public/biopet-tools/src/main/resources/nl/lumc/sasc/biopet/tools/plotHeatmap.R b/biopet-tools/src/main/resources/nl/lumc/sasc/biopet/tools/plotHeatmap.R similarity index 100% rename from public/biopet-tools/src/main/resources/nl/lumc/sasc/biopet/tools/plotHeatmap.R rename to biopet-tools/src/main/resources/nl/lumc/sasc/biopet/tools/plotHeatmap.R diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/AnnotateVcfWithBed.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/AnnotateVcfWithBed.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/AnnotateVcfWithBed.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/AnnotateVcfWithBed.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/BaseCounter.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/BaseCounter.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/BaseCounter.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/BaseCounter.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/BastyGenerateFasta.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/BastyGenerateFasta.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/BastyGenerateFasta.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/BastyGenerateFasta.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/BedToInterval.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/BedToInterval.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/BedToInterval.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/BedToInterval.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/BedtoolsCoverageToCounts.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/BedtoolsCoverageToCounts.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/BedtoolsCoverageToCounts.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/BedtoolsCoverageToCounts.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/BiopetFlagstat.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/BiopetFlagstat.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/BiopetFlagstat.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/BiopetFlagstat.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/CheckAllelesVcfInBam.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/CheckAllelesVcfInBam.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/CheckAllelesVcfInBam.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/CheckAllelesVcfInBam.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/ExtractAlignedFastq.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/ExtractAlignedFastq.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/ExtractAlignedFastq.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/ExtractAlignedFastq.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/FastqSplitter.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/FastqSplitter.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/FastqSplitter.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/FastqSplitter.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/FastqSync.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/FastqSync.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/FastqSync.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/FastqSync.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/FindRepeatsPacBio.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/FindRepeatsPacBio.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/FindRepeatsPacBio.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/FindRepeatsPacBio.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/GensToVcf.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/GensToVcf.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/GensToVcf.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/GensToVcf.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/GvcfToBed.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/GvcfToBed.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/GvcfToBed.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/GvcfToBed.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/KrakenReportToJson.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/KrakenReportToJson.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/KrakenReportToJson.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/KrakenReportToJson.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/MergeAlleles.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/MergeAlleles.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/MergeAlleles.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/MergeAlleles.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/MergeOtuMaps.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/MergeOtuMaps.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/MergeOtuMaps.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/MergeOtuMaps.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/MergeTables.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/MergeTables.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/MergeTables.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/MergeTables.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/MpileupToVcf.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/MpileupToVcf.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/MpileupToVcf.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/MpileupToVcf.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/PrefixFastq.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/PrefixFastq.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/PrefixFastq.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/PrefixFastq.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/RegionAfCount.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/RegionAfCount.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/RegionAfCount.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/RegionAfCount.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SageCountFastq.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SageCountFastq.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SageCountFastq.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SageCountFastq.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SageCreateLibrary.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SageCreateLibrary.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SageCreateLibrary.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SageCreateLibrary.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SageCreateTagCounts.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SageCreateTagCounts.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SageCreateTagCounts.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SageCreateTagCounts.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SamplesTsvToJson.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SamplesTsvToJson.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SamplesTsvToJson.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SamplesTsvToJson.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SeqStat.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SeqStat.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SeqStat.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SeqStat.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SnptestToVcf.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SnptestToVcf.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SnptestToVcf.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SnptestToVcf.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SquishBed.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SquishBed.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SquishBed.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SquishBed.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SummaryToTsv.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SummaryToTsv.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SummaryToTsv.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SummaryToTsv.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/ValidateFastq.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/ValidateFastq.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/ValidateFastq.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/ValidateFastq.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/VcfFilter.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/VcfFilter.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/VcfFilter.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/VcfFilter.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/VcfStats.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/VcfStats.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/VcfStats.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/VcfStats.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/VcfToTsv.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/VcfToTsv.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/VcfToTsv.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/VcfToTsv.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/VcfWithVcf.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/VcfWithVcf.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/VcfWithVcf.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/VcfWithVcf.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/VepNormalizer.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/VepNormalizer.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/VepNormalizer.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/VepNormalizer.scala diff --git a/public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/WipeReads.scala b/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/WipeReads.scala similarity index 100% rename from public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/WipeReads.scala rename to biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/WipeReads.scala diff --git a/public/biopet-tools/src/test/resources/README.txt b/biopet-tools/src/test/resources/README.txt similarity index 100% rename from public/biopet-tools/src/test/resources/README.txt rename to biopet-tools/src/test/resources/README.txt diff --git a/public/biopet-tools/src/test/resources/VCFv3.vcf b/biopet-tools/src/test/resources/VCFv3.vcf similarity index 100% rename from public/biopet-tools/src/test/resources/VCFv3.vcf rename to biopet-tools/src/test/resources/VCFv3.vcf diff --git a/public/biopet-tools/src/test/resources/VEP_oneline.vcf b/biopet-tools/src/test/resources/VEP_oneline.vcf similarity index 100% rename from public/biopet-tools/src/test/resources/VEP_oneline.vcf rename to biopet-tools/src/test/resources/VEP_oneline.vcf diff --git a/public/biopet-tools/src/test/resources/VEP_oneline.vcf.gz b/biopet-tools/src/test/resources/VEP_oneline.vcf.gz similarity index 100% rename from public/biopet-tools/src/test/resources/VEP_oneline.vcf.gz rename to biopet-tools/src/test/resources/VEP_oneline.vcf.gz diff --git a/public/biopet-tools/src/test/resources/VEP_oneline.vcf.gz.tbi b/biopet-tools/src/test/resources/VEP_oneline.vcf.gz.tbi similarity index 100% rename from public/biopet-tools/src/test/resources/VEP_oneline.vcf.gz.tbi rename to biopet-tools/src/test/resources/VEP_oneline.vcf.gz.tbi diff --git a/public/biopet-tools/src/test/resources/chrQ.refflat b/biopet-tools/src/test/resources/chrQ.refflat similarity index 100% rename from public/biopet-tools/src/test/resources/chrQ.refflat rename to biopet-tools/src/test/resources/chrQ.refflat diff --git a/public/biopet-tools/src/test/resources/chrQ.vcf b/biopet-tools/src/test/resources/chrQ.vcf similarity index 100% rename from public/biopet-tools/src/test/resources/chrQ.vcf rename to biopet-tools/src/test/resources/chrQ.vcf diff --git a/public/biopet-tools/src/test/resources/chrQ.vcf.gz b/biopet-tools/src/test/resources/chrQ.vcf.gz similarity index 100% rename from public/biopet-tools/src/test/resources/chrQ.vcf.gz rename to biopet-tools/src/test/resources/chrQ.vcf.gz diff --git a/public/biopet-tools/src/test/resources/chrQ.vcf.gz.tbi b/biopet-tools/src/test/resources/chrQ.vcf.gz.tbi similarity index 100% rename from public/biopet-tools/src/test/resources/chrQ.vcf.gz.tbi rename to biopet-tools/src/test/resources/chrQ.vcf.gz.tbi diff --git a/public/biopet-tools/src/test/resources/chrQ2.vcf b/biopet-tools/src/test/resources/chrQ2.vcf similarity index 100% rename from public/biopet-tools/src/test/resources/chrQ2.vcf rename to biopet-tools/src/test/resources/chrQ2.vcf diff --git a/public/biopet-tools/src/test/resources/chrQ2.vcf.gz b/biopet-tools/src/test/resources/chrQ2.vcf.gz similarity index 100% rename from public/biopet-tools/src/test/resources/chrQ2.vcf.gz rename to biopet-tools/src/test/resources/chrQ2.vcf.gz diff --git a/public/biopet-tools/src/test/resources/chrQ2.vcf.gz.tbi b/biopet-tools/src/test/resources/chrQ2.vcf.gz.tbi similarity index 100% rename from public/biopet-tools/src/test/resources/chrQ2.vcf.gz.tbi rename to biopet-tools/src/test/resources/chrQ2.vcf.gz.tbi diff --git a/public/biopet-tools/src/test/resources/chrQ_allN.fa b/biopet-tools/src/test/resources/chrQ_allN.fa similarity index 100% rename from public/biopet-tools/src/test/resources/chrQ_allN.fa rename to biopet-tools/src/test/resources/chrQ_allN.fa diff --git a/public/biopet-tools/src/test/resources/chrQ_allN.fa.fai b/biopet-tools/src/test/resources/chrQ_allN.fa.fai similarity index 100% rename from public/biopet-tools/src/test/resources/chrQ_allN.fa.fai rename to biopet-tools/src/test/resources/chrQ_allN.fa.fai diff --git a/public/biopet-tools/src/test/resources/empty.bai b/biopet-tools/src/test/resources/empty.bai similarity index 100% rename from public/biopet-tools/src/test/resources/empty.bai rename to biopet-tools/src/test/resources/empty.bai diff --git a/public/biopet-tools/src/test/resources/empty.bam b/biopet-tools/src/test/resources/empty.bam similarity index 100% rename from public/biopet-tools/src/test/resources/empty.bam rename to biopet-tools/src/test/resources/empty.bam diff --git a/public/biopet-tools/src/test/resources/fake_chrQ.dict b/biopet-tools/src/test/resources/fake_chrQ.dict similarity index 100% rename from public/biopet-tools/src/test/resources/fake_chrQ.dict rename to biopet-tools/src/test/resources/fake_chrQ.dict diff --git a/public/biopet-tools/src/test/resources/fake_chrQ.fa b/biopet-tools/src/test/resources/fake_chrQ.fa similarity index 100% rename from public/biopet-tools/src/test/resources/fake_chrQ.fa rename to biopet-tools/src/test/resources/fake_chrQ.fa diff --git a/public/biopet-tools/src/test/resources/fake_chrQ.fa.fai b/biopet-tools/src/test/resources/fake_chrQ.fa.fai similarity index 100% rename from public/biopet-tools/src/test/resources/fake_chrQ.fa.fai rename to biopet-tools/src/test/resources/fake_chrQ.fa.fai diff --git a/public/biopet-tools/src/test/resources/flagstat_crossreport.txt b/biopet-tools/src/test/resources/flagstat_crossreport.txt similarity index 100% rename from public/biopet-tools/src/test/resources/flagstat_crossreport.txt rename to biopet-tools/src/test/resources/flagstat_crossreport.txt diff --git a/public/biopet-tools/src/test/resources/flagstat_crosstrue.txt b/biopet-tools/src/test/resources/flagstat_crosstrue.txt similarity index 100% rename from public/biopet-tools/src/test/resources/flagstat_crosstrue.txt rename to biopet-tools/src/test/resources/flagstat_crosstrue.txt diff --git a/public/biopet-tools/src/test/resources/flagstat_report.txt b/biopet-tools/src/test/resources/flagstat_report.txt similarity index 100% rename from public/biopet-tools/src/test/resources/flagstat_report.txt rename to biopet-tools/src/test/resources/flagstat_report.txt diff --git a/public/biopet-tools/src/test/resources/flagstat_summary.txt b/biopet-tools/src/test/resources/flagstat_summary.txt similarity index 100% rename from public/biopet-tools/src/test/resources/flagstat_summary.txt rename to biopet-tools/src/test/resources/flagstat_summary.txt diff --git a/public/biopet-tools/src/test/resources/gens.samples b/biopet-tools/src/test/resources/gens.samples similarity index 100% rename from public/biopet-tools/src/test/resources/gens.samples rename to biopet-tools/src/test/resources/gens.samples diff --git a/public/biopet-tools/src/test/resources/log4j.properties b/biopet-tools/src/test/resources/log4j.properties similarity index 100% rename from public/biopet-tools/src/test/resources/log4j.properties rename to biopet-tools/src/test/resources/log4j.properties diff --git a/public/biopet-tools/src/test/resources/mini.transcriptome.fa b/biopet-tools/src/test/resources/mini.transcriptome.fa similarity index 100% rename from public/biopet-tools/src/test/resources/mini.transcriptome.fa rename to biopet-tools/src/test/resources/mini.transcriptome.fa diff --git a/public/biopet-tools/src/test/resources/no_sample.tsv b/biopet-tools/src/test/resources/no_sample.tsv similarity index 100% rename from public/biopet-tools/src/test/resources/no_sample.tsv rename to biopet-tools/src/test/resources/no_sample.tsv diff --git a/public/biopet-tools/src/test/resources/number.tsv b/biopet-tools/src/test/resources/number.tsv similarity index 100% rename from public/biopet-tools/src/test/resources/number.tsv rename to biopet-tools/src/test/resources/number.tsv diff --git a/public/biopet-tools/src/test/resources/paired01.bam b/biopet-tools/src/test/resources/paired01.bam similarity index 100% rename from public/biopet-tools/src/test/resources/paired01.bam rename to biopet-tools/src/test/resources/paired01.bam diff --git a/public/biopet-tools/src/test/resources/paired01.bam.bai b/biopet-tools/src/test/resources/paired01.bam.bai similarity index 100% rename from public/biopet-tools/src/test/resources/paired01.bam.bai rename to biopet-tools/src/test/resources/paired01.bam.bai diff --git a/public/biopet-tools/src/test/resources/paired01.pileup b/biopet-tools/src/test/resources/paired01.pileup similarity index 100% rename from public/biopet-tools/src/test/resources/paired01.pileup rename to biopet-tools/src/test/resources/paired01.pileup diff --git a/public/biopet-tools/src/test/resources/paired01.sam b/biopet-tools/src/test/resources/paired01.sam similarity index 100% rename from public/biopet-tools/src/test/resources/paired01.sam rename to biopet-tools/src/test/resources/paired01.sam diff --git a/public/biopet-tools/src/test/resources/paired01a.fq b/biopet-tools/src/test/resources/paired01a.fq similarity index 100% rename from public/biopet-tools/src/test/resources/paired01a.fq rename to biopet-tools/src/test/resources/paired01a.fq diff --git a/public/biopet-tools/src/test/resources/paired01b.fq b/biopet-tools/src/test/resources/paired01b.fq similarity index 100% rename from public/biopet-tools/src/test/resources/paired01b.fq rename to biopet-tools/src/test/resources/paired01b.fq diff --git a/public/biopet-tools/src/test/resources/paired01c.fq b/biopet-tools/src/test/resources/paired01c.fq similarity index 100% rename from public/biopet-tools/src/test/resources/paired01c.fq rename to biopet-tools/src/test/resources/paired01c.fq diff --git a/public/biopet-tools/src/test/resources/paired02.bam b/biopet-tools/src/test/resources/paired02.bam similarity index 100% rename from public/biopet-tools/src/test/resources/paired02.bam rename to biopet-tools/src/test/resources/paired02.bam diff --git a/public/biopet-tools/src/test/resources/paired02.bam.bai b/biopet-tools/src/test/resources/paired02.bam.bai similarity index 100% rename from public/biopet-tools/src/test/resources/paired02.bam.bai rename to biopet-tools/src/test/resources/paired02.bam.bai diff --git a/public/biopet-tools/src/test/resources/paired02.sam b/biopet-tools/src/test/resources/paired02.sam similarity index 100% rename from public/biopet-tools/src/test/resources/paired02.sam rename to biopet-tools/src/test/resources/paired02.sam diff --git a/public/biopet-tools/src/test/resources/paired03.bam b/biopet-tools/src/test/resources/paired03.bam similarity index 100% rename from public/biopet-tools/src/test/resources/paired03.bam rename to biopet-tools/src/test/resources/paired03.bam diff --git a/public/biopet-tools/src/test/resources/paired03.bam.bai b/biopet-tools/src/test/resources/paired03.bam.bai similarity index 100% rename from public/biopet-tools/src/test/resources/paired03.bam.bai rename to biopet-tools/src/test/resources/paired03.bam.bai diff --git a/public/biopet-tools/src/test/resources/paired03.sam b/biopet-tools/src/test/resources/paired03.sam similarity index 100% rename from public/biopet-tools/src/test/resources/paired03.sam rename to biopet-tools/src/test/resources/paired03.sam diff --git a/public/biopet-tools/src/test/resources/rrna01.bed b/biopet-tools/src/test/resources/rrna01.bed similarity index 100% rename from public/biopet-tools/src/test/resources/rrna01.bed rename to biopet-tools/src/test/resources/rrna01.bed diff --git a/public/biopet-tools/src/test/resources/rrna01.gtf b/biopet-tools/src/test/resources/rrna01.gtf similarity index 100% rename from public/biopet-tools/src/test/resources/rrna01.gtf rename to biopet-tools/src/test/resources/rrna01.gtf diff --git a/public/biopet-tools/src/test/resources/rrna01.refFlat b/biopet-tools/src/test/resources/rrna01.refFlat similarity index 100% rename from public/biopet-tools/src/test/resources/rrna01.refFlat rename to biopet-tools/src/test/resources/rrna01.refFlat diff --git a/public/biopet-tools/src/test/resources/rrna02.bed b/biopet-tools/src/test/resources/rrna02.bed similarity index 100% rename from public/biopet-tools/src/test/resources/rrna02.bed rename to biopet-tools/src/test/resources/rrna02.bed diff --git a/public/biopet-tools/src/test/resources/sageAllGenesTest.tsv b/biopet-tools/src/test/resources/sageAllGenesTest.tsv similarity index 100% rename from public/biopet-tools/src/test/resources/sageAllGenesTest.tsv rename to biopet-tools/src/test/resources/sageAllGenesTest.tsv diff --git a/public/biopet-tools/src/test/resources/sageNoAntiTest.tsv b/biopet-tools/src/test/resources/sageNoAntiTest.tsv similarity index 100% rename from public/biopet-tools/src/test/resources/sageNoAntiTest.tsv rename to biopet-tools/src/test/resources/sageNoAntiTest.tsv diff --git a/public/biopet-tools/src/test/resources/sageNoTagsTest.tsv b/biopet-tools/src/test/resources/sageNoTagsTest.tsv similarity index 100% rename from public/biopet-tools/src/test/resources/sageNoTagsTest.tsv rename to biopet-tools/src/test/resources/sageNoTagsTest.tsv diff --git a/public/biopet-tools/src/test/resources/sageTest.tsv b/biopet-tools/src/test/resources/sageTest.tsv similarity index 100% rename from public/biopet-tools/src/test/resources/sageTest.tsv rename to biopet-tools/src/test/resources/sageTest.tsv diff --git a/public/biopet-tools/src/test/resources/same.tsv b/biopet-tools/src/test/resources/same.tsv similarity index 100% rename from public/biopet-tools/src/test/resources/same.tsv rename to biopet-tools/src/test/resources/same.tsv diff --git a/public/biopet-tools/src/test/resources/sample.tsv b/biopet-tools/src/test/resources/sample.tsv similarity index 100% rename from public/biopet-tools/src/test/resources/sample.tsv rename to biopet-tools/src/test/resources/sample.tsv diff --git a/public/biopet-tools/src/test/resources/single01.bam b/biopet-tools/src/test/resources/single01.bam similarity index 100% rename from public/biopet-tools/src/test/resources/single01.bam rename to biopet-tools/src/test/resources/single01.bam diff --git a/public/biopet-tools/src/test/resources/single01.bam.bai b/biopet-tools/src/test/resources/single01.bam.bai similarity index 100% rename from public/biopet-tools/src/test/resources/single01.bam.bai rename to biopet-tools/src/test/resources/single01.bam.bai diff --git a/public/biopet-tools/src/test/resources/single01.fq b/biopet-tools/src/test/resources/single01.fq similarity index 100% rename from public/biopet-tools/src/test/resources/single01.fq rename to biopet-tools/src/test/resources/single01.fq diff --git a/public/biopet-tools/src/test/resources/single01.sam b/biopet-tools/src/test/resources/single01.sam similarity index 100% rename from public/biopet-tools/src/test/resources/single01.sam rename to biopet-tools/src/test/resources/single01.sam diff --git a/public/biopet-tools/src/test/resources/single02.bam b/biopet-tools/src/test/resources/single02.bam similarity index 100% rename from public/biopet-tools/src/test/resources/single02.bam rename to biopet-tools/src/test/resources/single02.bam diff --git a/public/biopet-tools/src/test/resources/single02.bam.bai b/biopet-tools/src/test/resources/single02.bam.bai similarity index 100% rename from public/biopet-tools/src/test/resources/single02.bam.bai rename to biopet-tools/src/test/resources/single02.bam.bai diff --git a/public/biopet-tools/src/test/resources/single02.sam b/biopet-tools/src/test/resources/single02.sam similarity index 100% rename from public/biopet-tools/src/test/resources/single02.sam rename to biopet-tools/src/test/resources/single02.sam diff --git a/public/biopet-tools/src/test/resources/single03.bam b/biopet-tools/src/test/resources/single03.bam similarity index 100% rename from public/biopet-tools/src/test/resources/single03.bam rename to biopet-tools/src/test/resources/single03.bam diff --git a/public/biopet-tools/src/test/resources/single03.bam.bai b/biopet-tools/src/test/resources/single03.bam.bai similarity index 100% rename from public/biopet-tools/src/test/resources/single03.bam.bai rename to biopet-tools/src/test/resources/single03.bam.bai diff --git a/public/biopet-tools/src/test/resources/single03.sam b/biopet-tools/src/test/resources/single03.sam similarity index 100% rename from public/biopet-tools/src/test/resources/single03.sam rename to biopet-tools/src/test/resources/single03.sam diff --git a/public/biopet-tools/src/test/resources/single04.bam b/biopet-tools/src/test/resources/single04.bam similarity index 100% rename from public/biopet-tools/src/test/resources/single04.bam rename to biopet-tools/src/test/resources/single04.bam diff --git a/public/biopet-tools/src/test/resources/single04.bam.bai b/biopet-tools/src/test/resources/single04.bam.bai similarity index 100% rename from public/biopet-tools/src/test/resources/single04.bam.bai rename to biopet-tools/src/test/resources/single04.bam.bai diff --git a/public/biopet-tools/src/test/resources/single04.sam b/biopet-tools/src/test/resources/single04.sam similarity index 100% rename from public/biopet-tools/src/test/resources/single04.sam rename to biopet-tools/src/test/resources/single04.sam diff --git a/public/biopet-tools/src/test/resources/single05.bam b/biopet-tools/src/test/resources/single05.bam similarity index 100% rename from public/biopet-tools/src/test/resources/single05.bam rename to biopet-tools/src/test/resources/single05.bam diff --git a/public/biopet-tools/src/test/resources/single05.bam.bai b/biopet-tools/src/test/resources/single05.bam.bai similarity index 100% rename from public/biopet-tools/src/test/resources/single05.bam.bai rename to biopet-tools/src/test/resources/single05.bam.bai diff --git a/public/biopet-tools/src/test/resources/single05.sam b/biopet-tools/src/test/resources/single05.sam similarity index 100% rename from public/biopet-tools/src/test/resources/single05.sam rename to biopet-tools/src/test/resources/single05.sam diff --git a/public/biopet-tools/src/test/resources/tagCount.tsv b/biopet-tools/src/test/resources/tagCount.tsv similarity index 100% rename from public/biopet-tools/src/test/resources/tagCount.tsv rename to biopet-tools/src/test/resources/tagCount.tsv diff --git a/public/biopet-tools/src/test/resources/test.empty.snptest b/biopet-tools/src/test/resources/test.empty.snptest similarity index 100% rename from public/biopet-tools/src/test/resources/test.empty.snptest rename to biopet-tools/src/test/resources/test.empty.snptest diff --git a/public/biopet-tools/src/test/resources/test.gens b/biopet-tools/src/test/resources/test.gens similarity index 100% rename from public/biopet-tools/src/test/resources/test.gens rename to biopet-tools/src/test/resources/test.gens diff --git a/public/biopet-tools/src/test/resources/test.gens_info b/biopet-tools/src/test/resources/test.gens_info similarity index 100% rename from public/biopet-tools/src/test/resources/test.gens_info rename to biopet-tools/src/test/resources/test.gens_info diff --git a/public/biopet-tools/src/test/resources/test.snptest b/biopet-tools/src/test/resources/test.snptest similarity index 100% rename from public/biopet-tools/src/test/resources/test.snptest rename to biopet-tools/src/test/resources/test.snptest diff --git a/public/biopet-tools/src/test/resources/test.summary.json b/biopet-tools/src/test/resources/test.summary.json similarity index 100% rename from public/biopet-tools/src/test/resources/test.summary.json rename to biopet-tools/src/test/resources/test.summary.json diff --git a/public/biopet-tools/src/test/resources/unvep_online.vcf b/biopet-tools/src/test/resources/unvep_online.vcf similarity index 100% rename from public/biopet-tools/src/test/resources/unvep_online.vcf rename to biopet-tools/src/test/resources/unvep_online.vcf diff --git a/public/biopet-tools/src/test/resources/unvep_online.vcf.gz b/biopet-tools/src/test/resources/unvep_online.vcf.gz similarity index 100% rename from public/biopet-tools/src/test/resources/unvep_online.vcf.gz rename to biopet-tools/src/test/resources/unvep_online.vcf.gz diff --git a/public/biopet-tools/src/test/resources/unvep_online.vcf.gz.tbi b/biopet-tools/src/test/resources/unvep_online.vcf.gz.tbi similarity index 100% rename from public/biopet-tools/src/test/resources/unvep_online.vcf.gz.tbi rename to biopet-tools/src/test/resources/unvep_online.vcf.gz.tbi diff --git a/public/biopet-tools/src/test/resources/unvepped.vcf b/biopet-tools/src/test/resources/unvepped.vcf similarity index 100% rename from public/biopet-tools/src/test/resources/unvepped.vcf rename to biopet-tools/src/test/resources/unvepped.vcf diff --git a/public/biopet-tools/src/test/resources/unvepped.vcf.gz b/biopet-tools/src/test/resources/unvepped.vcf.gz similarity index 100% rename from public/biopet-tools/src/test/resources/unvepped.vcf.gz rename to biopet-tools/src/test/resources/unvepped.vcf.gz diff --git a/public/biopet-tools/src/test/resources/unvepped.vcf.gz.tbi b/biopet-tools/src/test/resources/unvepped.vcf.gz.tbi similarity index 100% rename from public/biopet-tools/src/test/resources/unvepped.vcf.gz.tbi rename to biopet-tools/src/test/resources/unvepped.vcf.gz.tbi diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/AnnotateVcfWithBedTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/AnnotateVcfWithBedTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/AnnotateVcfWithBedTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/AnnotateVcfWithBedTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/BaseCounterTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/BaseCounterTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/BaseCounterTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/BaseCounterTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/BastyGenerateFastaTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/BastyGenerateFastaTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/BastyGenerateFastaTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/BastyGenerateFastaTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/BiopetFlagstatTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/BiopetFlagstatTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/BiopetFlagstatTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/BiopetFlagstatTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/CheckAllelesVcfInBamTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/CheckAllelesVcfInBamTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/CheckAllelesVcfInBamTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/CheckAllelesVcfInBamTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/ExtractAlignedFastqTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/ExtractAlignedFastqTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/ExtractAlignedFastqTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/ExtractAlignedFastqTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/FastqSplitterTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/FastqSplitterTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/FastqSplitterTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/FastqSplitterTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/FastqSyncTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/FastqSyncTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/FastqSyncTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/FastqSyncTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/FindRepeatsPacBioTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/FindRepeatsPacBioTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/FindRepeatsPacBioTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/FindRepeatsPacBioTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/GensToVcfTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/GensToVcfTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/GensToVcfTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/GensToVcfTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/GvcfToBedTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/GvcfToBedTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/GvcfToBedTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/GvcfToBedTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/MergeAllelesTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/MergeAllelesTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/MergeAllelesTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/MergeAllelesTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/MergeTablesTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/MergeTablesTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/MergeTablesTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/MergeTablesTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/MpileupToVcfTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/MpileupToVcfTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/MpileupToVcfTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/MpileupToVcfTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/PrefixFastqTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/PrefixFastqTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/PrefixFastqTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/PrefixFastqTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SageCountFastqTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SageCountFastqTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SageCountFastqTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SageCountFastqTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SageCreateLibaryTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SageCreateLibaryTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SageCreateLibaryTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SageCreateLibaryTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SageCreateTagCountsTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SageCreateTagCountsTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SageCreateTagCountsTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SageCreateTagCountsTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SamplesTsvToJsonTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SamplesTsvToJsonTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SamplesTsvToJsonTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SamplesTsvToJsonTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SeqStatTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SeqStatTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SeqStatTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SeqStatTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SnptestToVcfTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SnptestToVcfTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SnptestToVcfTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SnptestToVcfTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SummaryToTsvTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SummaryToTsvTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SummaryToTsvTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/SummaryToTsvTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/ValidateFastqTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/ValidateFastqTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/ValidateFastqTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/ValidateFastqTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/VcfFilterTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/VcfFilterTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/VcfFilterTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/VcfFilterTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/VcfStatsTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/VcfStatsTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/VcfStatsTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/VcfStatsTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/VcfToTsvTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/VcfToTsvTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/VcfToTsvTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/VcfToTsvTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/VcfWithVcfTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/VcfWithVcfTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/VcfWithVcfTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/VcfWithVcfTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/VepNormalizerTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/VepNormalizerTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/VepNormalizerTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/VepNormalizerTest.scala diff --git a/public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/WipeReadsTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/WipeReadsTest.scala similarity index 100% rename from public/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/WipeReadsTest.scala rename to biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/WipeReadsTest.scala diff --git a/public/biopet-utils/pom.xml b/biopet-utils/pom.xml similarity index 100% rename from public/biopet-utils/pom.xml rename to biopet-utils/pom.xml diff --git a/public/biopet-utils/src/main/resources/nl/lumc/sasc/biopet/utils/rscript/plotScatter.R b/biopet-utils/src/main/resources/nl/lumc/sasc/biopet/utils/rscript/plotScatter.R similarity index 100% rename from public/biopet-utils/src/main/resources/nl/lumc/sasc/biopet/utils/rscript/plotScatter.R rename to biopet-utils/src/main/resources/nl/lumc/sasc/biopet/utils/rscript/plotScatter.R diff --git a/public/biopet-utils/src/main/resources/nl/lumc/sasc/biopet/utils/rscript/plotXY.R b/biopet-utils/src/main/resources/nl/lumc/sasc/biopet/utils/rscript/plotXY.R similarity index 100% rename from public/biopet-utils/src/main/resources/nl/lumc/sasc/biopet/utils/rscript/plotXY.R rename to biopet-utils/src/main/resources/nl/lumc/sasc/biopet/utils/rscript/plotXY.R diff --git a/public/biopet-utils/src/main/resources/nl/lumc/sasc/biopet/utils/rscript/stackedBar.R b/biopet-utils/src/main/resources/nl/lumc/sasc/biopet/utils/rscript/stackedBar.R similarity index 100% rename from public/biopet-utils/src/main/resources/nl/lumc/sasc/biopet/utils/rscript/stackedBar.R rename to biopet-utils/src/main/resources/nl/lumc/sasc/biopet/utils/rscript/stackedBar.R diff --git a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/package.scala b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/package.scala similarity index 100% rename from public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/package.scala rename to biopet-utils/src/main/scala/nl/lumc/sasc/biopet/package.scala diff --git a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/BamUtils.scala b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/BamUtils.scala similarity index 100% rename from public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/BamUtils.scala rename to biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/BamUtils.scala diff --git a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/BiopetExecutable.scala b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/BiopetExecutable.scala similarity index 100% rename from public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/BiopetExecutable.scala rename to biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/BiopetExecutable.scala diff --git a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/ConfigUtils.scala b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/ConfigUtils.scala similarity index 97% rename from public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/ConfigUtils.scala rename to biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/ConfigUtils.scala index 01f5f37c34f02cddefa335dbdb1257ac1f16b3bf..9dd5c884c9f392bd30c7179c15abbda871a7233b 100644 --- a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/ConfigUtils.scala +++ b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/ConfigUtils.scala @@ -430,6 +430,18 @@ object ConfigUtils extends Logging { else Nil } + /** Convert ConfigValue to List[Double] */ + implicit def configValue2doubleList(value: ConfigValue): List[Double] = { + if (requiredValue(value)) any2list(value.value).map(any2double(_)) + else Nil + } + + /** Convert ConfigValue to List[Int] */ + implicit def configValue2intList(value: ConfigValue): List[Int] = { + if (requiredValue(value)) any2list(value.value).map(any2int(_)) + else Nil + } + /** Convert ConfigValue to Set[String] */ implicit def configValue2stringSet(value: ConfigValue): Set[String] = { if (requiredValue(value)) any2stringSet(value.value) diff --git a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/IoUtils.scala b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/IoUtils.scala similarity index 100% rename from public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/IoUtils.scala rename to biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/IoUtils.scala diff --git a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/LazyCheck.scala b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/LazyCheck.scala similarity index 100% rename from public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/LazyCheck.scala rename to biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/LazyCheck.scala diff --git a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/Logging.scala b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/Logging.scala similarity index 100% rename from public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/Logging.scala rename to biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/Logging.scala diff --git a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/MainCommand.scala b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/MainCommand.scala similarity index 100% rename from public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/MainCommand.scala rename to biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/MainCommand.scala diff --git a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/ToolCommand.scala b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/ToolCommand.scala similarity index 100% rename from public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/ToolCommand.scala rename to biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/ToolCommand.scala diff --git a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/VcfUtils.scala b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/VcfUtils.scala similarity index 93% rename from public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/VcfUtils.scala rename to biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/VcfUtils.scala index e724575ac08dd288e9ff5ae08237bdb0cb208657..5b100606f0dc00bcd637c667871cb5c2d8da99cd 100644 --- a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/VcfUtils.scala +++ b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/VcfUtils.scala @@ -127,4 +127,11 @@ object VcfUtils { def hasMinGenomeQuality(gt: Genotype, minGQ: Int): Boolean = { gt.hasGQ && gt.getGQ >= minGQ } + + def getVcfIndexFile(vcfFile: File): File = { + val name = vcfFile.getAbsolutePath + if (name.endsWith(".vcf")) new File(name + ".idx") + else if (name.endsWith(".vcf.gz")) new File(name + ".tbi") + else throw new IllegalArgumentException(s"File given is no vcf file: $vcfFile") + } } diff --git a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/config/Config.scala b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/config/Config.scala similarity index 100% rename from public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/config/Config.scala rename to biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/config/Config.scala diff --git a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/config/ConfigValue.scala b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/config/ConfigValue.scala similarity index 100% rename from public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/config/ConfigValue.scala rename to biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/config/ConfigValue.scala diff --git a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/config/ConfigValueIndex.scala b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/config/ConfigValueIndex.scala similarity index 100% rename from public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/config/ConfigValueIndex.scala rename to biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/config/ConfigValueIndex.scala diff --git a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/config/Configurable.scala b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/config/Configurable.scala similarity index 100% rename from public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/config/Configurable.scala rename to biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/config/Configurable.scala diff --git a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/intervals/BedRecord.scala b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/intervals/BedRecord.scala similarity index 100% rename from public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/intervals/BedRecord.scala rename to biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/intervals/BedRecord.scala diff --git a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/intervals/BedRecordList.scala b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/intervals/BedRecordList.scala similarity index 100% rename from public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/intervals/BedRecordList.scala rename to biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/intervals/BedRecordList.scala diff --git a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/package.scala b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/package.scala similarity index 100% rename from public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/package.scala rename to biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/package.scala diff --git a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/rscript/LinePlot.scala b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/rscript/LinePlot.scala similarity index 100% rename from public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/rscript/LinePlot.scala rename to biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/rscript/LinePlot.scala diff --git a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/rscript/Rscript.scala b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/rscript/Rscript.scala similarity index 100% rename from public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/rscript/Rscript.scala rename to biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/rscript/Rscript.scala diff --git a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/rscript/ScatterPlot.scala b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/rscript/ScatterPlot.scala similarity index 100% rename from public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/rscript/ScatterPlot.scala rename to biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/rscript/ScatterPlot.scala diff --git a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/rscript/StackedBarPlot.scala b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/rscript/StackedBarPlot.scala similarity index 100% rename from public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/rscript/StackedBarPlot.scala rename to biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/rscript/StackedBarPlot.scala diff --git a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/summary/Summary.scala b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/summary/Summary.scala similarity index 100% rename from public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/summary/Summary.scala rename to biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/summary/Summary.scala diff --git a/public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/summary/SummaryValue.scala b/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/summary/SummaryValue.scala similarity index 100% rename from public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/summary/SummaryValue.scala rename to biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/summary/SummaryValue.scala diff --git a/public/biopet-utils/src/test/resources/log4j.properties b/biopet-utils/src/test/resources/log4j.properties similarity index 100% rename from public/biopet-utils/src/test/resources/log4j.properties rename to biopet-utils/src/test/resources/log4j.properties diff --git a/public/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/BamUtilsTest.scala b/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/BamUtilsTest.scala similarity index 100% rename from public/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/BamUtilsTest.scala rename to biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/BamUtilsTest.scala diff --git a/public/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/ConfigUtilsTest.scala b/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/ConfigUtilsTest.scala similarity index 100% rename from public/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/ConfigUtilsTest.scala rename to biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/ConfigUtilsTest.scala diff --git a/public/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/PackageTest.scala b/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/PackageTest.scala similarity index 100% rename from public/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/PackageTest.scala rename to biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/PackageTest.scala diff --git a/public/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/config/ConfigTest.scala b/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/config/ConfigTest.scala similarity index 100% rename from public/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/config/ConfigTest.scala rename to biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/config/ConfigTest.scala diff --git a/public/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/config/ConfigValueTest.scala b/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/config/ConfigValueTest.scala similarity index 100% rename from public/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/config/ConfigValueTest.scala rename to biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/config/ConfigValueTest.scala diff --git a/public/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/config/ConfigurableTest.scala b/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/config/ConfigurableTest.scala similarity index 100% rename from public/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/config/ConfigurableTest.scala rename to biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/config/ConfigurableTest.scala diff --git a/public/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/intervals/BedRecordListTest.scala b/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/intervals/BedRecordListTest.scala similarity index 100% rename from public/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/intervals/BedRecordListTest.scala rename to biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/intervals/BedRecordListTest.scala diff --git a/public/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/intervals/BedRecordTest.scala b/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/intervals/BedRecordTest.scala similarity index 100% rename from public/biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/intervals/BedRecordTest.scala rename to biopet-utils/src/test/scala/nl/lumc/sasc/biopet/utils/intervals/BedRecordTest.scala diff --git a/public/bammetrics/.gitignore b/carp/.gitignore similarity index 100% rename from public/bammetrics/.gitignore rename to carp/.gitignore diff --git a/public/carp/pom.xml b/carp/pom.xml similarity index 100% rename from public/carp/pom.xml rename to carp/pom.xml diff --git a/public/carp/src/main/resources/nl/lumc/sasc/biopet/pipelines/carp/carpFront.ssp b/carp/src/main/resources/nl/lumc/sasc/biopet/pipelines/carp/carpFront.ssp similarity index 100% rename from public/carp/src/main/resources/nl/lumc/sasc/biopet/pipelines/carp/carpFront.ssp rename to carp/src/main/resources/nl/lumc/sasc/biopet/pipelines/carp/carpFront.ssp diff --git a/public/carp/src/main/scala/nl/lumc/sasc/biopet/pipelines/carp/Carp.scala b/carp/src/main/scala/nl/lumc/sasc/biopet/pipelines/carp/Carp.scala similarity index 100% rename from public/carp/src/main/scala/nl/lumc/sasc/biopet/pipelines/carp/Carp.scala rename to carp/src/main/scala/nl/lumc/sasc/biopet/pipelines/carp/Carp.scala diff --git a/public/carp/src/main/scala/nl/lumc/sasc/biopet/pipelines/carp/CarpReport.scala b/carp/src/main/scala/nl/lumc/sasc/biopet/pipelines/carp/CarpReport.scala similarity index 100% rename from public/carp/src/main/scala/nl/lumc/sasc/biopet/pipelines/carp/CarpReport.scala rename to carp/src/main/scala/nl/lumc/sasc/biopet/pipelines/carp/CarpReport.scala diff --git a/public/carp/src/test/resources/log4j.properties b/carp/src/test/resources/log4j.properties similarity index 100% rename from public/carp/src/test/resources/log4j.properties rename to carp/src/test/resources/log4j.properties diff --git a/public/bammetrics/src/test/resources/ref.dict b/carp/src/test/resources/ref.dict similarity index 100% rename from public/bammetrics/src/test/resources/ref.dict rename to carp/src/test/resources/ref.dict diff --git a/public/bammetrics/src/test/resources/ref.fa b/carp/src/test/resources/ref.fa similarity index 100% rename from public/bammetrics/src/test/resources/ref.fa rename to carp/src/test/resources/ref.fa diff --git a/public/bammetrics/src/test/resources/ref.fa.fai b/carp/src/test/resources/ref.fa.fai similarity index 100% rename from public/bammetrics/src/test/resources/ref.fa.fai rename to carp/src/test/resources/ref.fa.fai diff --git a/public/carp/src/test/scala/nl/lumc/sasc/biopet/pipelines/carp/CarpTest.scala b/carp/src/test/scala/nl/lumc/sasc/biopet/pipelines/carp/CarpTest.scala similarity index 100% rename from public/carp/src/test/scala/nl/lumc/sasc/biopet/pipelines/carp/CarpTest.scala rename to carp/src/test/scala/nl/lumc/sasc/biopet/pipelines/carp/CarpTest.scala diff --git a/docs/pipelines/toucan.md b/docs/pipelines/toucan.md index 12f4ea108c54402f51d37e6f673d97e633058d6f..5f362bf13fa083d571f57e03f95351fc1231a16b 100644 --- a/docs/pipelines/toucan.md +++ b/docs/pipelines/toucan.md @@ -83,6 +83,25 @@ The following config values are optional: Annotation queries can be set by the `annotation_queries` config value in the `manwe` config namespace. By default, a global query is returned. + +###Groups +In case you want to add your samples to a specific group in your varda database, you can use the tagging system in your sample config. +Specifically, the `varda_group` tag should be a list of strings pointing to group. + +E.g. : + +```json +{ + "samples": { + "sample1": { + "tags": { + "varda_group": ["group1", "group2"] + } + } + } +} +``` + Running the pipeline --------------- The command to run the pipeline is: diff --git a/public/basty/.gitignore b/flexiprep/.gitignore similarity index 100% rename from public/basty/.gitignore rename to flexiprep/.gitignore diff --git a/public/flexiprep/pom.xml b/flexiprep/pom.xml similarity index 100% rename from public/flexiprep/pom.xml rename to flexiprep/pom.xml diff --git a/public/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepBaseSummary.ssp b/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepBaseSummary.ssp similarity index 100% rename from public/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepBaseSummary.ssp rename to flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepBaseSummary.ssp diff --git a/public/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepFastQcPlot.ssp b/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepFastQcPlot.ssp similarity index 100% rename from public/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepFastQcPlot.ssp rename to flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepFastQcPlot.ssp diff --git a/public/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepFront.ssp b/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepFront.ssp similarity index 100% rename from public/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepFront.ssp rename to flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepFront.ssp diff --git a/public/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepInputfiles.ssp b/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepInputfiles.ssp similarity index 100% rename from public/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepInputfiles.ssp rename to flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepInputfiles.ssp diff --git a/public/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepOutputfiles.ssp b/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepOutputfiles.ssp similarity index 100% rename from public/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepOutputfiles.ssp rename to flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepOutputfiles.ssp diff --git a/public/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp b/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp similarity index 100% rename from public/flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp rename to flexiprep/src/main/resources/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp diff --git a/public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/CheckValidateFastq.scala b/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/CheckValidateFastq.scala similarity index 100% rename from public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/CheckValidateFastq.scala rename to flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/CheckValidateFastq.scala diff --git a/public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/Cutadapt.scala b/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/Cutadapt.scala similarity index 100% rename from public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/Cutadapt.scala rename to flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/Cutadapt.scala diff --git a/public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/Fastqc.scala b/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/Fastqc.scala similarity index 98% rename from public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/Fastqc.scala rename to flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/Fastqc.scala index 1bbc7b3f520b549933ec650b7eed847c97113692..bfcbf1d543a37d2e17d2897a1989183d2dfcfa58 100644 --- a/public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/Fastqc.scala +++ b/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/Fastqc.scala @@ -22,8 +22,8 @@ import nl.lumc.sasc.biopet.core.summary.Summarizable import nl.lumc.sasc.biopet.utils.config.Configurable import scala.io.Source - import htsjdk.samtools.util.SequenceUtil.reverseComplement +import org.broadinstitute.gatk.utils.commandline.Output /** * FastQC wrapper with added functionality for the Flexiprep pipeline @@ -216,6 +216,9 @@ class Fastqc(root: Configurable) extends nl.lumc.sasc.biopet.extensions.Fastqc(r } else Set() } + @Output + private var outputFiles: List[File] = Nil + def summaryFiles: Map[String, File] = { val outputFiles = Map("plot_duplication_levels" -> ("Images" + File.separator + "duplication_levels.png"), "plot_kmer_profiles" -> ("Images" + File.separator + "kmer_profiles.png"), diff --git a/public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/Flexiprep.scala b/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/Flexiprep.scala similarity index 100% rename from public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/Flexiprep.scala rename to flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/Flexiprep.scala diff --git a/public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/FlexiprepReport.scala b/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/FlexiprepReport.scala similarity index 100% rename from public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/FlexiprepReport.scala rename to flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/FlexiprepReport.scala diff --git a/public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/QcCommand.scala b/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/QcCommand.scala similarity index 99% rename from public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/QcCommand.scala rename to flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/QcCommand.scala index 5d92bf92b5aa8fe4b3c98a2dbc71efa76c5a2588..c343be2297474025f70224024d827c1f21cfab78 100644 --- a/public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/QcCommand.scala +++ b/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/QcCommand.scala @@ -77,6 +77,9 @@ class QcCommand(val root: Configurable, val fastqc: Fastqc) extends BiopetComman } } + @Output + private var outputFiles: List[File] = Nil + override def beforeGraph(): Unit = { super.beforeGraph() require(read != null) diff --git a/public/flexiprep/src/test/resources/fqc_contaminants_v0101.txt b/flexiprep/src/test/resources/fqc_contaminants_v0101.txt similarity index 100% rename from public/flexiprep/src/test/resources/fqc_contaminants_v0101.txt rename to flexiprep/src/test/resources/fqc_contaminants_v0101.txt diff --git a/public/flexiprep/src/test/resources/log4j.properties b/flexiprep/src/test/resources/log4j.properties similarity index 100% rename from public/flexiprep/src/test/resources/log4j.properties rename to flexiprep/src/test/resources/log4j.properties diff --git a/public/flexiprep/src/test/resources/v0101.fq_fastqc/fastqc_data.txt b/flexiprep/src/test/resources/v0101.fq_fastqc/fastqc_data.txt similarity index 100% rename from public/flexiprep/src/test/resources/v0101.fq_fastqc/fastqc_data.txt rename to flexiprep/src/test/resources/v0101.fq_fastqc/fastqc_data.txt diff --git a/public/flexiprep/src/test/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/FastqcV0101Test.scala b/flexiprep/src/test/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/FastqcV0101Test.scala similarity index 100% rename from public/flexiprep/src/test/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/FastqcV0101Test.scala rename to flexiprep/src/test/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/FastqcV0101Test.scala diff --git a/public/flexiprep/src/test/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/FlexiprepTest.scala b/flexiprep/src/test/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/FlexiprepTest.scala similarity index 100% rename from public/flexiprep/src/test/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/FlexiprepTest.scala rename to flexiprep/src/test/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/FlexiprepTest.scala diff --git a/public/gears/.gitignore b/gears/.gitignore similarity index 100% rename from public/gears/.gitignore rename to gears/.gitignore diff --git a/public/gears/pom.xml b/gears/pom.xml similarity index 100% rename from public/gears/pom.xml rename to gears/pom.xml diff --git a/public/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/gearsFront.ssp b/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/gearsFront.ssp similarity index 100% rename from public/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/gearsFront.ssp rename to gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/gearsFront.ssp diff --git a/public/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/gearsSingleFront.ssp b/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/gearsSingleFront.ssp similarity index 100% rename from public/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/gearsSingleFront.ssp rename to gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/gearsSingleFront.ssp diff --git a/public/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/gearsSunburst.ssp b/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/gearsSunburst.ssp similarity index 100% rename from public/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/gearsSunburst.ssp rename to gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/gearsSunburst.ssp diff --git a/public/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp b/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp similarity index 100% rename from public/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp rename to gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp diff --git a/public/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/qiimeKrona.ssp b/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/qiimeKrona.ssp similarity index 100% rename from public/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/qiimeKrona.ssp rename to gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/qiimeKrona.ssp diff --git a/public/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/report/ext/img/krona/favicon.ico b/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/report/ext/img/krona/favicon.ico similarity index 100% rename from public/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/report/ext/img/krona/favicon.ico rename to gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/report/ext/img/krona/favicon.ico diff --git a/public/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/report/ext/img/krona/hidden.png b/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/report/ext/img/krona/hidden.png similarity index 100% rename from public/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/report/ext/img/krona/hidden.png rename to gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/report/ext/img/krona/hidden.png diff --git a/public/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/report/ext/img/krona/loading.gif b/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/report/ext/img/krona/loading.gif similarity index 100% rename from public/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/report/ext/img/krona/loading.gif rename to gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/report/ext/img/krona/loading.gif diff --git a/public/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/report/ext/js/gears.js b/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/report/ext/js/gears.js similarity index 100% rename from public/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/report/ext/js/gears.js rename to gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/report/ext/js/gears.js diff --git a/public/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/report/ext/js/krona-2.0.js b/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/report/ext/js/krona-2.0.js similarity index 100% rename from public/gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/report/ext/js/krona-2.0.js rename to gears/src/main/resources/nl/lumc/sasc/biopet/pipelines/gears/report/ext/js/krona-2.0.js diff --git a/public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/CombineReads.scala b/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/CombineReads.scala similarity index 100% rename from public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/CombineReads.scala rename to gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/CombineReads.scala diff --git a/public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/ExtractUnmappedReads.scala b/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/ExtractUnmappedReads.scala similarity index 100% rename from public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/ExtractUnmappedReads.scala rename to gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/ExtractUnmappedReads.scala diff --git a/public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/Gears.scala b/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/Gears.scala similarity index 100% rename from public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/Gears.scala rename to gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/Gears.scala diff --git a/public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsKraken.scala b/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsKraken.scala similarity index 100% rename from public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsKraken.scala rename to gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsKraken.scala diff --git a/public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsQiimeClosed.scala b/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsQiimeClosed.scala similarity index 100% rename from public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsQiimeClosed.scala rename to gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsQiimeClosed.scala diff --git a/public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsQiimeRtax.scala b/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsQiimeRtax.scala similarity index 100% rename from public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsQiimeRtax.scala rename to gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsQiimeRtax.scala diff --git a/public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsReport.scala b/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsReport.scala similarity index 100% rename from public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsReport.scala rename to gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsReport.scala diff --git a/public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsSeqCount.scala b/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsSeqCount.scala similarity index 100% rename from public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsSeqCount.scala rename to gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsSeqCount.scala diff --git a/public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsSingle.scala b/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsSingle.scala similarity index 100% rename from public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsSingle.scala rename to gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsSingle.scala diff --git a/public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsSingleReport.scala b/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsSingleReport.scala similarity index 100% rename from public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsSingleReport.scala rename to gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsSingleReport.scala diff --git a/public/gears/src/test/resources/hpv_simu_R1.krkn.json b/gears/src/test/resources/hpv_simu_R1.krkn.json similarity index 100% rename from public/gears/src/test/resources/hpv_simu_R1.krkn.json rename to gears/src/test/resources/hpv_simu_R1.krkn.json diff --git a/public/gears/src/test/resources/log4j.properties b/gears/src/test/resources/log4j.properties similarity index 100% rename from public/gears/src/test/resources/log4j.properties rename to gears/src/test/resources/log4j.properties diff --git a/public/gears/src/test/resources/otu_table.biom b/gears/src/test/resources/otu_table.biom similarity index 100% rename from public/gears/src/test/resources/otu_table.biom rename to gears/src/test/resources/otu_table.biom diff --git a/public/gears/src/test/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsKrakenTest.scala b/gears/src/test/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsKrakenTest.scala similarity index 100% rename from public/gears/src/test/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsKrakenTest.scala rename to gears/src/test/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsKrakenTest.scala diff --git a/public/gears/src/test/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsQiimeClosedTest.scala b/gears/src/test/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsQiimeClosedTest.scala similarity index 100% rename from public/gears/src/test/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsQiimeClosedTest.scala rename to gears/src/test/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsQiimeClosedTest.scala diff --git a/public/gears/src/test/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsSingleTest.scala b/gears/src/test/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsSingleTest.scala similarity index 100% rename from public/gears/src/test/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsSingleTest.scala rename to gears/src/test/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsSingleTest.scala diff --git a/public/gears/src/test/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsTest.scala b/gears/src/test/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsTest.scala similarity index 100% rename from public/gears/src/test/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsTest.scala rename to gears/src/test/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsTest.scala diff --git a/public/generate-indexes/pom.xml b/generate-indexes/pom.xml similarity index 100% rename from public/generate-indexes/pom.xml rename to generate-indexes/pom.xml diff --git a/public/generate-indexes/src/main/scala/nl/lumc/sasc/biopet/pipelines/GenerateIndexes.scala b/generate-indexes/src/main/scala/nl/lumc/sasc/biopet/pipelines/GenerateIndexes.scala similarity index 100% rename from public/generate-indexes/src/main/scala/nl/lumc/sasc/biopet/pipelines/GenerateIndexes.scala rename to generate-indexes/src/main/scala/nl/lumc/sasc/biopet/pipelines/GenerateIndexes.scala diff --git a/public/biopet-public-package/.gitignore b/gentrap/.gitignore similarity index 100% rename from public/biopet-public-package/.gitignore rename to gentrap/.gitignore diff --git a/public/gentrap/pom.xml b/gentrap/pom.xml similarity index 100% rename from public/gentrap/pom.xml rename to gentrap/pom.xml diff --git a/public/gentrap/src/main/resources/nl/lumc/sasc/biopet/pipelines/gentrap/gentrapFront.ssp b/gentrap/src/main/resources/nl/lumc/sasc/biopet/pipelines/gentrap/gentrapFront.ssp similarity index 100% rename from public/gentrap/src/main/resources/nl/lumc/sasc/biopet/pipelines/gentrap/gentrapFront.ssp rename to gentrap/src/main/resources/nl/lumc/sasc/biopet/pipelines/gentrap/gentrapFront.ssp diff --git a/public/gentrap/src/main/resources/nl/lumc/sasc/biopet/pipelines/gentrap/measure_plotreport.ssp b/gentrap/src/main/resources/nl/lumc/sasc/biopet/pipelines/gentrap/measure_plotreport.ssp similarity index 100% rename from public/gentrap/src/main/resources/nl/lumc/sasc/biopet/pipelines/gentrap/measure_plotreport.ssp rename to gentrap/src/main/resources/nl/lumc/sasc/biopet/pipelines/gentrap/measure_plotreport.ssp diff --git a/public/gentrap/src/main/resources/nl/lumc/sasc/biopet/pipelines/gentrap/scripts/plot_heatmap.R b/gentrap/src/main/resources/nl/lumc/sasc/biopet/pipelines/gentrap/scripts/plot_heatmap.R similarity index 100% rename from public/gentrap/src/main/resources/nl/lumc/sasc/biopet/pipelines/gentrap/scripts/plot_heatmap.R rename to gentrap/src/main/resources/nl/lumc/sasc/biopet/pipelines/gentrap/scripts/plot_heatmap.R diff --git a/public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/Gentrap.scala b/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/Gentrap.scala similarity index 100% rename from public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/Gentrap.scala rename to gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/Gentrap.scala diff --git a/public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/GentrapReport.scala b/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/GentrapReport.scala similarity index 100% rename from public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/GentrapReport.scala rename to gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/GentrapReport.scala diff --git a/public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/BaseCounts.scala b/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/BaseCounts.scala similarity index 100% rename from public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/BaseCounts.scala rename to gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/BaseCounts.scala diff --git a/public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/CufflinksBlind.scala b/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/CufflinksBlind.scala similarity index 100% rename from public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/CufflinksBlind.scala rename to gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/CufflinksBlind.scala diff --git a/public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/CufflinksGuided.scala b/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/CufflinksGuided.scala similarity index 100% rename from public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/CufflinksGuided.scala rename to gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/CufflinksGuided.scala diff --git a/public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/CufflinksMeasurement.scala b/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/CufflinksMeasurement.scala similarity index 100% rename from public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/CufflinksMeasurement.scala rename to gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/CufflinksMeasurement.scala diff --git a/public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/CufflinksStrict.scala b/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/CufflinksStrict.scala similarity index 100% rename from public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/CufflinksStrict.scala rename to gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/CufflinksStrict.scala diff --git a/public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/FragmentsPerExon.scala b/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/FragmentsPerExon.scala similarity index 100% rename from public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/FragmentsPerExon.scala rename to gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/FragmentsPerExon.scala diff --git a/public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/FragmentsPerGene.scala b/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/FragmentsPerGene.scala similarity index 100% rename from public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/FragmentsPerGene.scala rename to gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/FragmentsPerGene.scala diff --git a/public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/Measurement.scala b/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/Measurement.scala similarity index 100% rename from public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/Measurement.scala rename to gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/Measurement.scala diff --git a/public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/scripts/PlotHeatmap.scala b/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/scripts/PlotHeatmap.scala similarity index 100% rename from public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/scripts/PlotHeatmap.scala rename to gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/scripts/PlotHeatmap.scala diff --git a/public/gentrap/src/test/resources/log4j.properties b/gentrap/src/test/resources/log4j.properties similarity index 100% rename from public/gentrap/src/test/resources/log4j.properties rename to gentrap/src/test/resources/log4j.properties diff --git a/public/carp/src/test/resources/ref.dict b/gentrap/src/test/resources/ref.dict similarity index 100% rename from public/carp/src/test/resources/ref.dict rename to gentrap/src/test/resources/ref.dict diff --git a/public/carp/src/test/resources/ref.fa b/gentrap/src/test/resources/ref.fa similarity index 100% rename from public/carp/src/test/resources/ref.fa rename to gentrap/src/test/resources/ref.fa diff --git a/public/carp/src/test/resources/ref.fa.fai b/gentrap/src/test/resources/ref.fa.fai similarity index 100% rename from public/carp/src/test/resources/ref.fa.fai rename to gentrap/src/test/resources/ref.fa.fai diff --git a/public/gentrap/src/test/scala/nl/lumc/sasc/biopet/pipelines/gentrap/GentrapTest.scala b/gentrap/src/test/scala/nl/lumc/sasc/biopet/pipelines/gentrap/GentrapTest.scala similarity index 100% rename from public/gentrap/src/test/scala/nl/lumc/sasc/biopet/pipelines/gentrap/GentrapTest.scala rename to gentrap/src/test/scala/nl/lumc/sasc/biopet/pipelines/gentrap/GentrapTest.scala diff --git a/public/gwas-test/pom.xml b/gwas-test/pom.xml similarity index 100% rename from public/gwas-test/pom.xml rename to gwas-test/pom.xml diff --git a/public/gwas-test/src/main/scala/nl/lumc/sasc/biopet/pipelines/gwastest/GwasTest.scala b/gwas-test/src/main/scala/nl/lumc/sasc/biopet/pipelines/gwastest/GwasTest.scala similarity index 100% rename from public/gwas-test/src/main/scala/nl/lumc/sasc/biopet/pipelines/gwastest/GwasTest.scala rename to gwas-test/src/main/scala/nl/lumc/sasc/biopet/pipelines/gwastest/GwasTest.scala diff --git a/public/gwas-test/src/main/scala/nl/lumc/sasc/biopet/pipelines/gwastest/impute/ImputeOutput.scala b/gwas-test/src/main/scala/nl/lumc/sasc/biopet/pipelines/gwastest/impute/ImputeOutput.scala similarity index 100% rename from public/gwas-test/src/main/scala/nl/lumc/sasc/biopet/pipelines/gwastest/impute/ImputeOutput.scala rename to gwas-test/src/main/scala/nl/lumc/sasc/biopet/pipelines/gwastest/impute/ImputeOutput.scala diff --git a/public/gwas-test/src/main/scala/nl/lumc/sasc/biopet/pipelines/gwastest/impute/Spec.scala b/gwas-test/src/main/scala/nl/lumc/sasc/biopet/pipelines/gwastest/impute/Spec.scala similarity index 100% rename from public/gwas-test/src/main/scala/nl/lumc/sasc/biopet/pipelines/gwastest/impute/Spec.scala rename to gwas-test/src/main/scala/nl/lumc/sasc/biopet/pipelines/gwastest/impute/Spec.scala diff --git a/public/gwas-test/src/test/resources/fake_chrQ.dict b/gwas-test/src/test/resources/fake_chrQ.dict similarity index 100% rename from public/gwas-test/src/test/resources/fake_chrQ.dict rename to gwas-test/src/test/resources/fake_chrQ.dict diff --git a/public/gwas-test/src/test/resources/fake_chrQ.fa b/gwas-test/src/test/resources/fake_chrQ.fa similarity index 100% rename from public/gwas-test/src/test/resources/fake_chrQ.fa rename to gwas-test/src/test/resources/fake_chrQ.fa diff --git a/public/gwas-test/src/test/resources/fake_chrQ.fa.fai b/gwas-test/src/test/resources/fake_chrQ.fa.fai similarity index 100% rename from public/gwas-test/src/test/resources/fake_chrQ.fa.fai rename to gwas-test/src/test/resources/fake_chrQ.fa.fai diff --git a/public/gwas-test/src/test/resources/log4j.properties b/gwas-test/src/test/resources/log4j.properties similarity index 100% rename from public/gwas-test/src/test/resources/log4j.properties rename to gwas-test/src/test/resources/log4j.properties diff --git a/public/gwas-test/src/test/resources/specs/files.specs b/gwas-test/src/test/resources/specs/files.specs similarity index 100% rename from public/gwas-test/src/test/resources/specs/files.specs rename to gwas-test/src/test/resources/specs/files.specs diff --git a/public/gwas-test/src/test/resources/specs/test.gens b/gwas-test/src/test/resources/specs/test.gens similarity index 100% rename from public/gwas-test/src/test/resources/specs/test.gens rename to gwas-test/src/test/resources/specs/test.gens diff --git a/public/gwas-test/src/test/resources/specs/test.gens_info b/gwas-test/src/test/resources/specs/test.gens_info similarity index 100% rename from public/gwas-test/src/test/resources/specs/test.gens_info rename to gwas-test/src/test/resources/specs/test.gens_info diff --git a/public/gwas-test/src/test/resources/specs/test.gens_info_by_sample b/gwas-test/src/test/resources/specs/test.gens_info_by_sample similarity index 100% rename from public/gwas-test/src/test/resources/specs/test.gens_info_by_sample rename to gwas-test/src/test/resources/specs/test.gens_info_by_sample diff --git a/public/gwas-test/src/test/resources/specs/test.gens_summary b/gwas-test/src/test/resources/specs/test.gens_summary similarity index 100% rename from public/gwas-test/src/test/resources/specs/test.gens_summary rename to gwas-test/src/test/resources/specs/test.gens_summary diff --git a/public/gwas-test/src/test/resources/specs/test.gens_warnings b/gwas-test/src/test/resources/specs/test.gens_warnings similarity index 100% rename from public/gwas-test/src/test/resources/specs/test.gens_warnings rename to gwas-test/src/test/resources/specs/test.gens_warnings diff --git a/public/gwas-test/src/test/scala/nl/lumc/sasc/biopet/pipelines/gwastest/GwasTestTest.scala b/gwas-test/src/test/scala/nl/lumc/sasc/biopet/pipelines/gwastest/GwasTestTest.scala similarity index 100% rename from public/gwas-test/src/test/scala/nl/lumc/sasc/biopet/pipelines/gwastest/GwasTestTest.scala rename to gwas-test/src/test/scala/nl/lumc/sasc/biopet/pipelines/gwastest/GwasTestTest.scala diff --git a/public/carp/.gitignore b/kopisu/.gitignore similarity index 100% rename from public/carp/.gitignore rename to kopisu/.gitignore diff --git a/public/kopisu/pom.xml b/kopisu/pom.xml similarity index 100% rename from public/kopisu/pom.xml rename to kopisu/pom.xml diff --git a/public/kopisu/src/main/scala/nl/lumc/sasc/biopet/pipelines/kopisu/ConiferPipeline.scala b/kopisu/src/main/scala/nl/lumc/sasc/biopet/pipelines/kopisu/ConiferPipeline.scala similarity index 100% rename from public/kopisu/src/main/scala/nl/lumc/sasc/biopet/pipelines/kopisu/ConiferPipeline.scala rename to kopisu/src/main/scala/nl/lumc/sasc/biopet/pipelines/kopisu/ConiferPipeline.scala diff --git a/public/kopisu/src/main/scala/nl/lumc/sasc/biopet/pipelines/kopisu/ConiferSummary.scala b/kopisu/src/main/scala/nl/lumc/sasc/biopet/pipelines/kopisu/ConiferSummary.scala similarity index 100% rename from public/kopisu/src/main/scala/nl/lumc/sasc/biopet/pipelines/kopisu/ConiferSummary.scala rename to kopisu/src/main/scala/nl/lumc/sasc/biopet/pipelines/kopisu/ConiferSummary.scala diff --git a/public/kopisu/src/main/scala/nl/lumc/sasc/biopet/pipelines/kopisu/Kopisu.scala b/kopisu/src/main/scala/nl/lumc/sasc/biopet/pipelines/kopisu/Kopisu.scala similarity index 100% rename from public/kopisu/src/main/scala/nl/lumc/sasc/biopet/pipelines/kopisu/Kopisu.scala rename to kopisu/src/main/scala/nl/lumc/sasc/biopet/pipelines/kopisu/Kopisu.scala diff --git a/public/kopisu/src/test/resources/log4j.properties b/kopisu/src/test/resources/log4j.properties similarity index 100% rename from public/kopisu/src/test/resources/log4j.properties rename to kopisu/src/test/resources/log4j.properties diff --git a/public/flexiprep/.gitignore b/mapping/.gitignore similarity index 100% rename from public/flexiprep/.gitignore rename to mapping/.gitignore diff --git a/public/mapping/pom.xml b/mapping/pom.xml similarity index 100% rename from public/mapping/pom.xml rename to mapping/pom.xml diff --git a/public/mapping/src/main/resources/nl/lumc/sasc/biopet/pipelines/mapping/mappingFront.ssp b/mapping/src/main/resources/nl/lumc/sasc/biopet/pipelines/mapping/mappingFront.ssp similarity index 100% rename from public/mapping/src/main/resources/nl/lumc/sasc/biopet/pipelines/mapping/mappingFront.ssp rename to mapping/src/main/resources/nl/lumc/sasc/biopet/pipelines/mapping/mappingFront.ssp diff --git a/public/mapping/src/main/resources/nl/lumc/sasc/biopet/pipelines/mapping/multisampleMappingFront.ssp b/mapping/src/main/resources/nl/lumc/sasc/biopet/pipelines/mapping/multisampleMappingFront.ssp similarity index 100% rename from public/mapping/src/main/resources/nl/lumc/sasc/biopet/pipelines/mapping/multisampleMappingFront.ssp rename to mapping/src/main/resources/nl/lumc/sasc/biopet/pipelines/mapping/multisampleMappingFront.ssp diff --git a/public/mapping/src/main/resources/nl/lumc/sasc/biopet/pipelines/mapping/outputBamfiles.ssp b/mapping/src/main/resources/nl/lumc/sasc/biopet/pipelines/mapping/outputBamfiles.ssp similarity index 100% rename from public/mapping/src/main/resources/nl/lumc/sasc/biopet/pipelines/mapping/outputBamfiles.ssp rename to mapping/src/main/resources/nl/lumc/sasc/biopet/pipelines/mapping/outputBamfiles.ssp diff --git a/public/mapping/src/main/resources/nl/lumc/sasc/biopet/pipelines/mapping/scripts/tophat-recondition.py b/mapping/src/main/resources/nl/lumc/sasc/biopet/pipelines/mapping/scripts/tophat-recondition.py similarity index 100% rename from public/mapping/src/main/resources/nl/lumc/sasc/biopet/pipelines/mapping/scripts/tophat-recondition.py rename to mapping/src/main/resources/nl/lumc/sasc/biopet/pipelines/mapping/scripts/tophat-recondition.py diff --git a/public/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/Mapping.scala b/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/Mapping.scala similarity index 100% rename from public/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/Mapping.scala rename to mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/Mapping.scala diff --git a/public/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/MappingReport.scala b/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/MappingReport.scala similarity index 95% rename from public/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/MappingReport.scala rename to mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/MappingReport.scala index 3fc93747477ed985f4e5ccf02f2745513f101817..14606ca71b21171800ebf6d1da9d42f4f89f98b5 100644 --- a/public/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/MappingReport.scala +++ b/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/MappingReport.scala @@ -33,7 +33,7 @@ object MappingReport extends ReportBuilder { /** Name of report */ val reportName = "Mapping Report" - override def extFiles = super.extFiles ++ List("js/gears.js") + override def extFiles = super.extFiles ++ List("js/gears.js", "js/krona-2.0.js", "img/krona/loading.gif", "img/krona/hidden.png", "img/krona/favicon.ico") .map(x => ExtFile("/nl/lumc/sasc/biopet/pipelines/gears/report/ext/" + x, x)) def krakenExecuted = summary.getValue(sampleId, libId, "gears", "stats", "krakenreport").isDefined diff --git a/public/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/MultisampleMappingReport.scala b/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/MultisampleMappingReport.scala similarity index 100% rename from public/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/MultisampleMappingReport.scala rename to mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/MultisampleMappingReport.scala diff --git a/public/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/MultisampleMappingTrait.scala b/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/MultisampleMappingTrait.scala similarity index 100% rename from public/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/MultisampleMappingTrait.scala rename to mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/MultisampleMappingTrait.scala diff --git a/public/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/scripts/TophatRecondition.scala b/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/scripts/TophatRecondition.scala similarity index 100% rename from public/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/scripts/TophatRecondition.scala rename to mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/scripts/TophatRecondition.scala diff --git a/public/mapping/src/test/resources/log4j.properties b/mapping/src/test/resources/log4j.properties similarity index 100% rename from public/mapping/src/test/resources/log4j.properties rename to mapping/src/test/resources/log4j.properties diff --git a/public/mapping/src/test/resources/ref.1.bt2 b/mapping/src/test/resources/ref.1.bt2 similarity index 100% rename from public/mapping/src/test/resources/ref.1.bt2 rename to mapping/src/test/resources/ref.1.bt2 diff --git a/public/mapping/src/test/resources/ref.1.ebwt b/mapping/src/test/resources/ref.1.ebwt similarity index 100% rename from public/mapping/src/test/resources/ref.1.ebwt rename to mapping/src/test/resources/ref.1.ebwt diff --git a/public/gentrap/src/test/resources/ref.dict b/mapping/src/test/resources/ref.dict similarity index 100% rename from public/gentrap/src/test/resources/ref.dict rename to mapping/src/test/resources/ref.dict diff --git a/public/gentrap/src/test/resources/ref.fa b/mapping/src/test/resources/ref.fa similarity index 100% rename from public/gentrap/src/test/resources/ref.fa rename to mapping/src/test/resources/ref.fa diff --git a/public/gentrap/src/test/resources/ref.fa.fai b/mapping/src/test/resources/ref.fa.fai similarity index 100% rename from public/gentrap/src/test/resources/ref.fa.fai rename to mapping/src/test/resources/ref.fa.fai diff --git a/public/mapping/src/test/scala/nl/lumc/sasc/biopet/pipelines/mapping/MappingTest.scala b/mapping/src/test/scala/nl/lumc/sasc/biopet/pipelines/mapping/MappingTest.scala similarity index 100% rename from public/mapping/src/test/scala/nl/lumc/sasc/biopet/pipelines/mapping/MappingTest.scala rename to mapping/src/test/scala/nl/lumc/sasc/biopet/pipelines/mapping/MappingTest.scala diff --git a/pom.xml b/pom.xml index e383c77a4d26cee678f1c3446134c8582c60b28b..a7d24f0670a268d3aa738254ded8ba8006f58ee9 100644 --- a/pom.xml +++ b/pom.xml @@ -1,22 +1,280 @@ <?xml version="1.0" encoding="UTF-8"?> -<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"> +<!-- + + 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> - <artifactId>BiopetRoot</artifactId> + <artifactId>Biopet</artifactId> + <groupId>nl.lumc.sasc</groupId> + <name>Biopet</name> <packaging>pom</packaging> - <name>BiopetRoot</name> - - <parent> - <groupId>nl.lumc.sasc</groupId> - <artifactId>Biopet</artifactId> - <version>0.7.0-SNAPSHOT</version> - <relativePath>public</relativePath> - </parent> + <version>0.7.0-SNAPSHOT</version> <modules> - <module>public</module> - <module>protected</module> + <module>biopet-package</module> + <module>bam2wig</module> + <module>bammetrics</module> + <module>basty</module> + <module>carp</module> + <module>flexiprep</module> + <module>gears</module> + <module>generate-indexes</module> + <module>gentrap</module> + <module>kopisu</module> + <module>mapping</module> + <module>sage</module> + <module>shiva</module> + <module>tinycap</module> + <module>toucan</module> + <module>biopet-core</module> + <module>biopet-utils</module> + <module>biopet-tools</module> + <module>biopet-tools-extensions</module> + <module>biopet-extensions</module> + <module>biopet-tools-package</module> + <module>gwas-test</module> <module>external-example</module> - <!--<module>biopet-aggregate</module>--> </modules> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <scoverage.plugin.version>1.1.1</scoverage.plugin.version> + <scalaVersion>2.10.4</scalaVersion> + <scoverage.aggregate>true</scoverage.aggregate> + </properties> + + <build> + <sourceDirectory>${basedir}/src/main/scala</sourceDirectory> + <testSourceDirectory>${basedir}/src/test/scala</testSourceDirectory> + <testResources> + <testResource> + <directory>${basedir}/src/test/resources</directory> + <includes> + <include>**/*</include> + </includes> + </testResource> + </testResources> + <resources> + <resource> + <directory>${basedir}/src/main/resources</directory> + <includes> + <include>**/*</include> + </includes> + </resource> + </resources> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <version>2.18.1</version> + <configuration> + <forkCount>1C</forkCount> + <argLine>-Xmx300m</argLine> + <workingDirectory>${project.build.directory}</workingDirectory> + </configuration> + </plugin> + <plugin> + <artifactId>maven-dependency-plugin</artifactId> + <version>2.10</version> + <executions> + <execution> + <id>copy-installed</id> + <phase>prepare-package</phase> + <goals> + <goal>list</goal> + </goals> + <configuration> + <outputFile>${project.build.outputDirectory}/dependency_list.txt</outputFile> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>net.alchim31.maven</groupId> + <artifactId>scala-maven-plugin</artifactId> + <version>3.2.0</version> + <executions> + <execution> + <id>scala-compile</id> + <goals> + <goal>compile</goal> + <goal>testCompile</goal> + </goals> + <configuration> + <args> + <arg>-dependencyfile</arg> + <arg>${project.build.directory}/.scala_dependencies</arg> + <arg>-deprecation</arg> + <arg>-feature</arg> + </args> + </configuration> + </execution> + </executions> + <!-- ... (see other usage or goals for details) ... --> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>2.5</version> + <executions> + <execution> + <goals> + <goal>test-jar</goal> + </goals> + </execution> + </executions> + <configuration> + <archive> + <manifest> + <addDefaultImplementationEntries>true</addDefaultImplementationEntries> + <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries> + </manifest> + </archive> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>2.3.2</version> + <configuration> + <showDeprecation>true</showDeprecation> + </configuration> + </plugin> + <plugin> + <groupId>org.scalariform</groupId> + <artifactId>scalariform-maven-plugin</artifactId> + <version>0.1.4</version> + <executions> + <execution> + <phase>process-sources</phase> + <goals> + <goal>format</goal> + </goals> + <configuration> + <baseDir>${basedir}/src</baseDir> + <rewriteArrowSymbols>false</rewriteArrowSymbols> + <alignParameters>true</alignParameters> + <alignSingleLineCaseStatements_maxArrowIndent>40 + </alignSingleLineCaseStatements_maxArrowIndent> + <alignSingleLineCaseStatements>true</alignSingleLineCaseStatements> + <compactStringConcatenation>false</compactStringConcatenation> + <compactControlReadability>false</compactControlReadability> + <doubleIndentClassDeclaration>false</doubleIndentClassDeclaration> + <formatXml>true</formatXml> + <indentLocalDefs>false</indentLocalDefs> + <indentPackageBlocks>true</indentPackageBlocks> + <indentSpaces>2</indentSpaces> + <placeScaladocAsterisksBeneathSecondAsterisk>false + </placeScaladocAsterisksBeneathSecondAsterisk> + <preserveDanglingCloseParenthesis>true</preserveDanglingCloseParenthesis> + <preserveSpaceBeforeArguments>false</preserveSpaceBeforeArguments> + <rewriteArrowSymbols>false</rewriteArrowSymbols> + <spaceBeforeColon>false</spaceBeforeColon> + <spaceInsideBrackets>false</spaceInsideBrackets> + <spaceInsideParentheses>false</spaceInsideParentheses> + <spacesWithinPatternBinders>true</spacesWithinPatternBinders> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>pl.project13.maven</groupId> + <artifactId>git-commit-id-plugin</artifactId> + <version>2.1.10</version> + <executions> + <execution> + <goals> + <goal>revision</goal> + </goals> + </execution> + </executions> + <configuration> + <prefix>git</prefix> + <dateFormat>dd.MM.yyyy '@' HH:mm:ss z</dateFormat> + <verbose>false</verbose> + <dotGitDirectory>${basedir}/../../.git</dotGitDirectory> + <useNativeGit>true</useNativeGit> + <skipPoms>false</skipPoms> + <generateGitPropertiesFile>true</generateGitPropertiesFile> + <generateGitPropertiesFilename>src/main/resources/git.properties</generateGitPropertiesFilename> + <failOnNoGitDirectory>false</failOnNoGitDirectory> + <abbrevLength>8</abbrevLength> + <skip>false</skip> + <gitDescribe> + <skip>false</skip> + <always>false</always> + <abbrev>8</abbrev> + <dirty>-dirty</dirty> + <forceLongFormat>false</forceLongFormat> + </gitDescribe> + </configuration> + </plugin> + <plugin> + <groupId>com.mycila</groupId> + <artifactId>license-maven-plugin</artifactId> + <version>2.6</version> + <configuration> + <excludes> + <exclude>**/*git*</exclude> + <exclude>**/License*</exclude> + <exclude>**/*.bam</exclude> + <exclude>**/*.bai</exclude> + <exclude>**/*.gtf</exclude> + <exclude>**/*.fq</exclude> + <exclude>**/*.sam</exclude> + <exclude>**/*.bed</exclude> + <exclude>**/*.refFlat</exclude> + <exclude>**/*.R</exclude> + <exclude>**/*.rscript</exclude> + </excludes> + </configuration> + </plugin> + <plugin> + <groupId>org.scoverage</groupId> + <artifactId>scoverage-maven-plugin</artifactId> + <version>${scoverage.plugin.version}</version> + <configuration> + <scalaVersion>${scalaVersion}</scalaVersion> + <aggregate>true</aggregate> + <highlighting>true</highlighting> + <aggregate>true</aggregate> + <!-- other parameters --> + </configuration> + </plugin> + </plugins> + </build> + <reporting> + <plugins> + <plugin> + <groupId>org.scoverage</groupId> + <artifactId>scoverage-maven-plugin</artifactId> + <version>${scoverage.plugin.version}</version> + <configuration> + <aggregate>true</aggregate> <!-- for aggregated report --> + <highlighting>true</highlighting> + </configuration> + <reportSets> + <reportSet> + <reports> + <report>report</report> <!-- select only one report from: report, integration-report and report-only reporters --> + </reports> + </reportSet> + </reportSets> + </plugin> + </plugins> + </reporting> </project> diff --git a/protected/LICENSE b/protected/LICENSE deleted file mode 120000 index b1df9c9b08f76e7d2dc7fc8bed9e01802893b538..0000000000000000000000000000000000000000 --- a/protected/LICENSE +++ /dev/null @@ -1 +0,0 @@ -biopet-gatk-extensions/src/main/resources/nl/lumc/sasc/biopet/License.txt \ No newline at end of file diff --git a/protected/biopet-gatk-extensions/pom.xml b/protected/biopet-gatk-extensions/pom.xml deleted file mode 100644 index 667dd080caa402dbc3168a73ed77be40c64f30f8..0000000000000000000000000000000000000000 --- a/protected/biopet-gatk-extensions/pom.xml +++ /dev/null @@ -1,37 +0,0 @@ -<!-- - - Due to the license issue with GATK, this part of Biopet can only be used inside the - LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - on how to use this protected part of biopet or contact us at sasc@lumc.nl - ---> -<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> - - <artifactId>BiopetGatkExtensions</artifactId> - <packaging>jar</packaging> - - <parent> - <groupId>nl.lumc.sasc</groupId> - <artifactId>BiopetGatk</artifactId> - <version>0.7.0-SNAPSHOT</version> - <relativePath>../</relativePath> - </parent> - - <inceptionYear>2014</inceptionYear> - <name>BiopetGatkExtensions</name> - - <dependencies> - <dependency> - <groupId>nl.lumc.sasc</groupId> - <artifactId>BiopetExtensions</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.broadinstitute.gatk</groupId> - <artifactId>gatk-queue-extensions-distribution</artifactId> - <version>3.5</version> - </dependency> - </dependencies> -</project> diff --git a/protected/biopet-gatk-extensions/src/main/resources/nl/lumc/sasc/biopet/License.txt b/protected/biopet-gatk-extensions/src/main/resources/nl/lumc/sasc/biopet/License.txt deleted file mode 100644 index b38db2c756a4e05f7769dc6ae3d4f18ad7070dab..0000000000000000000000000000000000000000 --- a/protected/biopet-gatk-extensions/src/main/resources/nl/lumc/sasc/biopet/License.txt +++ /dev/null @@ -1,3 +0,0 @@ -Due to the license issue with GATK, this part of Biopet can only be used inside the -LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions -on how to use this protected part of biopet or contact us at sasc@lumc.nl diff --git a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/AnalyzeCovariates.scala b/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/AnalyzeCovariates.scala deleted file mode 100644 index 277390751529e743644dce7a2d9396b8d10b1228..0000000000000000000000000000000000000000 --- a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/AnalyzeCovariates.scala +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Due to the license issue with GATK, this part of Biopet can only be used inside the - * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - * on how to use this protected part of biopet or contact us at sasc@lumc.nl - */ -package nl.lumc.sasc.biopet.extensions.gatk.broad - -import java.io.File - -import nl.lumc.sasc.biopet.utils.config.Configurable - -class AnalyzeCovariates(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.AnalyzeCovariates with GatkGeneral { -} - -object AnalyzeCovariates { - def apply(root: Configurable, before: File, after: File, plots: File): AnalyzeCovariates = { - val ac = new AnalyzeCovariates(root) - ac.before = before - ac.after = after - ac.plots = plots - ac - } -} \ No newline at end of file diff --git a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/ApplyRecalibration.scala b/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/ApplyRecalibration.scala deleted file mode 100644 index 8b8ea7d5a97ca2095c981b1b11a3bae6496583a8..0000000000000000000000000000000000000000 --- a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/ApplyRecalibration.scala +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Due to the license issue with GATK, this part of Biopet can only be used inside the - * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - * on how to use this protected part of biopet or contact us at sasc@lumc.nl - */ -package nl.lumc.sasc.biopet.extensions.gatk.broad - -import java.io.File - -import nl.lumc.sasc.biopet.utils.config.Configurable - -class ApplyRecalibration(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.ApplyRecalibration with GatkGeneral { - scatterCount = config("scattercount", default = 0) - - override val defaultThreads = 3 - - override def freezeFieldValues() { - super.freezeFieldValues() - - nt = Option(getThreads) - memoryLimit = Option(nt.getOrElse(1) * 2) - - import org.broadinstitute.gatk.tools.walkers.variantrecalibration.VariantRecalibratorArgumentCollection.Mode - if (mode == Mode.INDEL) ts_filter_level = config("ts_filter_level", default = 99.0) - else if (mode == Mode.SNP) ts_filter_level = config("ts_filter_level", default = 99.5) - ts_filter_level = config("ts_filter_level") - } -} - -object ApplyRecalibration { - def apply(root: Configurable, input: File, output: File, recal_file: File, tranches_file: File, indel: Boolean = false): ApplyRecalibration = { - val ar = if (indel) new ApplyRecalibration(root) { - mode = org.broadinstitute.gatk.tools.walkers.variantrecalibration.VariantRecalibratorArgumentCollection.Mode.INDEL - } - else new ApplyRecalibration(root) { - mode = org.broadinstitute.gatk.tools.walkers.variantrecalibration.VariantRecalibratorArgumentCollection.Mode.SNP - } - ar.input :+= input - ar.recal_file = recal_file - ar.tranches_file = tranches_file - ar.out = output - ar - } -} \ No newline at end of file diff --git a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/BaseRecalibrator.scala b/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/BaseRecalibrator.scala deleted file mode 100644 index d51a28375b07aea9d3462f9d2b5f185fc2f4b629..0000000000000000000000000000000000000000 --- a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/BaseRecalibrator.scala +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Due to the license issue with GATK, this part of Biopet can only be used inside the - * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - * on how to use this protected part of biopet or contact us at sasc@lumc.nl - */ -package nl.lumc.sasc.biopet.extensions.gatk.broad - -import java.io.File - -import nl.lumc.sasc.biopet.utils.config.Configurable - -class BaseRecalibrator(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.BaseRecalibrator with GatkGeneral { - if (config.contains("scattercount")) scatterCount = config("scattercount", default = 1) - if (config.contains("dbsnp")) knownSites :+= new File(config("dbsnp").asString) - if (config.contains("known_sites")) knownSites :+= new File(config("known_sites").asString) -} - -object BaseRecalibrator { - def apply(root: Configurable, input: File, output: File): BaseRecalibrator = { - val br = new BaseRecalibrator(root) - br.input_file :+= input - br.out = output - br - } -} \ No newline at end of file diff --git a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CombineGVCFs.scala b/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CombineGVCFs.scala deleted file mode 100644 index 138067f1679f3adbeae3d3dc366ea3ecf6355df6..0000000000000000000000000000000000000000 --- a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CombineGVCFs.scala +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Due to the license issue with GATK, this part of Biopet can only be used inside the - * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - * on how to use this protected part of biopet or contact us at sasc@lumc.nl - */ -package nl.lumc.sasc.biopet.extensions.gatk.broad - -import java.io.File - -import nl.lumc.sasc.biopet.utils.config.Configurable - -class CombineGVCFs(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.CombineGVCFs with GatkGeneral { - if (config.contains("scattercount")) scatterCount = config("scattercount") -} - -object CombineGVCFs { - def apply(root: Configurable, input: List[File], output: File): CombineGVCFs = { - val cg = new CombineGVCFs(root) - cg.variant = input - cg.o = output - cg - } -} \ No newline at end of file diff --git a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CombineVariants.scala b/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CombineVariants.scala deleted file mode 100644 index b811327b9cb154277b3efb7487a1a2085ae4b9d4..0000000000000000000000000000000000000000 --- a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CombineVariants.scala +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Due to the license issue with GATK, this part of Biopet can only be used inside the - * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - * on how to use this protected part of biopet or contact us at sasc@lumc.nl - */ -package nl.lumc.sasc.biopet.extensions.gatk.broad - -import java.io.File - -import nl.lumc.sasc.biopet.utils.config.Configurable - -class CombineVariants(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.CombineVariants with GatkGeneral { - if (config.contains("scattercount")) scatterCount = config("scattercount") -} - -object CombineVariants { - def apply(root: Configurable, input: List[File], output: File): CombineVariants = { - val cv = new CombineVariants(root) - cv.variant = input - cv.out = output - cv - } -} \ No newline at end of file diff --git a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/GenotypeGVCFs.scala b/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/GenotypeGVCFs.scala deleted file mode 100644 index 30ec0d09721ee7d06c69da3fffa3681579b7cb19..0000000000000000000000000000000000000000 --- a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/GenotypeGVCFs.scala +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Due to the license issue with GATK, this part of Biopet can only be used inside the - * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - * on how to use this protected part of biopet or contact us at sasc@lumc.nl - */ -package nl.lumc.sasc.biopet.extensions.gatk.broad - -import java.io.File - -import nl.lumc.sasc.biopet.utils.config.Configurable -import org.broadinstitute.gatk.utils.commandline.{ Gather, Output } - -class GenotypeGVCFs(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.GenotypeGVCFs with GatkGeneral { - - @Gather(enabled = false) - @Output(required = false) - protected var vcfIndex: File = _ - - annotation ++= config("annotation", default = Seq(), freeVar = false).asStringList - - if (config.contains("dbsnp")) dbsnp = config("dbsnp") - if (config.contains("scattercount", "genotypegvcfs")) scatterCount = config("scattercount") - - if (config("inputtype", default = "dna").asString == "rna") { - stand_call_conf = config("stand_call_conf", default = 20) - stand_emit_conf = config("stand_emit_conf", default = 0) - } else { - stand_call_conf = config("stand_call_conf", default = 30) - stand_emit_conf = config("stand_emit_conf", default = 0) - } - - override def freezeFieldValues(): Unit = { - super.freezeFieldValues() - if (out.getName.endsWith(".vcf.gz")) vcfIndex = new File(out.getAbsolutePath + ".tbi") - } -} - -object GenotypeGVCFs { - def apply(root: Configurable, gvcfFiles: List[File], output: File): GenotypeGVCFs = { - val gg = new GenotypeGVCFs(root) - gg.variant = gvcfFiles - gg.out = output - if (gg.out.getName.endsWith(".vcf.gz")) gg.vcfIndex = new File(gg.out.getAbsolutePath + ".tbi") - gg - } -} \ No newline at end of file diff --git a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/HaplotypeCaller.scala b/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/HaplotypeCaller.scala deleted file mode 100644 index d7a07538c9cfcff82786c0d09d38001899783af5..0000000000000000000000000000000000000000 --- a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/HaplotypeCaller.scala +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Due to the license issue with GATK, this part of Biopet can only be used inside the - * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - * on how to use this protected part of biopet or contact us at sasc@lumc.nl - */ -package nl.lumc.sasc.biopet.extensions.gatk.broad - -import java.io.File - -import nl.lumc.sasc.biopet.utils.config.Configurable -import org.broadinstitute.gatk.utils.commandline.{ Gather, Output } -import org.broadinstitute.gatk.utils.variant.GATKVCFIndexType - -class HaplotypeCaller(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.HaplotypeCaller with GatkGeneral { - - @Gather(enabled = false) - @Output(required = false) - protected var vcfIndex: File = _ - - override val defaultThreads = 1 - - min_mapping_quality_score = config("minMappingQualityScore", default = 20) - scatterCount = config("scattercount", default = 1) - if (config.contains("dbsnp")) this.dbsnp = config("dbsnp") - this.sample_ploidy = config("ploidy") - if (config.contains("bamOutput")) bamOutput = config("bamOutput") - if (config.contains("allSitePLs")) allSitePLs = config("allSitePLs") - if (config.contains("output_mode")) { - import org.broadinstitute.gatk.tools.walkers.genotyper.OutputMode._ - config("output_mode").asString match { - case "EMIT_ALL_CONFIDENT_SITES" => output_mode = EMIT_ALL_CONFIDENT_SITES - case "EMIT_ALL_SITES" => output_mode = EMIT_ALL_SITES - case "EMIT_VARIANTS_ONLY" => output_mode = EMIT_VARIANTS_ONLY - case e => logger.warn("output mode '" + e + "' does not exist") - } - } - - if (config("inputtype", default = "dna").asString == "rna") { - dontUseSoftClippedBases = config("dontusesoftclippedbases", default = true) - stand_call_conf = config("stand_call_conf", default = 5) - stand_emit_conf = config("stand_emit_conf", default = 0) - } else { - dontUseSoftClippedBases = config("dontusesoftclippedbases", default = false) - stand_call_conf = config("stand_call_conf", default = 5) - stand_emit_conf = config("stand_emit_conf", default = 0) - } - - override def freezeFieldValues() { - super.freezeFieldValues() - if (out.getName.endsWith(".vcf.gz")) vcfIndex = new File(out.getAbsolutePath + ".tbi") - if (bamOutput != null && nct.getOrElse(1) > 1) { - logger.warn("BamOutput is on, nct/threads is forced to set on 1, this option is only for debug") - nCoresRequest = Some(1) - } - nct = Some(getThreads) - memoryLimit = Option(memoryLimit.getOrElse(2.0) * nct.getOrElse(1)) - } -} - -object HaplotypeCaller { - def apply(root: Configurable, inputFiles: List[File], outputFile: File): HaplotypeCaller = { - val hc = new HaplotypeCaller(root) - hc.input_file = inputFiles - hc.out = outputFile - if (hc.out.getName.endsWith(".vcf.gz")) hc.vcfIndex = new File(hc.out.getAbsolutePath + ".tbi") - hc - } - - def gvcf(root: Configurable, inputFile: File, outputFile: File): HaplotypeCaller = { - val hc = apply(root, List(inputFile), outputFile) - hc.emitRefConfidence = org.broadinstitute.gatk.tools.walkers.haplotypecaller.ReferenceConfidenceMode.GVCF - hc.variant_index_type = GATKVCFIndexType.LINEAR - hc.variant_index_parameter = Some(hc.config("variant_index_parameter", default = 128000).asInt) - hc - } -} \ No newline at end of file diff --git a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/IndelRealigner.scala b/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/IndelRealigner.scala deleted file mode 100644 index 868b6ed0a62f87cf169571debd16a125ce8e9fc9..0000000000000000000000000000000000000000 --- a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/IndelRealigner.scala +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Due to the license issue with GATK, this part of Biopet can only be used inside the - * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - * on how to use this protected part of biopet or contact us at sasc@lumc.nl - */ -package nl.lumc.sasc.biopet.extensions.gatk.broad - -import java.io.File - -import nl.lumc.sasc.biopet.utils.config.Configurable -import org.broadinstitute.gatk.utils.commandline.{ Gather, Output } - -class IndelRealigner(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.IndelRealigner with GatkGeneral { - - @Gather(enabled = false) - @Output - protected var bamIndex: File = _ - - if (config.contains("scattercount")) scatterCount = config("scattercount") -} - -object IndelRealigner { - def apply(root: Configurable, input: File, targetIntervals: File, outputDir: File): IndelRealigner = { - val ir = new IndelRealigner(root) - ir.input_file :+= input - ir.targetIntervals = targetIntervals - ir.out = new File(outputDir, input.getName.stripSuffix(".bam") + ".realign.bam") - ir.bamIndex = new File(outputDir, input.getName.stripSuffix(".bam") + ".realign.bai") - ir - } -} \ No newline at end of file diff --git a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/PrintReads.scala b/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/PrintReads.scala deleted file mode 100644 index 554208c3af1d791c71d97a17087f02321657de8c..0000000000000000000000000000000000000000 --- a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/PrintReads.scala +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Due to the license issue with GATK, this part of Biopet can only be used inside the - * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - * on how to use this protected part of biopet or contact us at sasc@lumc.nl - */ -package nl.lumc.sasc.biopet.extensions.gatk.broad - -import java.io.File - -import nl.lumc.sasc.biopet.utils.config.Configurable - -class PrintReads(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.PrintReads with GatkGeneral { - if (config.contains("scattercount")) scatterCount = config("scattercount") -} - -object PrintReads { - def apply(root: Configurable, input: File, output: File): PrintReads = { - val br = new PrintReads(root) - br.input_file :+= input - br.out = output - br - } -} \ No newline at end of file diff --git a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/RealignerTargetCreator.scala b/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/RealignerTargetCreator.scala deleted file mode 100644 index a884e83781227ce2b39b3f98573c3d89f8129d1b..0000000000000000000000000000000000000000 --- a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/RealignerTargetCreator.scala +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Due to the license issue with GATK, this part of Biopet can only be used inside the - * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - * on how to use this protected part of biopet or contact us at sasc@lumc.nl - */ -package nl.lumc.sasc.biopet.extensions.gatk.broad - -import java.io.File - -import nl.lumc.sasc.biopet.utils.config.Configurable - -class RealignerTargetCreator(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.RealignerTargetCreator with GatkGeneral { - if (config.contains("scattercount")) scatterCount = config("scattercount") - - if (config.contains("known")) known ++= config("known").asFileList -} - -object RealignerTargetCreator { - def apply(root: Configurable, input: File, outputDir: File): RealignerTargetCreator = { - val re = new RealignerTargetCreator(root) - re.input_file :+= input - re.out = new File(outputDir, input.getName.stripSuffix(".bam") + ".realign.intervals") - re - } -} \ No newline at end of file diff --git a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/SelectVariants.scala b/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/SelectVariants.scala deleted file mode 100644 index abb27c5fc34d73ab62ffae928e622d6cda64c4d9..0000000000000000000000000000000000000000 --- a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/SelectVariants.scala +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Due to the license issue with GATK, this part of Biopet can only be used inside the - * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - * on how to use this protected part of biopet or contact us at sasc@lumc.nl - */ -package nl.lumc.sasc.biopet.extensions.gatk.broad - -import java.io.File - -import nl.lumc.sasc.biopet.utils.config.Configurable - -class SelectVariants(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.SelectVariants with GatkGeneral { - if (config.contains("scattercount")) scatterCount = config("scattercount") -} - -object SelectVariants { - def apply(root: Configurable, input: File, output: File): SelectVariants = { - val sv = new SelectVariants(root) - sv.variant = input - sv.out = output - sv - } -} \ No newline at end of file diff --git a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/UnifiedGenotyper.scala b/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/UnifiedGenotyper.scala deleted file mode 100644 index 71e00e0512dee4a5d7f12744d729a8166ca18fe0..0000000000000000000000000000000000000000 --- a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/UnifiedGenotyper.scala +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Due to the license issue with GATK, this part of Biopet can only be used inside the - * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - * on how to use this protected part of biopet or contact us at sasc@lumc.nl - */ -package nl.lumc.sasc.biopet.extensions.gatk.broad - -import java.io.File - -import nl.lumc.sasc.biopet.utils.config.Configurable -import org.broadinstitute.gatk.utils.commandline.{ Gather, Output } - -class UnifiedGenotyper(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.UnifiedGenotyper with GatkGeneral { - - @Gather(enabled = false) - @Output(required = false) - protected var vcfIndex: File = _ - - if (config.contains("scattercount")) scatterCount = config("scattercount") - if (config.contains("dbsnp")) this.dbsnp = config("dbsnp") - sample_ploidy = config("ploidy") - if (config.contains("allSitePLs")) this.allSitePLs = config("allSitePLs") - - stand_call_conf = config("stand_call_conf", default = 5) - stand_emit_conf = config("stand_emit_conf", default = 0) - - if (config.contains("output_mode")) { - import org.broadinstitute.gatk.tools.walkers.genotyper.OutputMode._ - config("output_mode").asString match { - case "EMIT_ALL_CONFIDENT_SITES" => output_mode = EMIT_ALL_CONFIDENT_SITES - case "EMIT_ALL_SITES" => output_mode = EMIT_ALL_SITES - case "EMIT_VARIANTS_ONLY" => output_mode = EMIT_VARIANTS_ONLY - case e => logger.warn("output mode '" + e + "' does not exist") - } - } - - override val defaultThreads = 1 - - override def freezeFieldValues() { - super.freezeFieldValues() - - genotype_likelihoods_model = org.broadinstitute.gatk.tools.walkers.genotyper.GenotypeLikelihoodsCalculationModel.Model.BOTH - nct = Some(getThreads) - memoryLimit = Option(nct.getOrElse(1) * memoryLimit.getOrElse(2.0)) - } -} - -object UnifiedGenotyper { - def apply(root: Configurable, inputFiles: List[File], outputFile: File): UnifiedGenotyper = { - val ug = new UnifiedGenotyper(root) - ug.input_file = inputFiles - ug.out = outputFile - if (ug.out.getName.endsWith(".vcf.gz")) ug.vcfIndex = new File(ug.out.getAbsolutePath + ".tbi") - ug - } - -} \ No newline at end of file diff --git a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantAnnotator.scala b/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantAnnotator.scala deleted file mode 100644 index b26549622f2ee5131538baf8cc2882416bf3ae33..0000000000000000000000000000000000000000 --- a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantAnnotator.scala +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Due to the license issue with GATK, this part of Biopet can only be used inside the - * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - * on how to use this protected part of biopet or contact us at sasc@lumc.nl - */ -package nl.lumc.sasc.biopet.extensions.gatk.broad - -import java.io.File - -import nl.lumc.sasc.biopet.utils.config.Configurable - -class VariantAnnotator(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.VariantAnnotator with GatkGeneral { - if (config.contains("scattercount")) scatterCount = config("scattercount") - dbsnp = config("dbsnp") -} - -object VariantAnnotator { - def apply(root: Configurable, input: File, bamFiles: List[File], output: File): VariantAnnotator = { - val va = new VariantAnnotator(root) - va.variant = input - va.input_file = bamFiles - va.out = output - va - } -} \ No newline at end of file diff --git a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantEval.scala b/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantEval.scala deleted file mode 100644 index fdb6e7e27b08793f44fb94d82c5ceef0033d4ed5..0000000000000000000000000000000000000000 --- a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantEval.scala +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Due to the license issue with GATK, this part of Biopet can only be used inside the - * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - * on how to use this protected part of biopet or contact us at sasc@lumc.nl - */ -package nl.lumc.sasc.biopet.extensions.gatk.broad - -import java.io.File - -import nl.lumc.sasc.biopet.utils.config.Configurable - -class VariantEval(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.VariantEval with GatkGeneral { -} - -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 - } - - 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 - } - -} \ No newline at end of file diff --git a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantRecalibrator.scala b/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantRecalibrator.scala deleted file mode 100644 index e4fdf3d2d26875e7795802fbda50c00ac118c875..0000000000000000000000000000000000000000 --- a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantRecalibrator.scala +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Due to the license issue with GATK, this part of Biopet can only be used inside the - * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - * on how to use this protected part of biopet or contact us at sasc@lumc.nl - */ -package nl.lumc.sasc.biopet.extensions.gatk.broad - -import java.io.File - -import nl.lumc.sasc.biopet.utils.config.Configurable -import org.broadinstitute.gatk.queue.extensions.gatk.TaggedFile - -class VariantRecalibrator(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.VariantRecalibrator with GatkGeneral { - override val defaultThreads = 4 - - nt = Option(getThreads) - memoryLimit = Option(nt.getOrElse(1) * 2) - - if (config.contains("dbsnp")) resource :+= new TaggedFile(config("dbsnp").asString, "known=true,training=false,truth=false,prior=2.0") - - an = config("annotation", default = List("QD", "DP", "FS", "ReadPosRankSum", "MQRankSum")).asStringList - minNumBadVariants = config("minnumbadvariants") - maxGaussians = config("maxgaussians") -} - -object VariantRecalibrator { - def apply(root: Configurable, input: File, recal_file: File, tranches_file: File, indel: Boolean = false): VariantRecalibrator = { - val vr = new VariantRecalibrator(root) { - override lazy val configNamespace = "variantrecalibrator" - override def configPath: List[String] = (if (indel) "indel" else "snp") :: super.configPath - if (indel) { - mode = org.broadinstitute.gatk.tools.walkers.variantrecalibration.VariantRecalibratorArgumentCollection.Mode.INDEL - if (config.contains("mills")) resource :+= new TaggedFile(config("mills").asString, "known=false,training=true,truth=true,prior=12.0") - } else { - mode = org.broadinstitute.gatk.tools.walkers.variantrecalibration.VariantRecalibratorArgumentCollection.Mode.SNP - if (config.contains("hapmap")) resource +:= new TaggedFile(config("hapmap").asString, "known=false,training=true,truth=true,prior=15.0") - if (config.contains("omni")) resource +:= new TaggedFile(config("omni").asString, "known=false,training=true,truth=true,prior=12.0") - if (config.contains("1000G")) resource +:= new TaggedFile(config("1000G").asString, "known=false,training=true,truth=false,prior=10.0") - } - } - vr.input :+= input - vr.recal_file = recal_file - vr.tranches_file = tranches_file - vr - } -} \ No newline at end of file diff --git a/protected/biopet-gatk-extensions/src/test/resources/log4j.properties b/protected/biopet-gatk-extensions/src/test/resources/log4j.properties deleted file mode 100644 index 52fb824b0a8088346ed39f9de816309d0569ecf6..0000000000000000000000000000000000000000 --- a/protected/biopet-gatk-extensions/src/test/resources/log4j.properties +++ /dev/null @@ -1,15 +0,0 @@ -# -# Due to the license issue with GATK, this part of Biopet can only be used inside the -# LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions -# on how to use this protected part of biopet or contact us at sasc@lumc.nl -# - -# Set root logger level to DEBUG and its only appender to A1. -log4j.rootLogger=ERROR, A1 - -# A1 is set to be a ConsoleAppender. -log4j.appender.A1=org.apache.log4j.ConsoleAppender - -# A1 uses PatternLayout. -log4j.appender.A1.layout=org.apache.log4j.PatternLayout -log4j.appender.A1.layout.ConversionPattern=%-5p [%d] [%C{1}] - %m%n \ No newline at end of file diff --git a/protected/biopet-gatk-pipelines/pom.xml b/protected/biopet-gatk-pipelines/pom.xml deleted file mode 100644 index f1f5df4c43b52e1219541c5907069654d5086843..0000000000000000000000000000000000000000 --- a/protected/biopet-gatk-pipelines/pom.xml +++ /dev/null @@ -1,64 +0,0 @@ -<!-- - - Due to the license issue with GATK, this part of Biopet can only be used inside the - LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - on how to use this protected part of biopet or contact us at sasc@lumc.nl - ---> -<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> - - <artifactId>BiopetGatkPipelines</artifactId> - <packaging>jar</packaging> - - <parent> - <groupId>nl.lumc.sasc</groupId> - <artifactId>BiopetGatk</artifactId> - <version>0.7.0-SNAPSHOT</version> - <relativePath>../</relativePath> - </parent> - - <inceptionYear>2014</inceptionYear> - <name>BiopetGatkPipelines</name> - - <dependencies> - <dependency> - <groupId>nl.lumc.sasc</groupId> - <artifactId>BiopetCore</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>nl.lumc.sasc</groupId> - <artifactId>BiopetGatkExtensions</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>nl.lumc.sasc</groupId> - <artifactId>Mapping</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>nl.lumc.sasc</groupId> - <artifactId>Basty</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>nl.lumc.sasc</groupId> - <artifactId>Shiva</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>6.8</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.scalatest</groupId> - <artifactId>scalatest_2.10</artifactId> - <version>2.2.1</version> - <scope>test</scope> - </dependency> - </dependencies> -</project> diff --git a/protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/Basty.scala b/protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/Basty.scala deleted file mode 100644 index ecf4ccf901f8339db7da75c499bfae17a657eb16..0000000000000000000000000000000000000000 --- a/protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/Basty.scala +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Due to the license issue with GATK, this part of Biopet can only be used inside the - * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - * on how to use this protected part of biopet or contact us at sasc@lumc.nl - */ -package nl.lumc.sasc.biopet.pipelines.gatk - -import nl.lumc.sasc.biopet.core.PipelineCommand -import nl.lumc.sasc.biopet.utils.config.Configurable -import nl.lumc.sasc.biopet.pipelines.basty.BastyTrait -import org.broadinstitute.gatk.queue.QScript - -/** - * Basty pipeline including GATK steps - * - * Created by pjvan_thof on 3/4/15. - */ -class Basty(val root: Configurable) extends QScript with BastyTrait { - qscript => - def this() = this(null) - - override def variantcallers = List("unifiedgenotyper") - - override lazy val shiva = new Shiva(qscript) -} - -object Basty extends PipelineCommand \ No newline at end of file diff --git a/protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/Shiva.scala b/protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/Shiva.scala deleted file mode 100644 index 244fae67a31938f4eadaa5228c979bf4a4cd9011..0000000000000000000000000000000000000000 --- a/protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/Shiva.scala +++ /dev/null @@ -1,135 +0,0 @@ -/** - * Due to the license issue with GATK, this part of Biopet can only be used inside the - * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - * on how to use this protected part of biopet or contact us at sasc@lumc.nl - */ -package nl.lumc.sasc.biopet.pipelines.gatk - -import nl.lumc.sasc.biopet.core.PipelineCommand -import nl.lumc.sasc.biopet.extensions.gatk.broad._ -import nl.lumc.sasc.biopet.pipelines.shiva.ShivaTrait -import nl.lumc.sasc.biopet.utils.config.Configurable -import org.broadinstitute.gatk.queue.QScript - -/** - * Shiva inplementation with GATK steps - * - * Created by pjvan_thof on 2/26/15. - */ -class Shiva(val root: Configurable) extends QScript with ShivaTrait { - qscript => - def this() = this(null) - - /** Make variantcalling namespace, this with the gatk modes in there */ - override def makeVariantcalling(multisample: Boolean = false) = { - if (multisample) new ShivaVariantcalling(qscript) { - override def namePrefix = "multisample" - override def configNamespace = "shivavariantcalling" - override def configPath: List[String] = super.configPath ::: "multisample" :: Nil - } - else new ShivaVariantcalling(qscript) { - override def configNamespace = "shivavariantcalling" - } - } - - /** Makes a sample */ - override def makeSample(id: String) = new this.Sample(id) - - /** Class will generate sample jobs */ - class Sample(sampleId: String) extends super.Sample(sampleId) { - /** Makes a library */ - override def makeLibrary(id: String) = new this.Library(id) - - /** Class will generate library jobs */ - class Library(libId: String) extends super.Library(libId) { - - lazy val useIndelRealigner: Boolean = config("use_indel_realigner", default = true) - lazy val useBaseRecalibration: Boolean = { - val c: Boolean = config("use_base_recalibration", default = true) - val br = new BaseRecalibrator(qscript) - if (c && br.knownSites.isEmpty) - logger.warn("No Known site found, skipping base recalibration, file: " + inputBam) - c && br.knownSites.nonEmpty - } - - override def summarySettings = super.summarySettings + - ("use_indel_realigner" -> useIndelRealigner) + - ("use_base_recalibration" -> useBaseRecalibration) - - override def preProcessBam = if (useIndelRealigner && useBaseRecalibration) - bamFile.map(swapExt(libDir, _, ".bam", ".realign.baserecal.bam")) - else if (useIndelRealigner) bamFile.map(swapExt(libDir, _, ".bam", ".realign.bam")) - else if (useBaseRecalibration) bamFile.map(swapExt(libDir, _, ".bam", ".baserecal.bam")) - else bamFile - - override def addJobs(): Unit = { - super.addJobs() - if (useIndelRealigner && useBaseRecalibration) { - val file = addIndelRealign(bamFile.get, libDir, isIntermediate = true) - addBaseRecalibrator(file, libDir, libraries.size > 1) - } else if (useIndelRealigner) { - addIndelRealign(bamFile.get, libDir, libraries.size > 1) - } else if (useBaseRecalibration) { - addBaseRecalibrator(bamFile.get, libDir, libraries.size > 1) - } - } - } - - override def keepMergedFiles: Boolean = config("keep_merged_files", default = !useIndelRealigner) - - override def summarySettings = super.summarySettings + ("use_indel_realigner" -> useIndelRealigner) - - lazy val useIndelRealigner: Boolean = config("use_indel_realigner", default = true) - - override def preProcessBam = if (useIndelRealigner && libraries.values.flatMap(_.preProcessBam).size > 1) { - bamFile.map(swapExt(sampleDir, _, ".bam", ".realign.bam")) - } else bamFile - - override def addJobs(): Unit = { - super.addJobs() - - if (useIndelRealigner && libraries.values.flatMap(_.preProcessBam).size > 1) { - addIndelRealign(bamFile.get, sampleDir, false) - } - } - } - - /** Adds indel realignment jobs */ - def addIndelRealign(inputBam: File, dir: File, isIntermediate: Boolean): File = { - val realignerTargetCreator = RealignerTargetCreator(this, inputBam, dir) - realignerTargetCreator.isIntermediate = true - add(realignerTargetCreator) - - val indelRealigner = IndelRealigner(this, inputBam, realignerTargetCreator.out, dir) - indelRealigner.isIntermediate = isIntermediate - add(indelRealigner) - - indelRealigner.o - } - - /** Adds base recalibration jobs */ - def addBaseRecalibrator(inputBam: File, dir: File, isIntermediate: Boolean): File = { - val baseRecalibrator = BaseRecalibrator(this, inputBam, swapExt(dir, inputBam, ".bam", ".baserecal")) - - if (baseRecalibrator.knownSites.isEmpty) return inputBam - add(baseRecalibrator) - - if (config("use_analyze_covariates", default = false).asBoolean) { - val baseRecalibratorAfter = BaseRecalibrator(this, inputBam, swapExt(dir, inputBam, ".bam", ".baserecal.after")) - baseRecalibratorAfter.BQSR = baseRecalibrator.o - add(baseRecalibratorAfter) - - add(AnalyzeCovariates(this, baseRecalibrator.o, baseRecalibratorAfter.o, swapExt(dir, inputBam, ".bam", ".baserecal.pdf"))) - } - - val printReads = PrintReads(this, inputBam, swapExt(dir, inputBam, ".bam", ".baserecal.bam")) - printReads.BQSR = baseRecalibrator.o - printReads.isIntermediate = isIntermediate - add(printReads) - - printReads.o - } -} - -/** This object give a default main methods for this pipeline */ -object Shiva extends PipelineCommand \ No newline at end of file diff --git a/protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/ShivaVariantcalling.scala b/protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/ShivaVariantcalling.scala deleted file mode 100644 index edbc633f3a03204f3d4e50ac14bc016134825252..0000000000000000000000000000000000000000 --- a/protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/ShivaVariantcalling.scala +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Due to the license issue with GATK, this part of Biopet can only be used inside the - * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - * on how to use this protected part of biopet or contact us at sasc@lumc.nl - */ -package nl.lumc.sasc.biopet.pipelines.gatk - -import nl.lumc.sasc.biopet.core.PipelineCommand -import nl.lumc.sasc.biopet.pipelines.gatk.variantcallers._ -import nl.lumc.sasc.biopet.pipelines.shiva.ShivaVariantcallingTrait -import nl.lumc.sasc.biopet.utils.config.Configurable -import org.broadinstitute.gatk.queue.QScript - -/** - * ShivaVariantcalling with GATK variantcallers - * - * Created by pjvan_thof on 2/26/15. - */ -class ShivaVariantcalling(val root: Configurable) extends QScript with ShivaVariantcallingTrait { - qscript => - def this() = this(null) - - /** Will generate all available variantcallers */ - override def callersList = { - new HaplotypeCallerGvcf(this) :: - new HaplotypeCallerAllele(this) :: - new UnifiedGenotyperAllele(this) :: - new UnifiedGenotyper(this) :: - new HaplotypeCaller(this) :: - super.callersList - } -} - -/** object to add default main method to pipeline */ -object ShivaVariantcalling extends PipelineCommand \ No newline at end of file diff --git a/protected/biopet-gatk-pipelines/src/test/resources/log4j.properties b/protected/biopet-gatk-pipelines/src/test/resources/log4j.properties deleted file mode 100644 index 52fb824b0a8088346ed39f9de816309d0569ecf6..0000000000000000000000000000000000000000 --- a/protected/biopet-gatk-pipelines/src/test/resources/log4j.properties +++ /dev/null @@ -1,15 +0,0 @@ -# -# Due to the license issue with GATK, this part of Biopet can only be used inside the -# LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions -# on how to use this protected part of biopet or contact us at sasc@lumc.nl -# - -# Set root logger level to DEBUG and its only appender to A1. -log4j.rootLogger=ERROR, A1 - -# A1 is set to be a ConsoleAppender. -log4j.appender.A1=org.apache.log4j.ConsoleAppender - -# A1 uses PatternLayout. -log4j.appender.A1.layout=org.apache.log4j.PatternLayout -log4j.appender.A1.layout.ConversionPattern=%-5p [%d] [%C{1}] - %m%n \ No newline at end of file diff --git a/protected/biopet-protected-package/pom.xml b/protected/biopet-protected-package/pom.xml deleted file mode 100644 index 03b88654a2ff63177615f1299a9e058420080ac4..0000000000000000000000000000000000000000 --- a/protected/biopet-protected-package/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ -<!-- - - Due to the license issue with GATK, this part of Biopet can only be used inside the - LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - on how to use this protected part of biopet or contact us at sasc@lumc.nl - ---> -<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> - - <artifactId>BiopetProtectedPackage</artifactId> - <packaging>jar</packaging> - - <parent> - <groupId>nl.lumc.sasc</groupId> - <artifactId>BiopetGatk</artifactId> - <version>0.7.0-SNAPSHOT</version> - <relativePath>../</relativePath> - </parent> - - <inceptionYear>2014</inceptionYear> - <name>BiopetProtectedPackage</name> - - <properties> - <sting.shade.phase>package</sting.shade.phase> - <app.main.class>nl.lumc.sasc.biopet.BiopetExecutableProtected</app.main.class> - </properties> - - <dependencies> - <dependency> - <groupId>nl.lumc.sasc</groupId> - <artifactId>BiopetCore</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>nl.lumc.sasc</groupId> - <artifactId>BiopetPublicPackage</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>nl.lumc.sasc</groupId> - <artifactId>BiopetGatkPipelines</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>nl.lumc.sasc</groupId> - <artifactId>Basty</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> - <version>2.4.1</version> - <configuration> - <!--suppress MavenModelInspection --> - <finalName>Biopet-${project.version}-${git.commit.id.abbrev}</finalName> - <transformers> - <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> - <manifestEntries> - <Main-Class>${app.main.class}</Main-Class> - <!--suppress MavenModelInspection --> - <X-Compile-Source-JDK>${maven.compile.source}</X-Compile-Source-JDK> - <!--suppress MavenModelInspection --> - <X-Compile-Target-JDK>${maven.compile.target}</X-Compile-Target-JDK> - </manifestEntries> - </transformer> - </transformers> - <filters> - <filter> - <artifact>nl.lumc.sasc:BiopetFramework</artifact> - <excludes> - <exclude>nl/lumc/sasc/biopet/License.txt</exclude> - </excludes> - </filter> - </filters> - </configuration> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>shade</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/protected/biopet-protected-package/src/main/scala/nl/lumc/sasc/biopet/BiopetExecutableProtected.scala b/protected/biopet-protected-package/src/main/scala/nl/lumc/sasc/biopet/BiopetExecutableProtected.scala deleted file mode 100644 index 9155e7dbacf4fd624694ac06a1ddf24c69071afe..0000000000000000000000000000000000000000 --- a/protected/biopet-protected-package/src/main/scala/nl/lumc/sasc/biopet/BiopetExecutableProtected.scala +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Due to the license issue with GATK, this part of Biopet can only be used inside the - * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - * on how to use this protected part of biopet or contact us at sasc@lumc.nl - */ -package nl.lumc.sasc.biopet - -import nl.lumc.sasc.biopet.utils.{ BiopetExecutable, MainCommand } - -object BiopetExecutableProtected extends BiopetExecutable { - def pipelines: List[MainCommand] = BiopetExecutablePublic.publicPipelines ::: List( - nl.lumc.sasc.biopet.pipelines.gatk.Shiva, - nl.lumc.sasc.biopet.pipelines.gatk.ShivaVariantcalling, - nl.lumc.sasc.biopet.pipelines.gatk.Basty) - - def tools = BiopetExecutablePublic.tools -} \ No newline at end of file diff --git a/protected/biopet-protected-package/src/test/resources/log4j.properties b/protected/biopet-protected-package/src/test/resources/log4j.properties deleted file mode 100644 index 52fb824b0a8088346ed39f9de816309d0569ecf6..0000000000000000000000000000000000000000 --- a/protected/biopet-protected-package/src/test/resources/log4j.properties +++ /dev/null @@ -1,15 +0,0 @@ -# -# Due to the license issue with GATK, this part of Biopet can only be used inside the -# LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions -# on how to use this protected part of biopet or contact us at sasc@lumc.nl -# - -# Set root logger level to DEBUG and its only appender to A1. -log4j.rootLogger=ERROR, A1 - -# A1 is set to be a ConsoleAppender. -log4j.appender.A1=org.apache.log4j.ConsoleAppender - -# A1 uses PatternLayout. -log4j.appender.A1.layout=org.apache.log4j.PatternLayout -log4j.appender.A1.layout.ConversionPattern=%-5p [%d] [%C{1}] - %m%n \ No newline at end of file diff --git a/protected/log4j.properties b/protected/log4j.properties deleted file mode 100644 index 52fb824b0a8088346ed39f9de816309d0569ecf6..0000000000000000000000000000000000000000 --- a/protected/log4j.properties +++ /dev/null @@ -1,15 +0,0 @@ -# -# Due to the license issue with GATK, this part of Biopet can only be used inside the -# LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions -# on how to use this protected part of biopet or contact us at sasc@lumc.nl -# - -# Set root logger level to DEBUG and its only appender to A1. -log4j.rootLogger=ERROR, A1 - -# A1 is set to be a ConsoleAppender. -log4j.appender.A1=org.apache.log4j.ConsoleAppender - -# A1 uses PatternLayout. -log4j.appender.A1.layout=org.apache.log4j.PatternLayout -log4j.appender.A1.layout.ConversionPattern=%-5p [%d] [%C{1}] - %m%n \ No newline at end of file diff --git a/protected/pom.xml b/protected/pom.xml deleted file mode 100644 index fa84a64573890a57aa3cafca124da515f19053de..0000000000000000000000000000000000000000 --- a/protected/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Due to the license issue with GATK, this part of Biopet can only be used inside the - LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - on how to use this protected part of biopet or contact us at sasc@lumc.nl - ---> -<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> - <parent> - <groupId>nl.lumc.sasc</groupId> - <artifactId>BiopetRoot</artifactId> - <version>0.7.0-SNAPSHOT</version> - <relativePath>../</relativePath> - </parent> - <artifactId>BiopetGatk</artifactId> - <name>BiopetGatk</name> - <packaging>pom</packaging> - <modules> - <module>biopet-gatk-extensions</module> - <module>biopet-gatk-pipelines</module> - <module>biopet-protected-package</module> - </modules> -</project> \ No newline at end of file diff --git a/protected/src/src/test/resources/log4j.properties b/protected/src/src/test/resources/log4j.properties deleted file mode 100644 index 52fb824b0a8088346ed39f9de816309d0569ecf6..0000000000000000000000000000000000000000 --- a/protected/src/src/test/resources/log4j.properties +++ /dev/null @@ -1,15 +0,0 @@ -# -# Due to the license issue with GATK, this part of Biopet can only be used inside the -# LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions -# on how to use this protected part of biopet or contact us at sasc@lumc.nl -# - -# Set root logger level to DEBUG and its only appender to A1. -log4j.rootLogger=ERROR, A1 - -# A1 is set to be a ConsoleAppender. -log4j.appender.A1=org.apache.log4j.ConsoleAppender - -# A1 uses PatternLayout. -log4j.appender.A1.layout=org.apache.log4j.PatternLayout -log4j.appender.A1.layout.ConversionPattern=%-5p [%d] [%C{1}] - %m%n \ No newline at end of file diff --git a/public/.gitattributes b/public/.gitattributes deleted file mode 100644 index 492710bca31fa309d678c9c5f1047a5ed232fe16..0000000000000000000000000000000000000000 --- a/public/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -*.bam binary -*.bam.bai binary diff --git a/public/.gitignore b/public/.gitignore deleted file mode 100644 index eb9e98910e679749a1ae2334df8842db3379cc83..0000000000000000000000000000000000000000 --- a/public/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -# Project-related -dependency-reduced-pom.xml -git.properties - -# gedit -*~ -# Vim -*.swp -# IntelliJ -.idea/workspace.xml -/target/ -/public/target/ -/protected/target/ diff --git a/public/basty/src/main/scala/nl/lumc/sasc/biopet/pipelines/basty/Basty.scala b/public/basty/src/main/scala/nl/lumc/sasc/biopet/pipelines/basty/Basty.scala deleted file mode 100644 index 8476d1bbc56270b2da0d1df6eae20e19a6886bcc..0000000000000000000000000000000000000000 --- a/public/basty/src/main/scala/nl/lumc/sasc/biopet/pipelines/basty/Basty.scala +++ /dev/null @@ -1,31 +0,0 @@ -/** - * 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. - */ -package nl.lumc.sasc.biopet.pipelines.basty - -import nl.lumc.sasc.biopet.core.PipelineCommand -import nl.lumc.sasc.biopet.utils.config.Configurable -import org.broadinstitute.gatk.queue.QScript - -/** - * Basty implementation without GATK parts - * - * Created by pjvan_thof on 3/4/15. - */ -class Basty(val root: Configurable) extends QScript with BastyTrait { - def this() = this(null) -} - -object Basty extends PipelineCommand \ No newline at end of file diff --git a/public/mapping/.gitignore b/public/mapping/.gitignore deleted file mode 100644 index a6f89c2da7a029afa02b6e7a2bf80ad34958a311..0000000000000000000000000000000000000000 --- a/public/mapping/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target/ \ No newline at end of file diff --git a/public/pom.xml b/public/pom.xml deleted file mode 100644 index 63bde77e79b63f61366f06a7d472a98b0cd9db0d..0000000000000000000000000000000000000000 --- a/public/pom.xml +++ /dev/null @@ -1,279 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - 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> - <artifactId>Biopet</artifactId> - <groupId>nl.lumc.sasc</groupId> - <name>Biopet</name> - <packaging>pom</packaging> - <version>0.7.0-SNAPSHOT</version> - - <modules> - <module>biopet-public-package</module> - <module>bam2wig</module> - <module>bammetrics</module> - <module>basty</module> - <module>carp</module> - <module>flexiprep</module> - <module>gears</module> - <module>generate-indexes</module> - <module>gentrap</module> - <module>kopisu</module> - <module>mapping</module> - <module>sage</module> - <module>shiva</module> - <module>tinycap</module> - <module>toucan</module> - <module>biopet-core</module> - <module>biopet-utils</module> - <module>biopet-tools</module> - <module>biopet-tools-extensions</module> - <module>biopet-extensions</module> - <module>biopet-tools-package</module> - <module>gwas-test</module> - </modules> - - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <scoverage.plugin.version>1.1.1</scoverage.plugin.version> - <scalaVersion>2.10.4</scalaVersion> - <scoverage.aggregate>true</scoverage.aggregate> - </properties> - - <build> - <sourceDirectory>${basedir}/src/main/scala</sourceDirectory> - <testSourceDirectory>${basedir}/src/test/scala</testSourceDirectory> - <testResources> - <testResource> - <directory>${basedir}/src/test/resources</directory> - <includes> - <include>**/*</include> - </includes> - </testResource> - </testResources> - <resources> - <resource> - <directory>${basedir}/src/main/resources</directory> - <includes> - <include>**/*</include> - </includes> - </resource> - </resources> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>2.18.1</version> - <configuration> - <forkCount>1C</forkCount> - <argLine>-Xmx300m</argLine> - <workingDirectory>${project.build.directory}</workingDirectory> - </configuration> - </plugin> - <plugin> - <artifactId>maven-dependency-plugin</artifactId> - <version>2.10</version> - <executions> - <execution> - <id>copy-installed</id> - <phase>prepare-package</phase> - <goals> - <goal>list</goal> - </goals> - <configuration> - <outputFile>${project.build.outputDirectory}/dependency_list.txt</outputFile> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>net.alchim31.maven</groupId> - <artifactId>scala-maven-plugin</artifactId> - <version>3.2.0</version> - <executions> - <execution> - <id>scala-compile</id> - <goals> - <goal>compile</goal> - <goal>testCompile</goal> - </goals> - <configuration> - <args> - <arg>-dependencyfile</arg> - <arg>${project.build.directory}/.scala_dependencies</arg> - <arg>-deprecation</arg> - <arg>-feature</arg> - </args> - </configuration> - </execution> - </executions> - <!-- ... (see other usage or goals for details) ... --> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>2.5</version> - <executions> - <execution> - <goals> - <goal>test-jar</goal> - </goals> - </execution> - </executions> - <configuration> - <archive> - <manifest> - <addDefaultImplementationEntries>true</addDefaultImplementationEntries> - <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries> - </manifest> - </archive> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>2.3.2</version> - <configuration> - <showDeprecation>true</showDeprecation> - </configuration> - </plugin> - <plugin> - <groupId>org.scalariform</groupId> - <artifactId>scalariform-maven-plugin</artifactId> - <version>0.1.4</version> - <executions> - <execution> - <phase>process-sources</phase> - <goals> - <goal>format</goal> - </goals> - <configuration> - <baseDir>${basedir}/src</baseDir> - <rewriteArrowSymbols>false</rewriteArrowSymbols> - <alignParameters>true</alignParameters> - <alignSingleLineCaseStatements_maxArrowIndent>40 - </alignSingleLineCaseStatements_maxArrowIndent> - <alignSingleLineCaseStatements>true</alignSingleLineCaseStatements> - <compactStringConcatenation>false</compactStringConcatenation> - <compactControlReadability>false</compactControlReadability> - <doubleIndentClassDeclaration>false</doubleIndentClassDeclaration> - <formatXml>true</formatXml> - <indentLocalDefs>false</indentLocalDefs> - <indentPackageBlocks>true</indentPackageBlocks> - <indentSpaces>2</indentSpaces> - <placeScaladocAsterisksBeneathSecondAsterisk>false - </placeScaladocAsterisksBeneathSecondAsterisk> - <preserveDanglingCloseParenthesis>true</preserveDanglingCloseParenthesis> - <preserveSpaceBeforeArguments>false</preserveSpaceBeforeArguments> - <rewriteArrowSymbols>false</rewriteArrowSymbols> - <spaceBeforeColon>false</spaceBeforeColon> - <spaceInsideBrackets>false</spaceInsideBrackets> - <spaceInsideParentheses>false</spaceInsideParentheses> - <spacesWithinPatternBinders>true</spacesWithinPatternBinders> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>pl.project13.maven</groupId> - <artifactId>git-commit-id-plugin</artifactId> - <version>2.1.10</version> - <executions> - <execution> - <goals> - <goal>revision</goal> - </goals> - </execution> - </executions> - <configuration> - <prefix>git</prefix> - <dateFormat>dd.MM.yyyy '@' HH:mm:ss z</dateFormat> - <verbose>false</verbose> - <dotGitDirectory>${basedir}/../../.git</dotGitDirectory> - <useNativeGit>true</useNativeGit> - <skipPoms>false</skipPoms> - <generateGitPropertiesFile>true</generateGitPropertiesFile> - <generateGitPropertiesFilename>src/main/resources/git.properties</generateGitPropertiesFilename> - <failOnNoGitDirectory>false</failOnNoGitDirectory> - <abbrevLength>8</abbrevLength> - <skip>false</skip> - <gitDescribe> - <skip>false</skip> - <always>false</always> - <abbrev>8</abbrev> - <dirty>-dirty</dirty> - <forceLongFormat>false</forceLongFormat> - </gitDescribe> - </configuration> - </plugin> - <plugin> - <groupId>com.mycila</groupId> - <artifactId>license-maven-plugin</artifactId> - <version>2.6</version> - <configuration> - <excludes> - <exclude>**/*git*</exclude> - <exclude>**/License*</exclude> - <exclude>**/*.bam</exclude> - <exclude>**/*.bai</exclude> - <exclude>**/*.gtf</exclude> - <exclude>**/*.fq</exclude> - <exclude>**/*.sam</exclude> - <exclude>**/*.bed</exclude> - <exclude>**/*.refFlat</exclude> - <exclude>**/*.R</exclude> - <exclude>**/*.rscript</exclude> - </excludes> - </configuration> - </plugin> - <plugin> - <groupId>org.scoverage</groupId> - <artifactId>scoverage-maven-plugin</artifactId> - <version>${scoverage.plugin.version}</version> - <configuration> - <scalaVersion>${scalaVersion}</scalaVersion> - <aggregate>true</aggregate> - <highlighting>true</highlighting> - <aggregate>true</aggregate> - <!-- other parameters --> - </configuration> - </plugin> - </plugins> - </build> - <reporting> - <plugins> - <plugin> - <groupId>org.scoverage</groupId> - <artifactId>scoverage-maven-plugin</artifactId> - <version>${scoverage.plugin.version}</version> - <configuration> - <aggregate>true</aggregate> <!-- for aggregated report --> - <highlighting>true</highlighting> - </configuration> - <reportSets> - <reportSet> - <reports> - <report>report</report> <!-- select only one report from: report, integration-report and report-only reporters --> - </reports> - </reportSet> - </reportSets> - </plugin> - </plugins> - </reporting> -</project> diff --git a/public/sage/.gitignore b/public/sage/.gitignore deleted file mode 100644 index a6f89c2da7a029afa02b6e7a2bf80ad34958a311..0000000000000000000000000000000000000000 --- a/public/sage/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target/ \ No newline at end of file diff --git a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/Shiva.scala b/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/Shiva.scala deleted file mode 100644 index a7d04155b164df95ffad2753ff6a8395f57520c5..0000000000000000000000000000000000000000 --- a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/Shiva.scala +++ /dev/null @@ -1,32 +0,0 @@ -/** - * 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. - */ -package nl.lumc.sasc.biopet.pipelines.shiva - -import nl.lumc.sasc.biopet.core.PipelineCommand -import nl.lumc.sasc.biopet.utils.config.Configurable -import org.broadinstitute.gatk.queue.QScript - -/** - * Implementation shiva without GATK parts - * - * Created by pjvan_thof on 2/24/15. - */ -class Shiva(val root: Configurable) extends QScript with ShivaTrait { - def this() = this(null) -} - -/** This object give a default main method to the pipelines */ -object Shiva extends PipelineCommand \ No newline at end of file diff --git a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaVariantcalling.scala b/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaVariantcalling.scala deleted file mode 100644 index d075619c1c39264adf9fba823b043110000b1668..0000000000000000000000000000000000000000 --- a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaVariantcalling.scala +++ /dev/null @@ -1,31 +0,0 @@ -/** - * 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. - */ -package nl.lumc.sasc.biopet.pipelines.shiva - -import nl.lumc.sasc.biopet.core.PipelineCommand -import nl.lumc.sasc.biopet.utils.config.Configurable -import org.broadinstitute.gatk.queue.QScript - -/** - * Implementation of ShivaVariantcalling without GATK variantcallers - * - * Created by pjvan_thof on 2/26/15. - */ -class ShivaVariantcalling(val root: Configurable) extends QScript with ShivaVariantcallingTrait { - def this() = this(null) -} - -object ShivaVariantcalling extends PipelineCommand \ No newline at end of file diff --git a/public/shiva/src/test/resources/ref.dict b/public/shiva/src/test/resources/ref.dict deleted file mode 100644 index ab5ceac32357f56f2b7c4ddbfdb17197187c9da8..0000000000000000000000000000000000000000 --- a/public/shiva/src/test/resources/ref.dict +++ /dev/null @@ -1,2 +0,0 @@ -@HD VN:1.4 SO:unsorted -@SQ SN:chr1 LN:9 UR:file:/home/pjvan_thof/pipelines/biopet/public/mapping/src/test/resources/ref.fa M5:fe15dbbd0900310caf32827f6da57550 diff --git a/public/shiva/src/test/resources/ref.fa b/public/shiva/src/test/resources/ref.fa deleted file mode 100644 index 0c51751ffe1eee84552290f10f8cdb6c84625131..0000000000000000000000000000000000000000 --- a/public/shiva/src/test/resources/ref.fa +++ /dev/null @@ -1,2 +0,0 @@ ->chr1 -AGTAGTAGT diff --git a/public/shiva/src/test/resources/ref.fa.fai b/public/shiva/src/test/resources/ref.fa.fai deleted file mode 100644 index 17ecf802afe8cf33c2e35f72e604bb039114d77c..0000000000000000000000000000000000000000 --- a/public/shiva/src/test/resources/ref.fa.fai +++ /dev/null @@ -1 +0,0 @@ -chr1 9 6 9 10 diff --git a/public/shiva/src/test/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaTest.scala b/public/shiva/src/test/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaTest.scala deleted file mode 100644 index c2249f15511d241428ef6f7d8f39b4bbc41e1143..0000000000000000000000000000000000000000 --- a/public/shiva/src/test/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaTest.scala +++ /dev/null @@ -1,163 +0,0 @@ -/** - * 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. - */ -package nl.lumc.sasc.biopet.pipelines.shiva - -import java.io.{ File, FileOutputStream } - -import com.google.common.io.Files -import nl.lumc.sasc.biopet.utils.config.Config -import nl.lumc.sasc.biopet.extensions.bwa.BwaMem -import nl.lumc.sasc.biopet.extensions.picard.{ MarkDuplicates, SortSam } -import nl.lumc.sasc.biopet.extensions.tools.VcfStats -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.{ DataProvider, Test } - -/** - * Test class for [[Shiva]] - * - * Created by pjvan_thof on 3/2/15. - */ -class ShivaTest extends TestNGSuite with Matchers { - def initPipeline(map: Map[String, Any]): Shiva = { - new Shiva() { - override def configNamespace = "shiva" - override def globalConfig = new Config(ConfigUtils.mergeMaps(map, ShivaTest.config)) - qSettings = new QSettings - qSettings.runName = "test" - } - } - - @DataProvider(name = "shivaOptions") - def shivaOptions = { - val bool = Array(true, false) - - for (s1 <- bool; s2 <- bool; s3 <- bool; multi <- bool; single <- bool; library <- bool) - yield Array("", s1, s2, s3, multi, single, library) - } - - @Test(dataProvider = "shivaOptions") - def testShiva(f: String, sample1: Boolean, sample2: Boolean, sample3: Boolean, - multi: Boolean, single: Boolean, library: Boolean): Unit = { - val map = { - var m: Map[String, Any] = ShivaTest.config - if (sample1) m = ConfigUtils.mergeMaps(ShivaTest.sample1, m) - if (sample2) m = ConfigUtils.mergeMaps(ShivaTest.sample2, m) - if (sample3) m = ConfigUtils.mergeMaps(ShivaTest.sample3, m) - ConfigUtils.mergeMaps(Map("multisample_variantcalling" -> multi, - "single_sample_variantcalling" -> single, - "library_variantcalling" -> library), m) - } - - if (!sample1 && !sample2 && !sample3) { // When no samples - intercept[IllegalArgumentException] { - initPipeline(map).script() - } - } else { - val pipeline = initPipeline(map) - pipeline.script() - - val numberLibs = (if (sample1) 1 else 0) + (if (sample2) 1 else 0) + (if (sample3) 2 else 0) - val numberSamples = (if (sample1) 1 else 0) + (if (sample2) 1 else 0) + (if (sample3) 1 else 0) - - pipeline.functions.count(_.isInstanceOf[MarkDuplicates]) shouldBe (numberLibs + (if (sample3) 1 else 0)) - - pipeline.functions.count(_.isInstanceOf[VcfStats]) shouldBe (if (multi) 2 else 0) + - (if (single) numberSamples * 2 else 0) + (if (library) numberLibs * 2 else 0) - } - } -} - -object ShivaTest { - val outputDir = Files.createTempDir() - new File(outputDir, "input").mkdirs() - def inputTouch(name: String): String = { - val file = new File(outputDir, "input" + File.separator + name) - Files.touch(file) - file.getAbsolutePath - } - - private def copyFile(name: String): Unit = { - val is = getClass.getResourceAsStream("/" + name) - val os = new FileOutputStream(new File(outputDir, name)) - org.apache.commons.io.IOUtils.copy(is, os) - os.close() - } - - copyFile("ref.fa") - copyFile("ref.dict") - copyFile("ref.fa.fai") - - val config = Map( - "name_prefix" -> "test", - "output_dir" -> outputDir, - "cache" -> true, - "dir" -> "test", - "vep_script" -> "test", - "reference_fasta" -> (outputDir + File.separator + "ref.fa"), - "gatk_jar" -> "test", - "samtools" -> Map("exe" -> "test"), - "bcftools" -> Map("exe" -> "test"), - "fastqc" -> Map("exe" -> "test"), - "input_alleles" -> "test", - "variantcallers" -> "raw", - "fastqc" -> Map("exe" -> "test"), - "seqtk" -> Map("exe" -> "test"), - "sickle" -> Map("exe" -> "test"), - "cutadapt" -> Map("exe" -> "test"), - "bwa" -> Map("exe" -> "test"), - "samtools" -> Map("exe" -> "test"), - "macs2" -> Map("exe" -> "test"), - "igvtools" -> Map("exe" -> "test"), - "wigtobigwig" -> Map("exe" -> "test"), - "md5sum" -> Map("exe" -> "test"), - "bgzip" -> Map("exe" -> "test"), - "tabix" -> Map("exe" -> "test") - ) - - val sample1 = Map( - "samples" -> Map("sample1" -> Map("libraries" -> Map( - "lib1" -> Map( - "R1" -> inputTouch("1_1_R1.fq"), - "R2" -> inputTouch("1_1_R2.fq") - ) - ) - ))) - - val sample2 = Map( - "samples" -> Map("sample2" -> Map("libraries" -> Map( - "lib1" -> Map( - "R1" -> inputTouch("2_1_R1.fq"), - "R2" -> inputTouch("2_1_R2.fq") - ) - ) - ))) - - val sample3 = Map( - "samples" -> Map("sample3" -> Map("libraries" -> Map( - "lib1" -> Map( - "R1" -> inputTouch("3_1_R1.fq"), - "R2" -> inputTouch("3_1_R2.fq") - ), - "lib2" -> Map( - "R1" -> inputTouch("3_2_R1.fq"), - "R2" -> inputTouch("3_2_R2.fq") - ) - ) - ))) -} \ No newline at end of file diff --git a/public/shiva/src/test/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaVariantcallingTest.scala b/public/shiva/src/test/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaVariantcallingTest.scala deleted file mode 100644 index d86e46c7e9ef21dfcdd5a67f779e46adc2b23483..0000000000000000000000000000000000000000 --- a/public/shiva/src/test/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaVariantcallingTest.scala +++ /dev/null @@ -1,143 +0,0 @@ -/** - * 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. - */ -package nl.lumc.sasc.biopet.pipelines.shiva - -import java.io.{ File, FileOutputStream } - -import com.google.common.io.Files -import nl.lumc.sasc.biopet.core.BiopetPipe -import nl.lumc.sasc.biopet.extensions.Freebayes -import nl.lumc.sasc.biopet.extensions.bcftools.{ BcftoolsCall, BcftoolsMerge } -import nl.lumc.sasc.biopet.extensions.gatk.CombineVariants -import nl.lumc.sasc.biopet.extensions.tools.{ MpileupToVcf, VcfFilter } -import nl.lumc.sasc.biopet.utils.ConfigUtils -import nl.lumc.sasc.biopet.utils.config.Config -import org.broadinstitute.gatk.queue.QSettings -import org.scalatest.Matchers -import org.scalatest.testng.TestNGSuite -import org.testng.annotations.{ DataProvider, Test } - -import scala.collection.mutable.ListBuffer - -/** - * Test class for [[ShivaVariantcalling]] - * - * Created by pjvan_thof on 3/2/15. - */ -class ShivaVariantcallingTest extends TestNGSuite with Matchers { - def initPipeline(map: Map[String, Any]): ShivaVariantcalling = { - new ShivaVariantcalling { - override def configNamespace = "shivavariantcalling" - override def globalConfig = new Config(ConfigUtils.mergeMaps(map, ShivaVariantcallingTest.config)) - qSettings = new QSettings - qSettings.runName = "test" - } - } - - @DataProvider(name = "shivaVariantcallingOptions") - def shivaVariantcallingOptions = { - val bool = Array(true, false) - (for ( - bams <- 0 to 3; - raw <- bool; - bcftools <- bool; - bcftoolsSinglesample <- bool; - freebayes <- bool; - varscanCnsSinglesample <- bool - ) yield Array(bams, raw, bcftools, bcftoolsSinglesample, freebayes, varscanCnsSinglesample)).toArray - } - - @Test(dataProvider = "shivaVariantcallingOptions") - def testShivaVariantcalling(bams: Int, - raw: Boolean, - bcftools: Boolean, - bcftoolsSinglesample: Boolean, - freebayes: Boolean, - varscanCnsSinglesample: Boolean) = { - val callers: ListBuffer[String] = ListBuffer() - if (raw) callers.append("raw") - if (bcftools) callers.append("bcftools") - if (bcftoolsSinglesample) callers.append("bcftools_singlesample") - if (freebayes) callers.append("freebayes") - if (varscanCnsSinglesample) callers.append("varscan_cns_singlesample") - val map = Map("variantcallers" -> callers.toList) - val pipeline = initPipeline(map) - - pipeline.inputBams = (for (n <- 1 to bams) yield n.toString -> ShivaVariantcallingTest.inputTouch("bam_" + n + ".bam")).toMap - - val illegalArgumentException = pipeline.inputBams.isEmpty || (!raw && !bcftools && !bcftoolsSinglesample && !freebayes && !varscanCnsSinglesample) - - if (illegalArgumentException) intercept[IllegalArgumentException] { - pipeline.init() - pipeline.script() - } - - if (!illegalArgumentException) { - pipeline.init() - pipeline.script() - - val pipesJobs = pipeline.functions.filter(_.isInstanceOf[BiopetPipe]).flatMap(_.asInstanceOf[BiopetPipe].pipesJobs) - - pipeline.functions.count(_.isInstanceOf[CombineVariants]) shouldBe (1 + (if (raw) 1 else 0) + (if (varscanCnsSinglesample) 1 else 0)) - pipesJobs.count(_.isInstanceOf[BcftoolsCall]) shouldBe (if (bcftools) 1 else 0) + (if (bcftoolsSinglesample) bams else 0) - pipeline.functions.count(_.isInstanceOf[BcftoolsMerge]) shouldBe (if (bcftoolsSinglesample && bams > 1) 1 else 0) - pipesJobs.count(_.isInstanceOf[Freebayes]) shouldBe (if (freebayes) 1 else 0) - pipesJobs.count(_.isInstanceOf[MpileupToVcf]) shouldBe (if (raw) bams else 0) - pipeline.functions.count(_.isInstanceOf[VcfFilter]) shouldBe (if (raw) bams else 0) - } - } -} - -object ShivaVariantcallingTest { - val outputDir = Files.createTempDir() - outputDir.deleteOnExit() - new File(outputDir, "input").mkdirs() - private def inputTouch(name: String): File = { - val file = new File(outputDir, "input" + File.separator + name).getAbsoluteFile - Files.touch(file) - file - } - - private def copyFile(name: String): Unit = { - val is = getClass.getResourceAsStream("/" + name) - val os = new FileOutputStream(new File(outputDir, name)) - org.apache.commons.io.IOUtils.copy(is, os) - os.close() - } - - copyFile("ref.fa") - copyFile("ref.dict") - copyFile("ref.fa.fai") - - val config = Map( - "name_prefix" -> "test", - "output_dir" -> outputDir, - "cache" -> true, - "dir" -> "test", - "vep_script" -> "test", - "reference_fasta" -> (outputDir + File.separator + "ref.fa"), - "gatk_jar" -> "test", - "samtools" -> Map("exe" -> "test"), - "bcftools" -> Map("exe" -> "test"), - "freebayes" -> Map("exe" -> "test"), - "md5sum" -> Map("exe" -> "test"), - "bgzip" -> Map("exe" -> "test"), - "tabix" -> Map("exe" -> "test"), - "rscript" -> Map("exe" -> "test"), - "exe" -> "test", - "varscan_jar" -> "test" - ) -} \ No newline at end of file diff --git a/public/toucan/.gitignore b/public/toucan/.gitignore deleted file mode 100644 index a6f89c2da7a029afa02b6e7a2bf80ad34958a311..0000000000000000000000000000000000000000 --- a/public/toucan/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target/ \ No newline at end of file diff --git a/public/gentrap/.gitignore b/sage/.gitignore similarity index 100% rename from public/gentrap/.gitignore rename to sage/.gitignore diff --git a/public/sage/pom.xml b/sage/pom.xml similarity index 100% rename from public/sage/pom.xml rename to sage/pom.xml diff --git a/public/sage/src/main/scala/nl/lumc/sasc/biopet/pipelines/sage/Sage.scala b/sage/src/main/scala/nl/lumc/sasc/biopet/pipelines/sage/Sage.scala similarity index 100% rename from public/sage/src/main/scala/nl/lumc/sasc/biopet/pipelines/sage/Sage.scala rename to sage/src/main/scala/nl/lumc/sasc/biopet/pipelines/sage/Sage.scala diff --git a/public/sage/src/test/resources/log4j.properties b/sage/src/test/resources/log4j.properties similarity index 100% rename from public/sage/src/test/resources/log4j.properties rename to sage/src/test/resources/log4j.properties diff --git a/public/shiva/.gitignore b/shiva/.gitignore similarity index 100% rename from public/shiva/.gitignore rename to shiva/.gitignore diff --git a/public/shiva/pom.xml b/shiva/pom.xml similarity index 100% rename from public/shiva/pom.xml rename to shiva/pom.xml diff --git a/public/shiva/src/main/resources/nl/lumc/sasc/biopet/pipelines/shiva/outputVcfFiles.ssp b/shiva/src/main/resources/nl/lumc/sasc/biopet/pipelines/shiva/outputVcfFiles.ssp similarity index 100% rename from public/shiva/src/main/resources/nl/lumc/sasc/biopet/pipelines/shiva/outputVcfFiles.ssp rename to shiva/src/main/resources/nl/lumc/sasc/biopet/pipelines/shiva/outputVcfFiles.ssp diff --git a/public/shiva/src/main/resources/nl/lumc/sasc/biopet/pipelines/shiva/sampleVariants.ssp b/shiva/src/main/resources/nl/lumc/sasc/biopet/pipelines/shiva/sampleVariants.ssp similarity index 100% rename from public/shiva/src/main/resources/nl/lumc/sasc/biopet/pipelines/shiva/sampleVariants.ssp rename to shiva/src/main/resources/nl/lumc/sasc/biopet/pipelines/shiva/sampleVariants.ssp diff --git a/public/shiva/src/main/resources/nl/lumc/sasc/biopet/pipelines/shiva/shivaFront.ssp b/shiva/src/main/resources/nl/lumc/sasc/biopet/pipelines/shiva/shivaFront.ssp similarity index 100% rename from public/shiva/src/main/resources/nl/lumc/sasc/biopet/pipelines/shiva/shivaFront.ssp rename to shiva/src/main/resources/nl/lumc/sasc/biopet/pipelines/shiva/shivaFront.ssp diff --git a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaTrait.scala b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/Shiva.scala similarity index 55% rename from public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaTrait.scala rename to shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/Shiva.scala index 76aee99b4f3b1c857edc4f402aaae1133f313a55..7bebb491a55a52b7b77ce8141f11f162ab7eb643 100644 --- a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaTrait.scala +++ b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/Shiva.scala @@ -15,11 +15,13 @@ */ package nl.lumc.sasc.biopet.pipelines.shiva -import nl.lumc.sasc.biopet.core.Reference +import nl.lumc.sasc.biopet.core.{ PipelineCommand, Reference } import nl.lumc.sasc.biopet.core.report.ReportBuilderExtension +import nl.lumc.sasc.biopet.extensions.gatk.broad._ import nl.lumc.sasc.biopet.pipelines.bammetrics.TargetRegions import nl.lumc.sasc.biopet.pipelines.mapping.MultisampleMappingTrait import nl.lumc.sasc.biopet.pipelines.toucan.Toucan +import nl.lumc.sasc.biopet.utils.config.Configurable import org.broadinstitute.gatk.queue.QScript /** @@ -27,7 +29,9 @@ import org.broadinstitute.gatk.queue.QScript * * Created by pjvan_thof on 2/26/15. */ -trait ShivaTrait extends MultisampleMappingTrait with Reference with TargetRegions { qscript: QScript => +class Shiva(val root: Configurable) extends QScript with MultisampleMappingTrait with Reference with TargetRegions { qscript => + + def this() = this(null) override def reportClass: Option[ReportBuilderExtension] = { val shiva = new ShivaReport(this) @@ -36,8 +40,14 @@ trait ShivaTrait extends MultisampleMappingTrait with Reference with TargetRegio Some(shiva) } + override def defaults = Map( + "haplotypecaller" -> Map("stand_call_conf" -> 30, "stand_emit_conf" -> 0), + "genotypegvcfs" -> Map("stand_call_conf" -> 30, "stand_emit_conf" -> 0), + "unifiedgenotyper" -> Map("stand_call_conf" -> 30, "stand_emit_conf" -> 0) + ) + /** Method to make the variantcalling namespace of shiva */ - def makeVariantcalling(multisample: Boolean = false): ShivaVariantcallingTrait with QScript = { + def makeVariantcalling(multisample: Boolean = false): ShivaVariantcalling with QScript = { if (multisample) new ShivaVariantcalling(qscript) { override def namePrefix = "multisample" override def configNamespace: String = "shivavariantcalling" @@ -57,12 +67,32 @@ trait ShivaTrait extends MultisampleMappingTrait with Reference with TargetRegio override def makeLibrary(id: String) = new this.Library(id) /** Sample specific settings */ - override def summarySettings = Map("single_sample_variantcalling" -> variantcalling.isDefined) + override def summarySettings = super.summarySettings ++ + Map("single_sample_variantcalling" -> variantcalling.isDefined, "use_indel_realigner" -> useIndelRealigner) /** Class to generate jobs for a library */ class Library(libId: String) extends super.Library(libId) { + + lazy val useIndelRealigner: Boolean = config("use_indel_realigner", default = true) + lazy val useBaseRecalibration: Boolean = { + val c: Boolean = config("use_base_recalibration", default = true) + val br = new BaseRecalibrator(qscript) + if (c && br.knownSites.isEmpty) + logger.warn("No Known site found, skipping base recalibration, file: " + inputBam) + c && br.knownSites.nonEmpty + } + + override def preProcessBam = if (useIndelRealigner && useBaseRecalibration) + bamFile.map(swapExt(libDir, _, ".bam", ".realign.baserecal.bam")) + else if (useIndelRealigner) bamFile.map(swapExt(libDir, _, ".bam", ".realign.bam")) + else if (useBaseRecalibration) bamFile.map(swapExt(libDir, _, ".bam", ".baserecal.bam")) + else bamFile + /** Library specific settings */ - override def summarySettings = Map("library_variantcalling" -> variantcalling.isDefined) + override def summarySettings = Map( + "library_variantcalling" -> variantcalling.isDefined, + "use_indel_realigner" -> useIndelRealigner, + "use_base_recalibration" -> useBaseRecalibration) lazy val variantcalling = if (config("library_variantcalling", default = false).asBoolean && (bamFile.isDefined || preProcessBam.isDefined)) { @@ -73,6 +103,15 @@ trait ShivaTrait extends MultisampleMappingTrait with Reference with TargetRegio override def addJobs() = { super.addJobs() + if (useIndelRealigner && useBaseRecalibration) { + val file = addIndelRealign(bamFile.get, libDir, isIntermediate = true) + addBaseRecalibrator(file, libDir, libraries.size > 1) + } else if (useIndelRealigner) { + addIndelRealign(bamFile.get, libDir, libraries.size > 1) + } else if (useBaseRecalibration) { + addBaseRecalibrator(bamFile.get, libDir, libraries.size > 1) + } + variantcalling.foreach(vc => { vc.sampleId = Some(sampleId) vc.libId = Some(libId) @@ -88,10 +127,22 @@ trait ShivaTrait extends MultisampleMappingTrait with Reference with TargetRegio Some(makeVariantcalling(multisample = false)) } else None + override def keepMergedFiles: Boolean = config("keep_merged_files", default = !useIndelRealigner) + + lazy val useIndelRealigner: Boolean = config("use_indel_realigner", default = true) + + override def preProcessBam = if (useIndelRealigner && libraries.values.flatMap(_.preProcessBam).size > 1) { + bamFile.map(swapExt(sampleDir, _, ".bam", ".realign.bam")) + } else bamFile + /** This will add sample jobs */ override def addJobs(): Unit = { super.addJobs() + if (useIndelRealigner && libraries.values.flatMap(_.preProcessBam).size > 1) { + addIndelRealign(bamFile.get, sampleDir, false) + } + preProcessBam.foreach { bam => variantcalling.foreach(vc => { vc.sampleId = Some(sampleId) @@ -150,4 +201,43 @@ trait ShivaTrait extends MultisampleMappingTrait with Reference with TargetRegio "regions_of_interest" -> roiBedFiles.map(_.getName.stripSuffix(".bed")), "amplicon_bed" -> ampliconBedFile.map(_.getName.stripSuffix(".bed")) ) + + /** Adds indel realignment jobs */ + def addIndelRealign(inputBam: File, dir: File, isIntermediate: Boolean): File = { + val realignerTargetCreator = RealignerTargetCreator(this, inputBam, dir) + realignerTargetCreator.isIntermediate = true + add(realignerTargetCreator) + + val indelRealigner = IndelRealigner(this, inputBam, realignerTargetCreator.out, dir) + indelRealigner.isIntermediate = isIntermediate + add(indelRealigner) + + indelRealigner.out + } + + /** Adds base recalibration jobs */ + def addBaseRecalibrator(inputBam: File, dir: File, isIntermediate: Boolean): File = { + val baseRecalibrator = BaseRecalibrator(this, inputBam, swapExt(dir, inputBam, ".bam", ".baserecal")) + + if (baseRecalibrator.knownSites.isEmpty) return inputBam + add(baseRecalibrator) + + if (config("use_analyze_covariates", default = true).asBoolean) { + val baseRecalibratorAfter = BaseRecalibrator(this, inputBam, swapExt(dir, inputBam, ".bam", ".baserecal.after")) + baseRecalibratorAfter.BQSR = Some(baseRecalibrator.out) + add(baseRecalibratorAfter) + + add(AnalyzeCovariates(this, baseRecalibrator.out, baseRecalibratorAfter.out, swapExt(dir, inputBam, ".bam", ".baserecal.pdf"))) + } + + val printReads = PrintReads(this, inputBam, swapExt(dir, inputBam, ".bam", ".baserecal.bam")) + printReads.BQSR = Some(baseRecalibrator.out) + printReads.isIntermediate = isIntermediate + add(printReads) + + printReads.out + } } + +/** This object give a default main method to the pipelines */ +object Shiva extends PipelineCommand \ No newline at end of file diff --git a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaReport.scala b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaReport.scala similarity index 98% rename from public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaReport.scala rename to shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaReport.scala index 890257549c5ac09a8ae5254d85ec8ed6fcb1fb48..de344fe61c994c67935ccdaee1fdc366c150da70 100644 --- a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaReport.scala +++ b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaReport.scala @@ -44,9 +44,6 @@ object ShivaReport extends MultisampleMappingReportTrait { override def pipelineName = "shiva" - override def extFiles = super.extFiles ++ List("js/gears.js") - .map(x => ExtFile("/nl/lumc/sasc/biopet/pipelines/gears/report/ext/" + x, x)) - override def additionalSections = super.additionalSections ++ (if (variantcallingExecuted) List("Variantcalling" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/shiva/sampleVariants.ssp", Map("showPlot" -> true, "showTable" -> false))) else Nil) @@ -120,6 +117,7 @@ object ShivaReport extends MultisampleMappingReportTrait { /** * Generate a stackbar plot for found variants + * * @param outputDir OutputDir for the tsv and png file * @param prefix Prefix of the tsv and png file * @param summary Summary class diff --git a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaSvCalling.scala b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaSvCalling.scala similarity index 100% rename from public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaSvCalling.scala rename to shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaSvCalling.scala diff --git a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaVariantcallingTrait.scala b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaVariantcalling.scala similarity index 88% rename from public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaVariantcallingTrait.scala rename to shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaVariantcalling.scala index 06f876979fb3ae541be76758d031174cb6c93e8b..6020412479bf3331a35ff69c82327c212d889352 100644 --- a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaVariantcallingTrait.scala +++ b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaVariantcalling.scala @@ -15,27 +15,31 @@ */ package nl.lumc.sasc.biopet.pipelines.shiva +import nl.lumc.sasc.biopet.core.{ PipelineCommand, Reference, SampleLibraryTag } import nl.lumc.sasc.biopet.core.summary.SummaryQScript -import nl.lumc.sasc.biopet.core.{ Reference, SampleLibraryTag } import nl.lumc.sasc.biopet.extensions.Tabix import nl.lumc.sasc.biopet.extensions.gatk.{ CombineVariants, GenotypeConcordance } import nl.lumc.sasc.biopet.extensions.tools.VcfStats import nl.lumc.sasc.biopet.extensions.vt.{ VtDecompose, VtNormalize } import nl.lumc.sasc.biopet.pipelines.bammetrics.TargetRegions -import nl.lumc.sasc.biopet.pipelines.shiva.variantcallers._ +import nl.lumc.sasc.biopet.pipelines.shiva.variantcallers.{ VarscanCnsSingleSample, _ } import nl.lumc.sasc.biopet.utils.{ BamUtils, Logging } +import nl.lumc.sasc.biopet.utils.config.Configurable import org.broadinstitute.gatk.queue.QScript /** - * Common trait for ShivaVariantcalling + * Implementation of ShivaVariantcalling * * Created by pjvan_thof on 2/26/15. */ -trait ShivaVariantcallingTrait extends SummaryQScript +class ShivaVariantcalling(val root: Configurable) extends QScript + with SummaryQScript with SampleLibraryTag with Reference with TargetRegions { - qscript: QScript => + qscript => + + def this() = this(null) @Input(doc = "Bam files (should be deduped bams)", shortName = "BAM", required = true) protected var inputBamsArg: List[File] = Nil @@ -156,12 +160,17 @@ trait ShivaVariantcallingTrait extends SummaryQScript } /** Will generate all available variantcallers */ - protected def callersList: List[Variantcaller] = List( - new Freebayes(this), - new RawVcf(this), - new Bcftools(this), - new BcftoolsSingleSample(this), - new VarscanCnsSingleSample(this)) + protected def callersList: List[Variantcaller] = + new HaplotypeCallerGvcf(this) :: + new HaplotypeCallerAllele(this) :: + new UnifiedGenotyperAllele(this) :: + new UnifiedGenotyper(this) :: + new HaplotypeCaller(this) :: + new Freebayes(this) :: + new RawVcf(this) :: + new Bcftools(this) :: + new BcftoolsSingleSample(this) :: + new VarscanCnsSingleSample(this) :: Nil /** Location of summary file */ def summaryFile = new File(outputDir, "ShivaVariantcalling.summary.json") @@ -177,4 +186,6 @@ trait ShivaVariantcallingTrait extends SummaryQScript def summaryFiles: Map[String, File] = { callers.map(x => x.name -> x.outputFile).toMap + ("final" -> finalFile) } -} \ No newline at end of file +} + +object ShivaVariantcalling extends PipelineCommand \ No newline at end of file diff --git a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/Breakdancer.scala b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/Breakdancer.scala similarity index 100% rename from public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/Breakdancer.scala rename to shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/Breakdancer.scala diff --git a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/Clever.scala b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/Clever.scala similarity index 100% rename from public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/Clever.scala rename to shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/Clever.scala diff --git a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/Delly.scala b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/Delly.scala similarity index 100% rename from public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/Delly.scala rename to shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/Delly.scala diff --git a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/Pindel.scala b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/Pindel.scala similarity index 100% rename from public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/Pindel.scala rename to shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/Pindel.scala diff --git a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/SvCaller.scala b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/SvCaller.scala similarity index 100% rename from public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/SvCaller.scala rename to shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/SvCaller.scala diff --git a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/Bcftools.scala b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/Bcftools.scala similarity index 100% rename from public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/Bcftools.scala rename to shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/Bcftools.scala diff --git a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/BcftoolsSingleSample.scala b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/BcftoolsSingleSample.scala similarity index 100% rename from public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/BcftoolsSingleSample.scala rename to shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/BcftoolsSingleSample.scala diff --git a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/Freebayes.scala b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/Freebayes.scala similarity index 100% rename from public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/Freebayes.scala rename to shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/Freebayes.scala diff --git a/protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/variantcallers/HaplotypeCaller.scala b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/HaplotypeCaller.scala similarity index 83% rename from protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/variantcallers/HaplotypeCaller.scala rename to shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/HaplotypeCaller.scala index be299d9a9ca43567ba7f0f81123ed29cc4e2031e..cd039f946a182b70c23d715b9efc3cf57960f2b4 100644 --- a/protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/variantcallers/HaplotypeCaller.scala +++ b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/HaplotypeCaller.scala @@ -3,11 +3,10 @@ * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions * on how to use this protected part of biopet or contact us at sasc@lumc.nl */ -package nl.lumc.sasc.biopet.pipelines.gatk.variantcallers +package nl.lumc.sasc.biopet.pipelines.shiva.variantcallers -import nl.lumc.sasc.biopet.pipelines.shiva.variantcallers.Variantcaller -import nl.lumc.sasc.biopet.utils.config.Configurable import nl.lumc.sasc.biopet.extensions.gatk.broad +import nl.lumc.sasc.biopet.utils.config.Configurable /** Default mode for the haplotypecaller */ class HaplotypeCaller(val root: Configurable) extends Variantcaller { diff --git a/protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/variantcallers/HaplotypeCallerAllele.scala b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/HaplotypeCallerAllele.scala similarity index 74% rename from protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/variantcallers/HaplotypeCallerAllele.scala rename to shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/HaplotypeCallerAllele.scala index d743b4a528bf0803ba305287a993c758bc8d1d8a..3de2234b78317c0182aaf8db6a163c087b4afe34 100644 --- a/protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/variantcallers/HaplotypeCallerAllele.scala +++ b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/HaplotypeCallerAllele.scala @@ -3,11 +3,10 @@ * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions * on how to use this protected part of biopet or contact us at sasc@lumc.nl */ -package nl.lumc.sasc.biopet.pipelines.gatk.variantcallers +package nl.lumc.sasc.biopet.pipelines.shiva.variantcallers -import nl.lumc.sasc.biopet.pipelines.shiva.variantcallers.Variantcaller -import nl.lumc.sasc.biopet.utils.config.Configurable import nl.lumc.sasc.biopet.extensions.gatk.broad +import nl.lumc.sasc.biopet.utils.config.Configurable /** Allele mode for Haplotypecaller */ class HaplotypeCallerAllele(val root: Configurable) extends Variantcaller { @@ -17,7 +16,7 @@ class HaplotypeCallerAllele(val root: Configurable) extends Variantcaller { def biopetScript() { val hc = broad.HaplotypeCaller(this, inputBams.values.toList, outputFile) hc.alleles = config("input_alleles") - hc.genotyping_mode = org.broadinstitute.gatk.tools.walkers.genotyper.GenotypingOutputMode.GENOTYPE_GIVEN_ALLELES + hc.genotyping_mode = Some("GENOTYPE_GIVEN_ALLELES") add(hc) } } diff --git a/protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/variantcallers/HaplotypeCallerGvcf.scala b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/HaplotypeCallerGvcf.scala similarity index 87% rename from protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/variantcallers/HaplotypeCallerGvcf.scala rename to shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/HaplotypeCallerGvcf.scala index 1491135cc566d954baa3793335f3fb6f27c3c645..6a0cb91c9b4c3131d0479b853071d5f6826b0513 100644 --- a/protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/variantcallers/HaplotypeCallerGvcf.scala +++ b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/HaplotypeCallerGvcf.scala @@ -3,11 +3,10 @@ * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions * on how to use this protected part of biopet or contact us at sasc@lumc.nl */ -package nl.lumc.sasc.biopet.pipelines.gatk.variantcallers +package nl.lumc.sasc.biopet.pipelines.shiva.variantcallers -import nl.lumc.sasc.biopet.pipelines.shiva.variantcallers.Variantcaller -import nl.lumc.sasc.biopet.utils.config.Configurable import nl.lumc.sasc.biopet.extensions.gatk.broad +import nl.lumc.sasc.biopet.utils.config.Configurable /** Gvcf mode for haplotypecaller */ class HaplotypeCallerGvcf(val root: Configurable) extends Variantcaller { diff --git a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/RawVcf.scala b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/RawVcf.scala similarity index 100% rename from public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/RawVcf.scala rename to shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/RawVcf.scala diff --git a/protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/variantcallers/UnifiedGenotyper.scala b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/UnifiedGenotyper.scala similarity index 83% rename from protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/variantcallers/UnifiedGenotyper.scala rename to shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/UnifiedGenotyper.scala index 5cf58b69df5c7d03e4c2a8d8621c623deb9a7937..96c3821bcb1343163507d9b0e9a950f477a47c6c 100644 --- a/protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/variantcallers/UnifiedGenotyper.scala +++ b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/UnifiedGenotyper.scala @@ -3,11 +3,10 @@ * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions * on how to use this protected part of biopet or contact us at sasc@lumc.nl */ -package nl.lumc.sasc.biopet.pipelines.gatk.variantcallers +package nl.lumc.sasc.biopet.pipelines.shiva.variantcallers -import nl.lumc.sasc.biopet.pipelines.shiva.variantcallers.Variantcaller -import nl.lumc.sasc.biopet.utils.config.Configurable import nl.lumc.sasc.biopet.extensions.gatk.broad +import nl.lumc.sasc.biopet.utils.config.Configurable /** Default mode for UnifiedGenotyper */ class UnifiedGenotyper(val root: Configurable) extends Variantcaller { diff --git a/protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/variantcallers/UnifiedGenotyperAllele.scala b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/UnifiedGenotyperAllele.scala similarity index 74% rename from protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/variantcallers/UnifiedGenotyperAllele.scala rename to shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/UnifiedGenotyperAllele.scala index 43278defac34fbd5e3298c29587de51147b82f0e..8ffdcd962107840ccfbf175310c70035c8c668a1 100644 --- a/protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/variantcallers/UnifiedGenotyperAllele.scala +++ b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/UnifiedGenotyperAllele.scala @@ -3,11 +3,10 @@ * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions * on how to use this protected part of biopet or contact us at sasc@lumc.nl */ -package nl.lumc.sasc.biopet.pipelines.gatk.variantcallers +package nl.lumc.sasc.biopet.pipelines.shiva.variantcallers -import nl.lumc.sasc.biopet.pipelines.shiva.variantcallers.Variantcaller -import nl.lumc.sasc.biopet.utils.config.Configurable import nl.lumc.sasc.biopet.extensions.gatk.broad +import nl.lumc.sasc.biopet.utils.config.Configurable /** Allele mode for GenotyperAllele */ class UnifiedGenotyperAllele(val root: Configurable) extends Variantcaller { @@ -17,7 +16,7 @@ class UnifiedGenotyperAllele(val root: Configurable) extends Variantcaller { def biopetScript() { val ug = broad.UnifiedGenotyper(this, inputBams.values.toList, outputFile) ug.alleles = config("input_alleles") - ug.genotyping_mode = org.broadinstitute.gatk.tools.walkers.genotyper.GenotypingOutputMode.GENOTYPE_GIVEN_ALLELES + ug.genotyping_mode = Some("GENOTYPE_GIVEN_ALLELES") add(ug) } } diff --git a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/Variantcaller.scala b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/Variantcaller.scala similarity index 100% rename from public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/Variantcaller.scala rename to shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/Variantcaller.scala diff --git a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/VarscanCnsSingleSample.scala b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/VarscanCnsSingleSample.scala similarity index 100% rename from public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/VarscanCnsSingleSample.scala rename to shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/VarscanCnsSingleSample.scala diff --git a/public/shiva/src/test/resources/log4j.properties b/shiva/src/test/resources/log4j.properties similarity index 100% rename from public/shiva/src/test/resources/log4j.properties rename to shiva/src/test/resources/log4j.properties diff --git a/public/shiva/src/test/resources/paired01.bam b/shiva/src/test/resources/paired01.bam similarity index 100% rename from public/shiva/src/test/resources/paired01.bam rename to shiva/src/test/resources/paired01.bam diff --git a/public/shiva/src/test/resources/paired01.bam.bai b/shiva/src/test/resources/paired01.bam.bai similarity index 100% rename from public/shiva/src/test/resources/paired01.bam.bai rename to shiva/src/test/resources/paired01.bam.bai diff --git a/public/mapping/src/test/resources/ref.dict b/shiva/src/test/resources/ref.dict similarity index 100% rename from public/mapping/src/test/resources/ref.dict rename to shiva/src/test/resources/ref.dict diff --git a/public/mapping/src/test/resources/ref.fa b/shiva/src/test/resources/ref.fa similarity index 100% rename from public/mapping/src/test/resources/ref.fa rename to shiva/src/test/resources/ref.fa diff --git a/public/mapping/src/test/resources/ref.fa.fai b/shiva/src/test/resources/ref.fa.fai similarity index 100% rename from public/mapping/src/test/resources/ref.fa.fai rename to shiva/src/test/resources/ref.fa.fai diff --git a/public/shiva/src/test/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaSvCallingTest.scala b/shiva/src/test/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaSvCallingTest.scala similarity index 98% rename from public/shiva/src/test/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaSvCallingTest.scala rename to shiva/src/test/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaSvCallingTest.scala index b0eaaa4303b9725ce88c2856d3d050060196140f..c8e163cf81fd4173f99ba9ac4b47e8dd4e6cccac 100644 --- a/public/shiva/src/test/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaSvCallingTest.scala +++ b/shiva/src/test/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaSvCallingTest.scala @@ -23,7 +23,7 @@ import nl.lumc.sasc.biopet.extensions.breakdancer.{ BreakdancerCaller, Breakdanc import nl.lumc.sasc.biopet.extensions.clever.CleverCaller import nl.lumc.sasc.biopet.extensions.delly.DellyCaller import nl.lumc.sasc.biopet.extensions.pindel.{ PindelCaller, PindelConfig, PindelVCF } -import nl.lumc.sasc.biopet.utils.ConfigUtils +import nl.lumc.sasc.biopet.utils.{ ConfigUtils, Logging } import nl.lumc.sasc.biopet.utils.config.Config import org.broadinstitute.gatk.queue.QSettings import org.scalatest.Matchers @@ -152,9 +152,9 @@ class ShivaSvCallingTest extends TestNGSuite with Matchers { pipeline.inputBams = Map("bam" -> ShivaSvCallingTest.inputTouch("bam" + ".bam")) intercept[IllegalArgumentException] { - pipeline.init() pipeline.script() } + Logging.errors.clear() } private def resourcePath(p: String): String = { diff --git a/protected/biopet-gatk-pipelines/src/test/scala/nl/lumc/sasc/biopet/pipelines/gatk/ShivaTest.scala b/shiva/src/test/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaTest.scala similarity index 62% rename from protected/biopet-gatk-pipelines/src/test/scala/nl/lumc/sasc/biopet/pipelines/gatk/ShivaTest.scala rename to shiva/src/test/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaTest.scala index 8be9ae9a79066c233c1c92b6dfb2f9cb1432385f..736cff399b1dc09d41ea1df8cc6adfc697503d44 100644 --- a/protected/biopet-gatk-pipelines/src/test/scala/nl/lumc/sasc/biopet/pipelines/gatk/ShivaTest.scala +++ b/shiva/src/test/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaTest.scala @@ -1,19 +1,28 @@ /** - * Due to the license issue with GATK, this part of Biopet can only be used inside the - * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions - * on how to use this protected part of biopet or contact us at sasc@lumc.nl + * 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. */ -package nl.lumc.sasc.biopet.pipelines.gatk +package nl.lumc.sasc.biopet.pipelines.shiva import java.io.{ File, FileOutputStream } import com.google.common.io.Files -import nl.lumc.sasc.biopet.utils.config.Config -import nl.lumc.sasc.biopet.extensions.bwa.BwaMem import nl.lumc.sasc.biopet.extensions.gatk.broad._ -import nl.lumc.sasc.biopet.extensions.picard.{ MarkDuplicates, SortSam } +import nl.lumc.sasc.biopet.extensions.picard.MarkDuplicates import nl.lumc.sasc.biopet.extensions.tools.VcfStats import nl.lumc.sasc.biopet.utils.ConfigUtils +import nl.lumc.sasc.biopet.utils.config.Config import org.broadinstitute.gatk.queue.QSettings import org.scalatest.Matchers import org.scalatest.testng.TestNGSuite @@ -24,7 +33,7 @@ import org.testng.annotations.{ DataProvider, Test } * * Created by pjvan_thof on 3/2/15. */ -class ShivaTest extends TestNGSuite with Matchers { +trait ShivaTestTrait extends TestNGSuite with Matchers { def initPipeline(map: Map[String, Any]): Shiva = { new Shiva() { override def configNamespace = "shiva" @@ -36,24 +45,33 @@ class ShivaTest extends TestNGSuite with Matchers { @DataProvider(name = "shivaOptions") def shivaOptions = { - val bool = Array(true, false) - for ( - s1 <- bool; s2 <- bool; multi <- bool; - dbsnp <- bool; realign <- bool; baseRecalibration <- bool - ) yield Array("", s1, s2, multi, dbsnp, realign, baseRecalibration) + s1 <- sample1; s2 <- sample2; + realign <- realignProvider; baseRecalibration <- baseRecalibrationProvider + ) yield Array("", s1, s2, realign, baseRecalibration) } + def sample1 = Array(false, true) + def sample2 = Array(false, true) + def realignProvider = Array(false, true) + def baseRecalibrationProvider = Array(false, true) + def multisampleCalling: Boolean = true + def sampleCalling = false + def libraryCalling = false + def dbsnp: Boolean = true + @Test(dataProvider = "shivaOptions") def testShiva(f: String, sample1: Boolean, sample2: Boolean, - multi: Boolean, dbsnp: Boolean, realign: Boolean, baseRecalibration: Boolean): Unit = { val map = { var m: Map[String, Any] = ShivaTest.config if (sample1) m = ConfigUtils.mergeMaps(ShivaTest.sample1, m) if (sample2) m = ConfigUtils.mergeMaps(ShivaTest.sample2, m) - if (dbsnp) m = ConfigUtils.mergeMaps(Map("dbsnp" -> "test"), m) - ConfigUtils.mergeMaps(Map("multisample_variantcalling" -> multi, + if (dbsnp) m = ConfigUtils.mergeMaps(Map("dbsnp" -> "test.vcf.gz"), m) + ConfigUtils.mergeMaps(Map( + "multisample_variantcalling" -> multisampleCalling, + "single_sample_variantcalling" -> sampleCalling, + "library_variantcalling" -> libraryCalling, "use_indel_realigner" -> realign, "use_base_recalibration" -> baseRecalibration), m) @@ -75,14 +93,39 @@ class ShivaTest extends TestNGSuite with Matchers { // Gatk preprocess pipeline.functions.count(_.isInstanceOf[IndelRealigner]) shouldBe (numberLibs * (if (realign) 1 else 0) + (if (sample2 && realign) 1 else 0)) pipeline.functions.count(_.isInstanceOf[RealignerTargetCreator]) shouldBe (numberLibs * (if (realign) 1 else 0) + (if (sample2 && realign) 1 else 0)) - pipeline.functions.count(_.isInstanceOf[BaseRecalibrator]) shouldBe (if (dbsnp && baseRecalibration) numberLibs else 0) + pipeline.functions.count(_.isInstanceOf[BaseRecalibrator]) shouldBe (if (dbsnp && baseRecalibration) (numberLibs * 2) else 0) pipeline.functions.count(_.isInstanceOf[PrintReads]) shouldBe (if (dbsnp && baseRecalibration) numberLibs else 0) - pipeline.functions.count(_.isInstanceOf[VcfStats]) shouldBe (if (multi) 2 else 0) + pipeline.functions.count(_.isInstanceOf[VcfStats]) shouldBe ( + (if (multisampleCalling) 2 else 0) + + (if (sampleCalling) numberSamples * 2 else 0) + + (if (libraryCalling) numberLibs * 2 else 0)) } } } +class ShivaDefaultTest extends ShivaTestTrait +class ShivaNoDbsnpTest extends ShivaTestTrait { + override def sample1 = Array(true) + override def sample2 = Array(false) + override def realignProvider = Array(true) + override def dbsnp = false +} +class ShivaLibraryCallingTest extends ShivaTestTrait { + override def sample1 = Array(true, false) + override def sample2 = Array(false, true) + override def realignProvider = Array(false) + override def baseRecalibrationProvider = Array(false) + override def libraryCalling = true +} +class ShivaSampleCallingTest extends ShivaTestTrait { + override def sample1 = Array(true, false) + override def sample2 = Array(false, true) + override def realignProvider = Array(false) + override def baseRecalibrationProvider = Array(false) + override def sampleCalling = true +} + object ShivaTest { val outputDir = Files.createTempDir() new File(outputDir, "input").mkdirs() diff --git a/protected/biopet-gatk-pipelines/src/test/scala/nl/lumc/sasc/biopet/pipelines/gatk/ShivaVariantcallingTest.scala b/shiva/src/test/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaVariantcallingTest.scala similarity index 52% rename from protected/biopet-gatk-pipelines/src/test/scala/nl/lumc/sasc/biopet/pipelines/gatk/ShivaVariantcallingTest.scala rename to shiva/src/test/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaVariantcallingTest.scala index f4576e5a10d380e572891cae1160d665ebbe8746..f85137cc27a87069021752d42517e3fe6685359a 100644 --- a/protected/biopet-gatk-pipelines/src/test/scala/nl/lumc/sasc/biopet/pipelines/gatk/ShivaVariantcallingTest.scala +++ b/shiva/src/test/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaVariantcallingTest.scala @@ -3,11 +3,14 @@ * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions * on how to use this protected part of biopet or contact us at sasc@lumc.nl */ -package nl.lumc.sasc.biopet.pipelines.gatk +package nl.lumc.sasc.biopet.pipelines.shiva import java.io.{ File, FileOutputStream } import com.google.common.io.Files +import nl.lumc.sasc.biopet.core.BiopetPipe +import nl.lumc.sasc.biopet.extensions.Freebayes +import nl.lumc.sasc.biopet.extensions.bcftools.{ BcftoolsCall, BcftoolsMerge } import nl.lumc.sasc.biopet.utils.config.Config import nl.lumc.sasc.biopet.extensions.gatk.CombineVariants import nl.lumc.sasc.biopet.extensions.gatk.broad.{ HaplotypeCaller, UnifiedGenotyper } @@ -26,7 +29,7 @@ import scala.collection.mutable.ListBuffer * * Created by pjvan_thof on 3/2/15. */ -class ShivaVariantcallingTest extends TestNGSuite with Matchers { +trait ShivaVariantcallingTestTrait extends TestNGSuite with Matchers { def initPipeline(map: Map[String, Any]): ShivaVariantcalling = { new ShivaVariantcalling() { override def configNamespace = "shivavariantcalling" @@ -36,21 +39,22 @@ class ShivaVariantcallingTest extends TestNGSuite with Matchers { } } + def raw: Boolean = false + def bcftools: Boolean = false + def bcftools_singlesample: Boolean = false + def haplotypeCallerGvcf: Boolean = false + def haplotypeCallerAllele: Boolean = false + def unifiedGenotyperAllele: Boolean = false + def unifiedGenotyper: Boolean = false + def haplotypeCaller: Boolean = false + def freebayes: Boolean = false + def varscanCnsSinglesample: Boolean = false + @DataProvider(name = "shivaVariantcallingOptions") def shivaVariantcallingOptions = { - val bool = Array(true, false) - - (for ( - bams <- 0 to 2; - raw <- bool; - bcftools <- bool; - bcftools_singlesample <- bool; - haplotypeCallerGvcf <- bool; - haplotypeCallerAllele <- bool; - unifiedGenotyperAllele <- bool; - unifiedGenotyper <- bool; - haplotypeCaller <- bool - ) yield Array[Any](bams, raw, bcftools, bcftools_singlesample, unifiedGenotyper, haplotypeCaller, haplotypeCallerGvcf, haplotypeCallerAllele, unifiedGenotyperAllele) + (for (bams <- 0 to 2) yield Array[Any](bams, raw, bcftools, bcftools_singlesample, unifiedGenotyper, + haplotypeCaller, haplotypeCallerGvcf, haplotypeCallerAllele, unifiedGenotyperAllele, + freebayes, varscanCnsSinglesample) ).toArray } @@ -58,31 +62,31 @@ class ShivaVariantcallingTest extends TestNGSuite with Matchers { def testShivaVariantcalling(bams: Int, raw: Boolean, bcftools: Boolean, - bcftools_singlesample: Boolean, + bcftoolsSinglesample: Boolean, unifiedGenotyper: Boolean, haplotypeCaller: Boolean, haplotypeCallerGvcf: Boolean, haplotypeCallerAllele: Boolean, - unifiedGenotyperAllele: Boolean) = { + unifiedGenotyperAllele: Boolean, + freebayes: Boolean, + varscanCnsSinglesample: Boolean) = { val callers: ListBuffer[String] = ListBuffer() if (raw) callers.append("raw") if (bcftools) callers.append("bcftools") - if (bcftools_singlesample) callers.append("bcftools_singlesample") + if (bcftoolsSinglesample) callers.append("bcftools_singlesample") if (unifiedGenotyper) callers.append("unifiedgenotyper") if (haplotypeCallerGvcf) callers.append("haplotypecaller_gvcf") if (haplotypeCallerAllele) callers.append("haplotypecaller_allele") if (unifiedGenotyperAllele) callers.append("unifiedgenotyper_allele") if (haplotypeCaller) callers.append("haplotypecaller") + if (freebayes) callers.append("freebayes") + if (varscanCnsSinglesample) callers.append("varscan_cns_singlesample") val map = Map("variantcallers" -> callers.toList) val pipeline = initPipeline(map) pipeline.inputBams = (for (n <- 1 to bams) yield n.toString -> ShivaVariantcallingTest.inputTouch("bam_" + n + ".bam")).toMap - val illegalArgumentException = pipeline.inputBams.isEmpty || - (!raw && !bcftools && - !haplotypeCaller && !unifiedGenotyper && - !haplotypeCallerGvcf && !haplotypeCallerAllele && !unifiedGenotyperAllele && - !bcftools_singlesample) + val illegalArgumentException = pipeline.inputBams.isEmpty || callers.isEmpty if (illegalArgumentException) intercept[IllegalArgumentException] { pipeline.script() @@ -91,10 +95,13 @@ class ShivaVariantcallingTest extends TestNGSuite with Matchers { if (!illegalArgumentException) { pipeline.script() - pipeline.functions.count(_.isInstanceOf[CombineVariants]) shouldBe 1 + (if (raw) 1 else 0) - //pipeline.functions.count(_.isInstanceOf[Bcftools]) shouldBe (if (bcftools) 1 else 0) - //FIXME: Can not check for bcftools because of piping - //pipeline.functions.count(_.isInstanceOf[MpileupToVcf]) shouldBe (if (raw) bams else 0) + val pipesJobs = pipeline.functions.filter(_.isInstanceOf[BiopetPipe]).flatMap(_.asInstanceOf[BiopetPipe].pipesJobs) + + pipeline.functions.count(_.isInstanceOf[CombineVariants]) shouldBe (1 + (if (raw) 1 else 0) + (if (varscanCnsSinglesample) 1 else 0)) + pipesJobs.count(_.isInstanceOf[BcftoolsCall]) shouldBe (if (bcftools) 1 else 0) + (if (bcftoolsSinglesample) bams else 0) + pipeline.functions.count(_.isInstanceOf[BcftoolsMerge]) shouldBe (if (bcftoolsSinglesample && bams > 1) 1 else 0) + pipesJobs.count(_.isInstanceOf[Freebayes]) shouldBe (if (freebayes) 1 else 0) + pipesJobs.count(_.isInstanceOf[MpileupToVcf]) shouldBe (if (raw) bams else 0) pipeline.functions.count(_.isInstanceOf[VcfFilter]) shouldBe (if (raw) bams else 0) pipeline.functions.count(_.isInstanceOf[HaplotypeCaller]) shouldBe (if (haplotypeCaller) 1 else 0) + (if (haplotypeCallerAllele) 1 else 0) + (if (haplotypeCallerGvcf) bams else 0) @@ -103,14 +110,55 @@ class ShivaVariantcallingTest extends TestNGSuite with Matchers { pipeline.functions.count(_.isInstanceOf[VcfStats]) shouldBe (1 + callers.size) } } +} - @AfterClass def removeTempOutputDir() = { - FileUtils.deleteDirectory(ShivaVariantcallingTest.outputDir) - } +class ShivaVariantcallingNoVariantcallersTest extends ShivaVariantcallingTestTrait +class ShivaVariantcallingAllTest extends ShivaVariantcallingTestTrait { + override def raw: Boolean = true + override def bcftools: Boolean = true + override def bcftools_singlesample: Boolean = true + override def haplotypeCallerGvcf: Boolean = true + override def haplotypeCallerAllele: Boolean = true + override def unifiedGenotyperAllele: Boolean = true + override def unifiedGenotyper: Boolean = true + override def haplotypeCaller: Boolean = true + override def freebayes: Boolean = true + override def varscanCnsSinglesample: Boolean = true +} +class ShivaVariantcallingRawTest extends ShivaVariantcallingTestTrait { + override def raw: Boolean = true +} +class ShivaVariantcallingBcftoolsTest extends ShivaVariantcallingTestTrait { + override def bcftools: Boolean = true +} +class ShivaVariantcallingBcftoolsSinglesampleTest extends ShivaVariantcallingTestTrait { + override def bcftools_singlesample: Boolean = true +} +class ShivaVariantcallingHaplotypeCallerGvcfTest extends ShivaVariantcallingTestTrait { + override def haplotypeCallerGvcf: Boolean = true +} +class ShivaVariantcallingHaplotypeCallerAlleleTest extends ShivaVariantcallingTestTrait { + override def haplotypeCallerAllele: Boolean = true +} +class ShivaVariantcallingUnifiedGenotyperAlleleTest extends ShivaVariantcallingTestTrait { + override def unifiedGenotyperAllele: Boolean = true +} +class ShivaVariantcallingUnifiedGenotyperTest extends ShivaVariantcallingTestTrait { + override def unifiedGenotyper: Boolean = true +} +class ShivaVariantcallingHaplotypeCallerTest extends ShivaVariantcallingTestTrait { + override def haplotypeCaller: Boolean = true +} +class ShivaVariantcallingFreebayesTest extends ShivaVariantcallingTestTrait { + override def freebayes: Boolean = true +} +class ShivaVariantcallingVarscanCnsSinglesampleTest extends ShivaVariantcallingTestTrait { + override def varscanCnsSinglesample: Boolean = true } object ShivaVariantcallingTest { val outputDir = Files.createTempDir() + outputDir.deleteOnExit() new File(outputDir, "input").mkdirs() def inputTouch(name: String): File = { val file = new File(outputDir, "input" + File.separator + name).getAbsoluteFile @@ -142,6 +190,7 @@ object ShivaVariantcallingTest { "md5sum" -> Map("exe" -> "test"), "bgzip" -> Map("exe" -> "test"), "tabix" -> Map("exe" -> "test"), - "input_alleles" -> "test" + "input_alleles" -> "test.vcf.gz", + "varscan_jar" -> "test" ) } \ No newline at end of file diff --git a/public/src/src/test/resources/log4j.properties b/src/src/test/resources/log4j.properties similarity index 100% rename from public/src/src/test/resources/log4j.properties rename to src/src/test/resources/log4j.properties diff --git a/public/tinycap/.gitignore b/tinycap/.gitignore similarity index 100% rename from public/tinycap/.gitignore rename to tinycap/.gitignore diff --git a/public/tinycap/pom.xml b/tinycap/pom.xml similarity index 100% rename from public/tinycap/pom.xml rename to tinycap/pom.xml diff --git a/public/tinycap/src/main/resources/nl/lumc/sasc/biopet/pipelines/tinycap/tinycapFront.ssp b/tinycap/src/main/resources/nl/lumc/sasc/biopet/pipelines/tinycap/tinycapFront.ssp similarity index 100% rename from public/tinycap/src/main/resources/nl/lumc/sasc/biopet/pipelines/tinycap/tinycapFront.ssp rename to tinycap/src/main/resources/nl/lumc/sasc/biopet/pipelines/tinycap/tinycapFront.ssp diff --git a/public/tinycap/src/main/scala/nl/lumc/sasc/biopet/pipelines/tinycap/TinyCap.scala b/tinycap/src/main/scala/nl/lumc/sasc/biopet/pipelines/tinycap/TinyCap.scala similarity index 100% rename from public/tinycap/src/main/scala/nl/lumc/sasc/biopet/pipelines/tinycap/TinyCap.scala rename to tinycap/src/main/scala/nl/lumc/sasc/biopet/pipelines/tinycap/TinyCap.scala diff --git a/public/tinycap/src/main/scala/nl/lumc/sasc/biopet/pipelines/tinycap/TinyCapReport.scala b/tinycap/src/main/scala/nl/lumc/sasc/biopet/pipelines/tinycap/TinyCapReport.scala similarity index 100% rename from public/tinycap/src/main/scala/nl/lumc/sasc/biopet/pipelines/tinycap/TinyCapReport.scala rename to tinycap/src/main/scala/nl/lumc/sasc/biopet/pipelines/tinycap/TinyCapReport.scala diff --git a/public/tinycap/src/main/scala/nl/lumc/sasc/biopet/pipelines/tinycap/measures/FragmentsPerSmallRna.scala b/tinycap/src/main/scala/nl/lumc/sasc/biopet/pipelines/tinycap/measures/FragmentsPerSmallRna.scala similarity index 100% rename from public/tinycap/src/main/scala/nl/lumc/sasc/biopet/pipelines/tinycap/measures/FragmentsPerSmallRna.scala rename to tinycap/src/main/scala/nl/lumc/sasc/biopet/pipelines/tinycap/measures/FragmentsPerSmallRna.scala diff --git a/public/tinycap/src/test/resources/log4j.properties b/tinycap/src/test/resources/log4j.properties similarity index 100% rename from public/tinycap/src/test/resources/log4j.properties rename to tinycap/src/test/resources/log4j.properties diff --git a/public/tinycap/src/test/scala/nl/lumc/sasc/biopet/pipelines/tinycap/TinyCapTest.scala b/tinycap/src/test/scala/nl/lumc/sasc/biopet/pipelines/tinycap/TinyCapTest.scala similarity index 100% rename from public/tinycap/src/test/scala/nl/lumc/sasc/biopet/pipelines/tinycap/TinyCapTest.scala rename to tinycap/src/test/scala/nl/lumc/sasc/biopet/pipelines/tinycap/TinyCapTest.scala diff --git a/public/kopisu/.gitignore b/toucan/.gitignore similarity index 100% rename from public/kopisu/.gitignore rename to toucan/.gitignore diff --git a/public/toucan/pom.xml b/toucan/pom.xml similarity index 81% rename from public/toucan/pom.xml rename to toucan/pom.xml index 781e458c31cc8128843b55873781e3aaa9f8b1e0..62a9699f8f63680d1c8b6bce67a7390907ca8b34 100644 --- a/public/toucan/pom.xml +++ b/toucan/pom.xml @@ -43,5 +43,17 @@ <artifactId>BiopetToolsExtensions</artifactId> <version>${project.version}</version> </dependency> + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + <version>6.8</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.scalatest</groupId> + <artifactId>scalatest_2.10</artifactId> + <version>2.2.1</version> + <scope>test</scope> + </dependency> </dependencies> </project> diff --git a/public/toucan/src/main/scala/nl/lumc/sasc/biopet/pipelines/toucan/ManweActivateAfterAnnotImport.scala b/toucan/src/main/scala/nl/lumc/sasc/biopet/pipelines/toucan/ManweActivateAfterAnnotImport.scala similarity index 100% rename from public/toucan/src/main/scala/nl/lumc/sasc/biopet/pipelines/toucan/ManweActivateAfterAnnotImport.scala rename to toucan/src/main/scala/nl/lumc/sasc/biopet/pipelines/toucan/ManweActivateAfterAnnotImport.scala diff --git a/public/toucan/src/main/scala/nl/lumc/sasc/biopet/pipelines/toucan/ManweDownloadAfterAnnotate.scala b/toucan/src/main/scala/nl/lumc/sasc/biopet/pipelines/toucan/ManweDownloadAfterAnnotate.scala similarity index 100% rename from public/toucan/src/main/scala/nl/lumc/sasc/biopet/pipelines/toucan/ManweDownloadAfterAnnotate.scala rename to toucan/src/main/scala/nl/lumc/sasc/biopet/pipelines/toucan/ManweDownloadAfterAnnotate.scala diff --git a/public/toucan/src/main/scala/nl/lumc/sasc/biopet/pipelines/toucan/Toucan.scala b/toucan/src/main/scala/nl/lumc/sasc/biopet/pipelines/toucan/Toucan.scala similarity index 84% rename from public/toucan/src/main/scala/nl/lumc/sasc/biopet/pipelines/toucan/Toucan.scala rename to toucan/src/main/scala/nl/lumc/sasc/biopet/pipelines/toucan/Toucan.scala index 2e3ffe26a1735dbea0f664bf8c4c957bd7262f7b..58dcaf82447daef751eae0d21ac7c43387026149 100644 --- a/public/toucan/src/main/scala/nl/lumc/sasc/biopet/pipelines/toucan/Toucan.scala +++ b/toucan/src/main/scala/nl/lumc/sasc/biopet/pipelines/toucan/Toucan.scala @@ -40,15 +40,17 @@ class Toucan(val root: Configurable) extends QScript with BiopetQScript with Sum @Input(doc = "Input GVCF file", shortName = "gvcf", required = false) var inputGvcf: Option[File] = None - var sampleIds: List[String] = Nil + var outputVcf: Option[File] = None + + def sampleInfo: Map[String, Map[String, Any]] = root match { + case m: MultiSampleQScript => m.samples.map { case (sampleId, sample) => sampleId -> sample.sampleTags } + case null => VcfUtils.getSampleIds(inputVCF).map(x => x -> Map[String, Any]()).toMap + case s: SampleLibraryTag => s.sampleId.map(x => x -> Map[String, Any]()).toMap + case _ => throw new IllegalArgumentException("") + } + def init(): Unit = { inputFiles :+= new InputFile(inputVCF) - sampleIds = root match { - case m: MultiSampleQScript => m.samples.keys.toList - case null => VcfUtils.getSampleIds(inputVCF) - case s: SampleLibraryTag => s.sampleId.toList - case _ => throw new IllegalArgumentException("You don't have any samples") - } } override def defaults = Map( @@ -79,29 +81,29 @@ class Toucan(val root: Configurable) extends QScript with BiopetQScript with Sum val gonlVcfFile: Option[File] = config("gonl_vcf") val exacVcfFile: Option[File] = config("exac_vcf") - var outputFile = normalizer.outputVcf + outputVcf = Some(normalizer.outputVcf) gonlVcfFile match { case Some(gonlFile) => val vcfWithVcf = new VcfWithVcf(this) - vcfWithVcf.input = outputFile + vcfWithVcf.input = outputVcf.getOrElse(new File("")) vcfWithVcf.secondaryVcf = gonlFile vcfWithVcf.output = swapExt(outputDir, normalizer.outputVcf, ".vcf.gz", ".gonl.vcf.gz") vcfWithVcf.fields ::= ("AF", "AF_gonl", None) add(vcfWithVcf) - outputFile = vcfWithVcf.output + outputVcf = Some(vcfWithVcf.output) case _ => } exacVcfFile match { case Some(exacFile) => val vcfWithVcf = new VcfWithVcf(this) - vcfWithVcf.input = outputFile + vcfWithVcf.input = outputVcf.getOrElse(new File("")) vcfWithVcf.secondaryVcf = exacFile - vcfWithVcf.output = swapExt(outputDir, outputFile, ".vcf.gz", ".exac.vcf.gz") + vcfWithVcf.output = swapExt(outputDir, outputVcf.getOrElse(new File("")), ".vcf.gz", ".exac.vcf.gz") vcfWithVcf.fields ::= ("AF", "AF_exac", None) add(vcfWithVcf) - outputFile = vcfWithVcf.output + outputVcf = Some(vcfWithVcf.output) case _ => } @@ -116,7 +118,7 @@ class Toucan(val root: Configurable) extends QScript with BiopetQScript with Sum * @param annotation: ManweDownloadAnnotateVcf object of annotated vcf * @return */ - def importAndActivateSample(sampleID: String, inputVcf: File, + def importAndActivateSample(sampleID: String, sampleGroups: List[String], inputVcf: File, gVCF: File, annotation: ManweAnnotateVcf): ManweActivateAfterAnnotImport = { val minGQ: Int = config("minimum_genome_quality", default = 20, namespace = "manwe") @@ -165,6 +167,7 @@ class Toucan(val root: Configurable) extends QScript with BiopetQScript with Sum imported.beds = List(bgzippedBed.output) imported.name = Some(sampleID) imported.public = isPublic + imported.group = sampleGroups imported.waitToComplete = false imported.isIntermediate = true imported.output = swapExt(outputDir, intersected.output, ".vcf.gz", ".manwe.import") @@ -186,7 +189,6 @@ class Toucan(val root: Configurable) extends QScript with BiopetQScript with Sum def varda(vcf: File, gVcf: File): File = { val annotationQueries: List[String] = config("annotation_queries", default = List("GLOBAL *"), namespace = "manwe") - //TODO: add groups!!! Need sample-specific group tags for this val annotate = new ManweAnnotateVcf(this) annotate.vcf = vcf @@ -202,7 +204,14 @@ class Toucan(val root: Configurable) extends QScript with BiopetQScript with Sum annotatedVcf.output = swapExt(outputDir, annotate.output, ".manwe.annot", "manwe.annot.vcf.gz") add(annotatedVcf) - val activates = sampleIds map { x => importAndActivateSample(x, vcf, gVcf, annotate) } + val activates = sampleInfo map { x => + val sampleGroup = x._2.getOrElse("varda_group", Nil) match { + case x: List[String] => x + case Nil => Nil + case _ => throw new IllegalArgumentException("Sample tag 'varda_group' is not a list of strings") + } + importAndActivateSample(x._1, sampleGroup, vcf, gVcf, annotate) + } val finalLn = new Ln(this) activates.foreach(x => finalLn.deps :+= x.output)