Commit 59467664 authored by Peter van 't Hof's avatar Peter van 't Hof

Added a tool package

parent 405222b6
......@@ -24,7 +24,7 @@
<properties>
<sting.shade.phase>package</sting.shade.phase>
<app.main.class>nl.lumc.sasc.biopet.core.BiopetExecutableProtected</app.main.class>
<app.main.class>nl.lumc.sasc.biopet.BiopetExecutableProtected</app.main.class>
</properties>
<dependencies>
......
......@@ -5,8 +5,7 @@
*/
package nl.lumc.sasc.biopet
import nl.lumc.sasc.biopet.core.BiopetExecutable
import nl.lumc.sasc.biopet.utils.MainCommand
import nl.lumc.sasc.biopet.utils.{BiopetExecutable, MainCommand}
object BiopetExecutableProtected extends BiopetExecutable {
def pipelines: List[MainCommand] = BiopetExecutablePublic.pipelines ::: List(
......
......@@ -17,9 +17,8 @@ package nl.lumc.sasc.biopet.core.report
import java.io._
import nl.lumc.sasc.biopet.core.ToolCommandFuntion
import nl.lumc.sasc.biopet.tools.ToolCommand
import nl.lumc.sasc.biopet.utils.summary.Summary
import nl.lumc.sasc.biopet.utils.{ Logging, IoUtils }
import nl.lumc.sasc.biopet.utils.{ ToolCommand, Logging, IoUtils }
import org.broadinstitute.gatk.utils.commandline.Input
import org.fusesource.scalate.{ TemplateEngine, TemplateSource }
import scala.collection.mutable
......
......@@ -35,7 +35,7 @@
<properties>
<sting.shade.phase>package</sting.shade.phase>
<app.main.class>nl.lumc.sasc.biopet.core.BiopetExecutablePublic</app.main.class>
<app.main.class>nl.lumc.sasc.biopet.BiopetExecutablePublic</app.main.class>
</properties>
<dependencies>
......
......@@ -15,8 +15,7 @@
*/
package nl.lumc.sasc.biopet
import nl.lumc.sasc.biopet.core.BiopetExecutable
import nl.lumc.sasc.biopet.utils.MainCommand
import nl.lumc.sasc.biopet.utils.{BiopetExecutable, MainCommand}
object BiopetExecutablePublic extends BiopetExecutable {
def publicPipelines: List[MainCommand] = List(
......
<?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">
<parent>
<artifactId>Biopet</artifactId>
<groupId>nl.lumc.sasc</groupId>
<version>0.5.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>BiopetToolsPackage</artifactId>
<properties>
<sting.shade.phase>package</sting.shade.phase>
<app.main.class>nl.lumc.sasc.biopet.BiopetToolsExecutable</app.main.class>
</properties>
<dependencies>
<dependency>
<groupId>nl.lumc.sasc</groupId>
<artifactId>BiopetTools</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>BiopetTools-${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>
</filters>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
/**
* Biopet is built on top of GATK Queue for building bioinformatic
* pipelines. It is mainly intended to support LUMC SHARK cluster which is running
* SGE. But other types of HPC that are supported by GATK Queue (such as PBS)
* should also be able to execute Biopet tools and pipelines.
*
* Copyright 2014 Sequencing Analysis Support Core - Leiden University Medical Center
*
* Contact us at: sasc@lumc.nl
*
* A dual licensing mode is applied. The source code within this project that are
* not part of GATK Queue is freely available for non-commercial use under an AGPL
* license; For commercial users or users who do not want to follow the AGPL
* license, please contact us to obtain a separate license.
*/
package nl.lumc.sasc.biopet
import nl.lumc.sasc.biopet.utils.{ BiopetExecutable, MainCommand }
object BiopetToolsExecutable extends BiopetExecutable {
def pipelines: List[MainCommand] = Nil
def tools: List[MainCommand] = List(
nl.lumc.sasc.biopet.tools.MergeTables,
nl.lumc.sasc.biopet.tools.WipeReads,
nl.lumc.sasc.biopet.tools.ExtractAlignedFastq,
nl.lumc.sasc.biopet.tools.FastqSync,
nl.lumc.sasc.biopet.tools.BiopetFlagstat,
nl.lumc.sasc.biopet.tools.CheckAllelesVcfInBam,
nl.lumc.sasc.biopet.tools.VcfToTsv,
nl.lumc.sasc.biopet.tools.VcfFilter,
nl.lumc.sasc.biopet.tools.VcfStats,
nl.lumc.sasc.biopet.tools.FindRepeatsPacBio,
nl.lumc.sasc.biopet.tools.MpileupToVcf,
nl.lumc.sasc.biopet.tools.FastqSplitter,
nl.lumc.sasc.biopet.tools.BedtoolsCoverageToCounts,
nl.lumc.sasc.biopet.tools.SageCountFastq,
nl.lumc.sasc.biopet.tools.SageCreateLibrary,
nl.lumc.sasc.biopet.tools.SageCreateTagCounts,
nl.lumc.sasc.biopet.tools.BastyGenerateFasta,
nl.lumc.sasc.biopet.tools.MergeAlleles,
nl.lumc.sasc.biopet.tools.SamplesTsvToJson,
nl.lumc.sasc.biopet.tools.SeqStat,
nl.lumc.sasc.biopet.tools.VepNormalizer,
nl.lumc.sasc.biopet.tools.AnnotateVcfWithBed,
nl.lumc.sasc.biopet.tools.VcfWithVcf)
}
......@@ -20,6 +20,7 @@ import java.io.File
import htsjdk.variant.variantcontext.VariantContextBuilder
import htsjdk.variant.variantcontext.writer.{ AsyncVariantContextWriter, VariantContextWriterBuilder }
import htsjdk.variant.vcf.{ VCFFileReader, VCFHeaderLineCount, VCFHeaderLineType, VCFInfoHeaderLine }
import nl.lumc.sasc.biopet.utils.ToolCommand
import nl.lumc.sasc.biopet.utils.intervals.{ BedRecord, BedRecordList }
import scala.collection.JavaConversions._
......
......@@ -21,6 +21,7 @@ import htsjdk.samtools.SamReaderFactory
import htsjdk.samtools.reference.IndexedFastaSequenceFile
import htsjdk.variant.variantcontext.VariantContext
import htsjdk.variant.vcf.VCFFileReader
import nl.lumc.sasc.biopet.utils.ToolCommand
import nl.lumc.sasc.biopet.utils.VcfUtils._
import scala.collection.JavaConversions._
......
......@@ -18,6 +18,7 @@ package nl.lumc.sasc.biopet.tools
import java.io.{ File, PrintWriter }
import htsjdk.samtools.{ SAMSequenceRecord, SamReaderFactory }
import nl.lumc.sasc.biopet.utils.ToolCommand
import nl.lumc.sasc.biopet.utils.config.Configurable
import scala.io.Source
......
......@@ -17,6 +17,8 @@ package nl.lumc.sasc.biopet.tools
import java.io.{ File, PrintWriter }
import nl.lumc.sasc.biopet.utils.ToolCommand
import scala.collection.{ SortedMap, mutable }
import scala.io.Source
......
......@@ -18,7 +18,7 @@ package nl.lumc.sasc.biopet.tools
import java.io.{ File, PrintWriter }
import htsjdk.samtools.{ SAMRecord, SamReaderFactory }
import nl.lumc.sasc.biopet.utils.ConfigUtils
import nl.lumc.sasc.biopet.utils.{ ToolCommand, ConfigUtils }
import scala.collection.JavaConversions._
import scala.collection.mutable
......
......@@ -21,6 +21,7 @@ import htsjdk.samtools.{ QueryInterval, SAMRecord, SamReader, SamReaderFactory }
import htsjdk.variant.variantcontext.{ VariantContext, VariantContextBuilder }
import htsjdk.variant.variantcontext.writer.{ AsyncVariantContextWriter, VariantContextWriterBuilder }
import htsjdk.variant.vcf.{ VCFFileReader, VCFHeaderLineCount, VCFHeaderLineType, VCFInfoHeaderLine }
import nl.lumc.sasc.biopet.utils.ToolCommand
import scala.collection.JavaConversions._
import scala.collection.mutable
......
......@@ -20,6 +20,7 @@ import java.io.File
import htsjdk.samtools.{ QueryInterval, SamReaderFactory, ValidationStringency }
import htsjdk.samtools.fastq.{ BasicFastqWriter, FastqReader, FastqRecord }
import htsjdk.samtools.util.Interval
import nl.lumc.sasc.biopet.utils.ToolCommand
import scala.collection.JavaConverters._
import scala.collection.mutable.{ Set => MSet }
......
......@@ -18,6 +18,7 @@ package nl.lumc.sasc.biopet.tools
import java.io.File
import htsjdk.samtools.fastq.{ AsyncFastqWriter, BasicFastqWriter, FastqReader }
import nl.lumc.sasc.biopet.utils.ToolCommand
object FastqSplitter extends ToolCommand {
......
......@@ -18,6 +18,7 @@ package nl.lumc.sasc.biopet.tools
import java.io.File
import htsjdk.samtools.fastq.{ AsyncFastqWriter, BasicFastqWriter, FastqReader, FastqRecord }
import nl.lumc.sasc.biopet.utils.ToolCommand
import scala.annotation.tailrec
import scala.collection.JavaConverters._
......
......@@ -18,6 +18,7 @@ package nl.lumc.sasc.biopet.tools
import java.io.{ PrintWriter, File }
import htsjdk.samtools.{ QueryInterval, SAMRecord, SamReaderFactory, ValidationStringency }
import nl.lumc.sasc.biopet.utils.ToolCommand
import scala.collection.JavaConversions._
import scala.io.Source
......
......@@ -21,6 +21,7 @@ import htsjdk.samtools.reference.FastaSequenceFile
import htsjdk.variant.variantcontext.writer.{ AsyncVariantContextWriter, VariantContextWriterBuilder }
import htsjdk.variant.variantcontext.{ Allele, VariantContext, VariantContextBuilder }
import htsjdk.variant.vcf.{ VCFFileReader, VCFHeader }
import nl.lumc.sasc.biopet.utils.ToolCommand
import nl.lumc.sasc.biopet.utils.config.Configurable
import scala.collection.JavaConversions._
......
......@@ -17,6 +17,8 @@ package nl.lumc.sasc.biopet.tools
import java.io.{ BufferedWriter, File, FileWriter, OutputStreamWriter }
import nl.lumc.sasc.biopet.utils.ToolCommand
import scala.collection.mutable.{ Set => MutSet }
import scala.io.{ BufferedSource, Source }
......
......@@ -17,6 +17,8 @@ package nl.lumc.sasc.biopet.tools
import java.io.{ File, PrintWriter }
import nl.lumc.sasc.biopet.utils.ToolCommand
import scala.collection.mutable
import scala.collection.mutable.ArrayBuffer
import scala.io.Source
......
......@@ -18,6 +18,7 @@ package nl.lumc.sasc.biopet.tools
import java.io.File
import htsjdk.samtools.fastq.{ AsyncFastqWriter, BasicFastqWriter, FastqReader, FastqRecord }
import nl.lumc.sasc.biopet.utils.ToolCommand
import nl.lumc.sasc.biopet.utils.config.Configurable
object PrefixFastq extends ToolCommand {
......
......@@ -19,6 +19,7 @@ import java.io.{ PrintWriter, InputStream, File }
import java.util
import htsjdk.variant.vcf.VCFFileReader
import nl.lumc.sasc.biopet.utils.ToolCommand
import nl.lumc.sasc.biopet.utils.rscript.ScatterPlot
import nl.lumc.sasc.biopet.utils.intervals.{ BedRecord, BedRecordList }
......
......@@ -17,6 +17,7 @@ package nl.lumc.sasc.biopet.tools
import java.io.{ File, FileReader, PrintWriter }
import nl.lumc.sasc.biopet.utils.ToolCommand
import org.biojava3.sequencing.io.fastq.{ Fastq, StreamListener, SangerFastqReader }
import scala.collection.{ SortedMap, mutable }
......
......@@ -17,6 +17,7 @@ package nl.lumc.sasc.biopet.tools
import java.io.{ File, PrintWriter }
import nl.lumc.sasc.biopet.utils.ToolCommand
import org.biojava3.core.sequence.DNASequence
import org.biojava3.core.sequence.io.FastaReaderHelper
......
......@@ -17,6 +17,8 @@ package nl.lumc.sasc.biopet.tools
import java.io.{ File, PrintWriter }
import nl.lumc.sasc.biopet.utils.ToolCommand
import scala.collection.{ SortedMap, mutable }
import scala.io.Source
......
......@@ -18,6 +18,7 @@ package nl.lumc.sasc.biopet.tools
import java.io.{ PrintWriter, File }
import nl.lumc.sasc.biopet.utils.ConfigUtils._
import nl.lumc.sasc.biopet.utils.ToolCommand
import scala.collection.mutable
import scala.io.Source
......
......@@ -18,7 +18,7 @@ package nl.lumc.sasc.biopet.tools
import java.io.{ PrintWriter, File }
import htsjdk.samtools.fastq.{ FastqReader, FastqRecord }
import nl.lumc.sasc.biopet.utils.ConfigUtils
import nl.lumc.sasc.biopet.utils.{ ToolCommand, ConfigUtils }
import scala.collection.JavaConverters._
import scala.collection.immutable.Map
......
......@@ -2,6 +2,7 @@ package nl.lumc.sasc.biopet.tools
import java.io.File
import nl.lumc.sasc.biopet.utils.ToolCommand
import nl.lumc.sasc.biopet.utils.intervals.BedRecordList
/**
......
......@@ -17,6 +17,7 @@ package nl.lumc.sasc.biopet.tools
import java.io.{ PrintWriter, File }
import nl.lumc.sasc.biopet.utils.ToolCommand
import nl.lumc.sasc.biopet.utils.summary.Summary
/**
......
......@@ -20,6 +20,7 @@ import java.io.File
import htsjdk.variant.variantcontext.{ GenotypeType, VariantContext }
import htsjdk.variant.variantcontext.writer.{ AsyncVariantContextWriter, VariantContextWriterBuilder }
import htsjdk.variant.vcf.VCFFileReader
import nl.lumc.sasc.biopet.utils.ToolCommand
import nl.lumc.sasc.biopet.utils.config.Configurable
import scala.collection.JavaConversions._
......
......@@ -21,6 +21,7 @@ import htsjdk.samtools.reference.FastaSequenceFile
import htsjdk.samtools.util.Interval
import htsjdk.variant.variantcontext.{ Allele, Genotype, VariantContext }
import htsjdk.variant.vcf.VCFFileReader
import nl.lumc.sasc.biopet.utils.ToolCommand
import nl.lumc.sasc.biopet.utils.config.Configurable
import nl.lumc.sasc.biopet.utils.intervals.BedRecordList
......
......@@ -19,6 +19,7 @@ import java.io.{ File, PrintStream }
import java.text.DecimalFormat
import htsjdk.variant.vcf.VCFFileReader
import nl.lumc.sasc.biopet.utils.ToolCommand
import scala.collection.JavaConversions._
import scala.collection.mutable
......
......@@ -21,6 +21,7 @@ import java.util
import htsjdk.variant.variantcontext.{ VariantContext, VariantContextBuilder }
import htsjdk.variant.variantcontext.writer.{ AsyncVariantContextWriter, VariantContextWriterBuilder }
import htsjdk.variant.vcf._
import nl.lumc.sasc.biopet.utils.ToolCommand
import nl.lumc.sasc.biopet.utils.VcfUtils.scalaListToJavaObjectArrayList
import scala.collection.JavaConversions._
......
......@@ -21,6 +21,7 @@ import htsjdk.tribble.TribbleException
import htsjdk.variant.variantcontext.writer.{ AsyncVariantContextWriter, VariantContextWriterBuilder }
import htsjdk.variant.variantcontext.{ VariantContext, VariantContextBuilder }
import htsjdk.variant.vcf._
import nl.lumc.sasc.biopet.utils.ToolCommand
import scala.collection.JavaConversions._
import scala.collection.mutable.{ Map => MMap }
......
......@@ -20,6 +20,7 @@ import java.io.File
import com.google.common.hash.{ PrimitiveSink, Funnel, BloomFilter }
import htsjdk.samtools.{ QueryInterval, SAMFileWriter, SAMFileWriterFactory, SAMRecord, SamReader, SamReaderFactory, ValidationStringency }
import htsjdk.samtools.util.{ Interval, IntervalTreeMap }
import nl.lumc.sasc.biopet.utils.ToolCommand
import nl.lumc.sasc.biopet.utils.intervals.BedRecordList
import org.apache.commons.io.FilenameUtils.getExtension
......
......@@ -13,12 +13,10 @@
* 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.core
package nl.lumc.sasc.biopet.utils
import java.io.{ PrintWriter, StringWriter }
import nl.lumc.sasc.biopet.core.BiopetExecutable._
import nl.lumc.sasc.biopet.utils.{ MainCommand, Logging }
import nl.lumc.sasc.biopet.{ FullVersion, LastCommitHash }
import org.apache.log4j.Logger
......@@ -89,7 +87,7 @@ trait BiopetExecutable extends Logging {
case Array("version") =>
println("version: " + FullVersion)
case Array("license") =>
println(getLicense)
println(BiopetExecutable.getLicense)
case Array(module, name, passArgs @ _*) =>
try {
getCommand(module, name).main(passArgs.toArray)
......
......@@ -13,9 +13,8 @@
* 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.tools
package nl.lumc.sasc.biopet.utils
import nl.lumc.sasc.biopet.utils.{ Logging, MainCommand }
import nl.lumc.sasc.biopet.FullVersion
/**
......
......@@ -45,6 +45,7 @@
<module>biopet-tools</module>
<module>biopet-tools-extensions</module>
<module>biopet-extentsions</module>
<module>biopet-tools-package</module>
</modules>
<properties>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment