Skip to content
GitLab
Menu
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
836310ca
Commit
836310ca
authored
Jun 23, 2015
by
Peter van 't Hof
Browse files
Fix reference
parent
40f1af70
Changes
4
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Freebayes.scala
View file @
836310ca
...
@@ -17,20 +17,20 @@ package nl.lumc.sasc.biopet.extensions
...
@@ -17,20 +17,20 @@ package nl.lumc.sasc.biopet.extensions
import
java.io.File
import
java.io.File
import
nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
import
nl.lumc.sasc.biopet.core.
{
Reference
,
BiopetCommandLineFunction
}
import
nl.lumc.sasc.biopet.core.config.Configurable
import
nl.lumc.sasc.biopet.core.config.Configurable
import
org.broadinstitute.gatk.utils.commandline.
{
Output
,
Input
}
import
org.broadinstitute.gatk.utils.commandline.
{
Output
,
Input
}
/**
/**
* Created by pjvan_thof on 3/3/15.
* Created by pjvan_thof on 3/3/15.
*/
*/
class
Freebayes
(
val
root
:
Configurable
)
extends
BiopetCommandLineFunction
{
class
Freebayes
(
val
root
:
Configurable
)
extends
BiopetCommandLineFunction
with
Reference
{
@Input
(
required
=
true
)
@Input
(
required
=
true
)
var
bamfiles
:
List
[
File
]
=
Nil
var
bamfiles
:
List
[
File
]
=
Nil
@Input
(
required
=
true
)
@Input
(
required
=
true
)
var
reference
:
File
=
config
(
"reference"
)
var
reference
:
File
=
_
@Output
(
required
=
true
)
@Output
(
required
=
true
)
var
outputVcf
:
File
=
null
var
outputVcf
:
File
=
null
...
@@ -42,6 +42,11 @@ class Freebayes(val root: Configurable) extends BiopetCommandLineFunction {
...
@@ -42,6 +42,11 @@ class Freebayes(val root: Configurable) extends BiopetCommandLineFunction {
override
val
versionRegex
=
"""version: (.*)"""
.
r
override
val
versionRegex
=
"""version: (.*)"""
.
r
override
def
versionCommand
=
executable
+
" --version"
override
def
versionCommand
=
executable
+
" --version"
override
def
beforeGraph
:
Unit
=
{
super
.
beforeGraph
reference
=
referenceFasta
()
}
def
cmdLine
=
executable
+
def
cmdLine
=
executable
+
required
(
"--fasta-reference"
,
reference
)
+
required
(
"--fasta-reference"
,
reference
)
+
repeat
(
"--bam"
,
bamfiles
)
+
repeat
(
"--bam"
,
bamfiles
)
+
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/samtools/SamtoolsMpileup.scala
View file @
836310ca
...
@@ -15,12 +15,13 @@
...
@@ -15,12 +15,13 @@
*/
*/
package
nl.lumc.sasc.biopet.extensions.samtools
package
nl.lumc.sasc.biopet.extensions.samtools
import
nl.lumc.sasc.biopet.core.Reference
import
nl.lumc.sasc.biopet.core.config.Configurable
import
nl.lumc.sasc.biopet.core.config.Configurable
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Output
}
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Output
}
import
java.io.File
import
java.io.File
/** Extension for samtools mpileup */
/** Extension for samtools mpileup */
class
SamtoolsMpileup
(
val
root
:
Configurable
)
extends
Samtools
{
class
SamtoolsMpileup
(
val
root
:
Configurable
)
extends
Samtools
with
Reference
{
@Input
(
doc
=
"Bam File"
)
@Input
(
doc
=
"Bam File"
)
var
input
:
List
[
File
]
=
Nil
var
input
:
List
[
File
]
=
Nil
...
@@ -28,7 +29,7 @@ class SamtoolsMpileup(val root: Configurable) extends Samtools {
...
@@ -28,7 +29,7 @@ class SamtoolsMpileup(val root: Configurable) extends Samtools {
var
output
:
File
=
_
var
output
:
File
=
_
@Input
(
doc
=
"Reference fasta"
)
@Input
(
doc
=
"Reference fasta"
)
var
reference
:
File
=
config
(
"reference"
)
var
reference
:
File
=
_
@Input
(
doc
=
"Interval bed"
,
required
=
false
)
@Input
(
doc
=
"Interval bed"
,
required
=
false
)
var
intervalBed
:
Option
[
File
]
=
config
(
"interval_bed"
)
var
intervalBed
:
Option
[
File
]
=
config
(
"interval_bed"
)
...
@@ -40,6 +41,11 @@ class SamtoolsMpileup(val root: Configurable) extends Samtools {
...
@@ -40,6 +41,11 @@ class SamtoolsMpileup(val root: Configurable) extends Samtools {
var
depth
:
Option
[
Int
]
=
config
(
"depth"
)
var
depth
:
Option
[
Int
]
=
config
(
"depth"
)
var
outputMappingQuality
:
Boolean
=
config
(
"output_mapping_quality"
,
default
=
false
)
var
outputMappingQuality
:
Boolean
=
config
(
"output_mapping_quality"
,
default
=
false
)
override
def
beforeGraph
:
Unit
=
{
super
.
beforeGraph
reference
=
referenceFasta
()
}
def
cmdBase
=
required
(
executable
)
+
def
cmdBase
=
required
(
executable
)
+
required
(
"mpileup"
)
+
required
(
"mpileup"
)
+
optional
(
"-f"
,
reference
)
+
optional
(
"-f"
,
reference
)
+
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/MpileupToVcf.scala
View file @
836310ca
...
@@ -18,7 +18,7 @@ package nl.lumc.sasc.biopet.tools
...
@@ -18,7 +18,7 @@ package nl.lumc.sasc.biopet.tools
import
java.io.File
import
java.io.File
import
java.io.PrintWriter
import
java.io.PrintWriter
import
htsjdk.samtools.SamReaderFactory
import
htsjdk.samtools.SamReaderFactory
import
nl.lumc.sasc.biopet.core.
{
ToolCommandFuntion
,
BiopetJavaCommandLineFunction
,
ToolCommand
}
import
nl.lumc.sasc.biopet.core.
{
Reference
,
ToolCommandFuntion
,
BiopetJavaCommandLineFunction
,
ToolCommand
}
import
nl.lumc.sasc.biopet.core.config.Configurable
import
nl.lumc.sasc.biopet.core.config.Configurable
import
nl.lumc.sasc.biopet.extensions.samtools.SamtoolsMpileup
import
nl.lumc.sasc.biopet.extensions.samtools.SamtoolsMpileup
import
nl.lumc.sasc.biopet.utils.ConfigUtils
import
nl.lumc.sasc.biopet.utils.ConfigUtils
...
@@ -29,7 +29,7 @@ import scala.math.round
...
@@ -29,7 +29,7 @@ import scala.math.round
import
scala.math.floor
import
scala.math.floor
import
scala.collection.JavaConversions._
import
scala.collection.JavaConversions._
class
MpileupToVcf
(
val
root
:
Configurable
)
extends
ToolCommandFuntion
{
class
MpileupToVcf
(
val
root
:
Configurable
)
extends
ToolCommandFuntion
with
Reference
{
javaMainClass
=
getClass
.
getName
javaMainClass
=
getClass
.
getName
@Input
(
doc
=
"Input mpileup file"
,
shortName
=
"mpileup"
,
required
=
false
)
@Input
(
doc
=
"Input mpileup file"
,
shortName
=
"mpileup"
,
required
=
false
)
...
@@ -46,7 +46,7 @@ class MpileupToVcf(val root: Configurable) extends ToolCommandFuntion {
...
@@ -46,7 +46,7 @@ class MpileupToVcf(val root: Configurable) extends ToolCommandFuntion {
var
homoFraction
:
Option
[
Double
]
=
config
(
"homoFraction"
)
var
homoFraction
:
Option
[
Double
]
=
config
(
"homoFraction"
)
var
ploidy
:
Option
[
Int
]
=
config
(
"ploidy"
)
var
ploidy
:
Option
[
Int
]
=
config
(
"ploidy"
)
var
sample
:
String
=
_
var
sample
:
String
=
_
var
reference
:
String
=
config
(
"reference"
)
var
reference
:
String
=
_
override
val
defaultCoreMemory
=
3.0
override
val
defaultCoreMemory
=
3.0
...
@@ -55,6 +55,7 @@ class MpileupToVcf(val root: Configurable) extends ToolCommandFuntion {
...
@@ -55,6 +55,7 @@ class MpileupToVcf(val root: Configurable) extends ToolCommandFuntion {
override
def
beforeGraph
{
override
def
beforeGraph
{
super
.
beforeGraph
super
.
beforeGraph
reference
=
referenceFasta
().
getAbsolutePath
val
samtoolsMpileup
=
new
SamtoolsMpileup
(
this
)
val
samtoolsMpileup
=
new
SamtoolsMpileup
(
this
)
}
}
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/VcfStats.scala
View file @
836310ca
...
@@ -21,7 +21,7 @@ import htsjdk.samtools.reference.FastaSequenceFile
...
@@ -21,7 +21,7 @@ import htsjdk.samtools.reference.FastaSequenceFile
import
htsjdk.variant.variantcontext.
{
Allele
,
VariantContext
,
Genotype
}
import
htsjdk.variant.variantcontext.
{
Allele
,
VariantContext
,
Genotype
}
import
htsjdk.variant.vcf.VCFFileReader
import
htsjdk.variant.vcf.VCFFileReader
import
nl.lumc.sasc.biopet.core.summary.
{
SummaryQScript
,
Summarizable
}
import
nl.lumc.sasc.biopet.core.summary.
{
SummaryQScript
,
Summarizable
}
import
nl.lumc.sasc.biopet.core.
{
ToolCommandFuntion
,
BiopetJavaCommandLineFunction
,
ToolCommand
}
import
nl.lumc.sasc.biopet.core.
{
Reference
,
ToolCommandFuntion
,
BiopetJavaCommandLineFunction
,
ToolCommand
}
import
nl.lumc.sasc.biopet.core.config.Configurable
import
nl.lumc.sasc.biopet.core.config.Configurable
import
org.broadinstitute.gatk.utils.commandline.
{
Output
,
Input
}
import
org.broadinstitute.gatk.utils.commandline.
{
Output
,
Input
}
import
scala.collection.JavaConversions._
import
scala.collection.JavaConversions._
...
@@ -35,7 +35,7 @@ import scala.util.Random
...
@@ -35,7 +35,7 @@ import scala.util.Random
/**
/**
* Created by pjvan_thof on 1/10/15.
* Created by pjvan_thof on 1/10/15.
*/
*/
class
VcfStats
(
val
root
:
Configurable
)
extends
ToolCommandFuntion
with
Summarizable
{
class
VcfStats
(
val
root
:
Configurable
)
extends
ToolCommandFuntion
with
Summarizable
with
Reference
{
javaMainClass
=
getClass
.
getName
javaMainClass
=
getClass
.
getName
@Input
(
doc
=
"Input fastq"
,
shortName
=
"I"
,
required
=
true
)
@Input
(
doc
=
"Input fastq"
,
shortName
=
"I"
,
required
=
true
)
...
@@ -59,9 +59,10 @@ class VcfStats(val root: Configurable) extends ToolCommandFuntion with Summariza
...
@@ -59,9 +59,10 @@ class VcfStats(val root: Configurable) extends ToolCommandFuntion with Summariza
var
genotypeTags
:
List
[
String
]
=
Nil
var
genotypeTags
:
List
[
String
]
=
Nil
var
allInfoTags
=
false
var
allInfoTags
=
false
var
allGenotypeTags
=
false
var
allGenotypeTags
=
false
var
reference
:
File
=
config
(
"reference"
)
var
reference
:
File
=
_
override
def
beforeGraph
:
Unit
=
{
override
def
beforeGraph
:
Unit
=
{
reference
=
referenceFasta
()
index
=
new
File
(
input
.
getAbsolutePath
+
".tbi"
)
index
=
new
File
(
input
.
getAbsolutePath
+
".tbi"
)
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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