Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mirrors
biopet.biopet
Commits
d94892dd
Commit
d94892dd
authored
Aug 14, 2014
by
Peter van 't Hof
Browse files
Added Vcf sample compare module
parent
7729a31b
Changes
9
Hide whitespace changes
Inline
Side-by-side
bam-metrics/examples/test.json
View file @
d94892dd
{
"reference"
:
"bla"
,
"bedtools"
:
{
"exe"
:
"test"
},
"samtools"
:
{
"exe"
:
"test"
}
"samtools"
:
{
"exe"
:
"test"
},
"targetBed"
:
[
"target_1"
,
"target_2"
]
}
bam-metrics/nbactions.xml
View file @
d94892dd
...
...
@@ -10,7 +10,7 @@
<goal>
org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
</goal>
</goals>
<properties>
<exec.args>
-classpath %classpath nl.lumc.sasc.biopet.pipelines.bammetrics.BamMetrics -BAM test.bam -out
put
Dir /home/pjvan_thof/pipelines/test -config /home/pjvan_thof/pipelines/biopet/bam-metrics/examples/test.json
</exec.args>
<exec.args>
-classpath %classpath nl.lumc.sasc.biopet.pipelines.bammetrics.BamMetrics -BAM test.bam -outDir /home/pjvan_thof/pipelines/test -config /home/pjvan_thof/pipelines/biopet/bam-metrics/examples/test.json
</exec.args>
<exec.executable>
java
</exec.executable>
<exec.workingdir>
/home/pjvan_thof/pipelines/test
</exec.workingdir>
</properties>
...
...
@@ -25,7 +25,7 @@
<goal>
org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
</goal>
</goals>
<properties>
<exec.args>
-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath nl.lumc.sasc.biopet.pipelines.bammetrics.BamMetrics -BAM test.bam -out
put
Dir /home/pjvan_thof/pipelines/test -config /home/pjvan_thof/pipelines/biopet/bam-metrics/examples/test.json
</exec.args>
<exec.args>
-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath nl.lumc.sasc.biopet.pipelines.bammetrics.BamMetrics -BAM test.bam -outDir /home/pjvan_thof/pipelines/test -config /home/pjvan_thof/pipelines/biopet/bam-metrics/examples/test.json
</exec.args>
<exec.executable>
java
</exec.executable>
<jpda.listen>
true
</jpda.listen>
<exec.workingdir>
/home/pjvan_thof/pipelines/test
</exec.workingdir>
...
...
@@ -41,7 +41,7 @@
<goal>
org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
</goal>
</goals>
<properties>
<exec.args>
-classpath %classpath nl.lumc.sasc.biopet.pipelines.bammetrics.BamMetrics -BAM test.bam -out
put
Dir /home/pjvan_thof/pipelines/test -config /home/pjvan_thof/pipelines/biopet/bam-metrics/examples/test.json
</exec.args>
<exec.args>
-classpath %classpath nl.lumc.sasc.biopet.pipelines.bammetrics.BamMetrics -BAM test.bam -outDir /home/pjvan_thof/pipelines/test -config /home/pjvan_thof/pipelines/biopet/bam-metrics/examples/test.json
</exec.args>
<exec.executable>
java
</exec.executable>
<exec.workingdir>
/home/pjvan_thof/pipelines/test
</exec.workingdir>
</properties>
...
...
flexiprep/examples/test.json
View file @
d94892dd
{
"fastqc"
:
{
"exe"
:
"/
home/pjvan_thof/Downloads/FastQC
/fastqc"
},
"fastqc"
:
{
"exe"
:
"/
data/DIV5/SASC/common/programs/FastQC/fastqc_v0.11.2
/fastqc"
},
"flexiprep"
:
{
"seqtk"
:
{
"exe"
:
"/data/DIV5/SASC/common/programs/seqtk/seqtk/seqtk"
},
"cutadapt"
:
{
"exe"
:
"/home/pjvan_thof/.local/bin/cutadapt"
},
...
...
gatk/gatk-vcf-sample-compare/.gitignore
0 → 100644
View file @
d94892dd
/target/
\ No newline at end of file
gatk/gatk-vcf-sample-compare/examples/test.json
0 → 100644
View file @
d94892dd
{
"gvcffiles"
:
[
"test4.vcf"
,
"test5.vcf"
],
"reference"
:
"/data/DIV5/SASC/common/gatk_bundle_2.8/hg19/ucsc.hg19.fasta"
,
"dbsnp"
:
"bla"
,
"haplotypecaller"
:
{
"stand_call_conf"
:
20
,
"stand_emit_conf"
:
20
}
}
gatk/gatk-vcf-sample-compare/nbactions.xml
0 → 100644
View file @
d94892dd
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<actionName>
run
</actionName>
<packagings>
<packaging>
jar
</packaging>
</packagings>
<goals>
<goal>
process-classes
</goal>
<goal>
org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
</goal>
</goals>
<properties>
<exec.args>
-classpath %classpath nl.lumc.sasc.biopet.pipelines.gatk.GatkVcfSampleCompare -config /home/pjvan_thof/pipelines/biopet/gatk/gatk-vcf-sample-compare/examples/test.json -outDir /home/pjvan_thof/pipelines/test -l debug -V test.vcf -sample bla1 -sample bla2 -sample bla3 -sample bla4
</exec.args>
<exec.executable>
java
</exec.executable>
<exec.workingdir>
/home/pjvan_thof/pipelines/test
</exec.workingdir>
</properties>
</action>
<action>
<actionName>
debug
</actionName>
<packagings>
<packaging>
jar
</packaging>
</packagings>
<goals>
<goal>
process-classes
</goal>
<goal>
org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
</goal>
</goals>
<properties>
<exec.args>
-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath nl.lumc.sasc.biopet.pipelines.gatk.GatkVcfSampleCompare -config /home/pjvan_thof/pipelines/biopet/gatk/gatk-vcf-sample-compare/examples/test.json -outDir /home/pjvan_thof/pipelines/test -l debug -V test.vcf -sample bla1 -sample bla2 -sample bla3 -sample bla4
</exec.args>
<exec.executable>
java
</exec.executable>
<jpda.listen>
true
</jpda.listen>
<exec.workingdir>
/home/pjvan_thof/pipelines/test
</exec.workingdir>
</properties>
</action>
<action>
<actionName>
profile
</actionName>
<packagings>
<packaging>
jar
</packaging>
</packagings>
<goals>
<goal>
process-classes
</goal>
<goal>
org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
</goal>
</goals>
<properties>
<exec.args>
-classpath %classpath nl.lumc.sasc.biopet.pipelines.gatk.GatkVcfSampleCompare -config /home/pjvan_thof/pipelines/biopet/gatk/gatk-vcf-sample-compare/examples/test.json -outDir /home/pjvan_thof/pipelines/test -l debug -V test.vcf -sample bla1 -sample bla2 -sample bla3 -sample bla4
</exec.args>
<exec.executable>
java
</exec.executable>
<exec.workingdir>
/home/pjvan_thof/pipelines/test
</exec.workingdir>
</properties>
</action>
</actions>
gatk/gatk-vcf-sample-compare/pom.xml
0 → 100644
View file @
d94892dd
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
nl.lumc.sasc
</groupId>
<artifactId>
GatkVcfSampleCompare
</artifactId>
<version>
0.1.3
</version>
<packaging>
jar
</packaging>
<name>
GatkVcfSampleCompare
</name>
<url>
http://maven.apache.org
</url>
<parent>
<groupId>
nl.lumc.sasc
</groupId>
<artifactId>
Biopet
</artifactId>
<version>
0.1.3
</version>
<relativePath>
../../
</relativePath>
</parent>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<sting.unpack.phase>
prepare-package
</sting.unpack.phase>
<sting.shade.phase>
package
</sting.shade.phase>
<app.main.class>
nl.lumc.sasc.biopet.pipelines.gatk.GatkVcfSampleCompare
</app.main.class>
</properties>
<dependencies>
<!-- <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>-->
<dependency>
<groupId>
org.scala-lang
</groupId>
<artifactId>
scala-compiler
</artifactId>
<version>
2.11.0
</version>
</dependency>
<!-- <dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_2.9.2</artifactId>
<version>2.0.M4</version>
<scope>test</scope>
</dependency>-->
<dependency>
<groupId>
nl.lumc.sasc
</groupId>
<artifactId>
Biopet-Framework
</artifactId>
<version>
0.1.3
</version>
</dependency>
<dependency>
<groupId>
org.broadinstitute.gatk
</groupId>
<artifactId>
gatk-queue-package-distribution
</artifactId>
<version>
3.2
</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>
src/main/scripts
</directory>
<includes>
<include>
**/*
</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>
org.scala-tools
</groupId>
<artifactId>
maven-scala-plugin
</artifactId>
<version>
2.15.2
</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>
</args>
</configuration>
</execution>
</executions>
</plugin>
<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7.2</version>
<executions>
<execution>
<id>default-test</id>
Disable the default-test by putting it in phase none
<phase>none</phase>
</execution>
</executions>
</plugin>-->
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-shade-plugin
</artifactId>
<version>
2.3
</version>
<configuration>
<finalName>
${project.artifactId}-${project.version}
</finalName>
<transformers>
<transformer
implementation=
"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"
>
<manifestEntries>
<Main-Class>
${app.main.class}
</Main-Class>
<X-Compile-Source-JDK>
${maven.compile.source}
</X-Compile-Source-JDK>
<X-Compile-Target-JDK>
${maven.compile.target}
</X-Compile-Target-JDK>
</manifestEntries>
</transformer>
</transformers>
<artifactSet>
<excludes>
<exclude>
org.broadinstitute.gatk:gatk-queue-package-distribution
</exclude>
<exclude>
junit:junit
</exclude>
<exclude>
org.scala-lang:scala-compiler
</exclude>
<exclude>
org.scala-lang:scala-library
</exclude>
<exclude>
org.scala-lang:scala-reflect
</exclude>
<exclude>
org.scala-lang.modules:*
</exclude>
</excludes>
</artifactSet>
</configuration>
<executions>
<execution>
<phase>
package
</phase>
<goals>
<goal>
shade
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
gatk/gatk-vcf-sample-compare/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/GatkVcfSampleCompare.scala
0 → 100644
View file @
d94892dd
package
nl.lumc.sasc.biopet.pipelines.gatk
import
nl.lumc.sasc.biopet.core.
{
BiopetQScript
,
PipelineCommand
}
import
java.io.File
import
nl.lumc.sasc.biopet.core.config.Configurable
import
org.broadinstitute.gatk.queue.QScript
import
org.broadinstitute.gatk.queue.extensions.gatk.CommandLineGATK
import
org.broadinstitute.gatk.queue.extensions.gatk.SelectVariants
import
org.broadinstitute.gatk.queue.extensions.gatk.VariantEval
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Argument
}
class
GatkVcfSampleCompare
(
val
root
:
Configurable
)
extends
QScript
with
BiopetQScript
{
def
this
()
=
this
(
null
)
@Input
(
doc
=
"Sample vcf file(s)"
,
shortName
=
"V"
)
var
vcfFiles
:
List
[
File
]
=
_
@Argument
(
doc
=
"Reference"
,
shortName
=
"R"
,
required
=
false
)
var
reference
:
File
=
_
@Argument
(
doc
=
"Target bed"
,
shortName
=
"targetBed"
,
required
=
false
)
var
targetBed
:
File
=
_
@Argument
(
doc
=
"Samples"
,
shortName
=
"sample"
,
required
=
false
)
var
samples
:
List
[
String
]
=
Nil
var
vcfFile
:
File
=
_
var
sampleVcfs
:
Map
[
String
,
File
]
=
Map
()
trait
gatkArguments
extends
CommandLineGATK
{
this
.
reference_sequence
=
reference
this
.
memoryLimit
=
2
this
.
jobResourceRequests
:+=
"h_vmem=4G"
}
def
init
()
{
if
(
reference
==
null
)
reference
=
config
(
"reference"
)
if
(
targetBed
==
null
)
targetBed
=
config
(
"targetBed"
)
if
(
outputDir
==
null
)
throw
new
IllegalStateException
(
"Missing Output directory on gatk module"
)
else
if
(!
outputDir
.
endsWith
(
"/"
))
outputDir
+=
"/"
}
def
biopetScript
()
{
vcfFile
=
vcfFiles
.
head
if
(
vcfFiles
.
size
>
1
)
{
}
else
vcfFile
=
vcfFiles
.
head
for
(
sample
<-
samples
)
{
sampleVcfs
+=
(
sample
->
new
File
(
outputDir
+
sample
+
File
.
separator
+
sample
+
".vcf"
))
val
selectVariants
=
new
SelectVariants
with
gatkArguments
selectVariants
.
variant
=
vcfFile
selectVariants
.
out
=
sampleVcfs
(
sample
)
selectVariants
.
sample_name
=
Seq
(
sample
)
selectVariants
.
excludeNonVariants
=
true
add
(
selectVariants
)
}
for
((
sample
,
sampleVcf
)
<-
sampleVcfs
)
{
val
sampleDir
=
outputDir
+
sample
+
File
.
separator
for
((
compareSample
,
compareSampleVcf
)
<-
sampleVcfs
)
{
val
variantEval
=
new
VariantEval
with
gatkArguments
variantEval
.
eval
=
Seq
(
sampleVcf
)
variantEval
.
comp
=
Seq
(
compareSampleVcf
)
variantEval
.
out
=
new
File
(
sampleDir
+
sample
+
"-"
+
compareSample
+
".eval.txt"
)
variantEval
.
noST
=
true
variantEval
.
ST
=
Seq
(
"VariantType"
,
"CompRod"
)
variantEval
.
noEV
=
true
variantEval
.
EV
=
Seq
(
"CompOverlap"
)
if
(
targetBed
!=
null
)
variantEval
.
L
=
Seq
(
targetBed
)
add
(
variantEval
)
}
}
}
}
object
GatkVcfSampleCompare
extends
PipelineCommand
{
override
val
pipeline
=
"/nl/lumc/sasc/biopet/pipelines/gatk/GatkVcfSampleCompare.class"
}
gatk/pom.xml
View file @
d94892dd
...
...
@@ -17,5 +17,6 @@
<module>
gatk-old
</module>
<module>
gatk-pipeline
</module>
<module>
gatk-variantcalling
</module>
<module>
gatk-vcf-sample-compare
</module>
</modules>
</project>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment