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
dcff73d6
Commit
dcff73d6
authored
Feb 09, 2017
by
Peter van 't Hof
Browse files
Rename root to parent
parent
463f8002
Changes
290
Hide whitespace changes
Inline
Side-by-side
bam2wig/src/main/scala/nl/lumc/sasc/biopet/pipelines/bamtobigwig/Bam2Wig.scala
View file @
dcff73d6
...
...
@@ -27,7 +27,7 @@ import org.broadinstitute.gatk.queue.QScript
*
* Created by pjvan_thof on 1/29/15.
*/
class
Bam2Wig
(
val
roo
t
:
Configurable
)
extends
QScript
with
BiopetQScript
{
class
Bam2Wig
(
val
paren
t
:
Configurable
)
extends
QScript
with
BiopetQScript
{
def
this
()
=
this
(
null
)
@Input
(
doc
=
"Input bam file"
,
required
=
true
)
...
...
bam2wig/src/main/scala/nl/lumc/sasc/biopet/pipelines/bamtobigwig/BamToChromSizes.scala
View file @
dcff73d6
...
...
@@ -28,7 +28,7 @@ import scala.collection.JavaConversions._
*
* Created by pjvan_thof on 1/29/15.
*/
class
BamToChromSizes
(
val
roo
t
:
Configurable
)
extends
InProcessFunction
with
Configurable
{
class
BamToChromSizes
(
val
paren
t
:
Configurable
)
extends
InProcessFunction
with
Configurable
{
@Input
var
bamFile
:
File
=
_
...
...
bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BamMetrics.scala
View file @
dcff73d6
...
...
@@ -28,7 +28,7 @@ import nl.lumc.sasc.biopet.utils.config.Configurable
import
nl.lumc.sasc.biopet.utils.intervals.BedCheck
import
org.broadinstitute.gatk.queue.QScript
class
BamMetrics
(
val
roo
t
:
Configurable
)
extends
QScript
class
BamMetrics
(
val
paren
t
:
Configurable
)
extends
QScript
with
SummaryQScript
with
SampleLibraryTag
with
Reference
...
...
bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BammetricsReport.scala
View file @
dcff73d6
...
...
@@ -21,7 +21,7 @@ import nl.lumc.sasc.biopet.core.report.{ ReportBuilderExtension, ReportBuilder,
import
nl.lumc.sasc.biopet.utils.summary.
{
Summary
,
SummaryValue
}
import
nl.lumc.sasc.biopet.utils.rscript.
{
StackedBarPlot
,
LinePlot
}
class
BammetricsReport
(
val
roo
t
:
Configurable
)
extends
ReportBuilderExtension
{
class
BammetricsReport
(
val
paren
t
:
Configurable
)
extends
ReportBuilderExtension
{
def
builder
=
BammetricsReport
}
...
...
bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/scripts/CoverageStats.scala
View file @
dcff73d6
...
...
@@ -22,7 +22,7 @@ import nl.lumc.sasc.biopet.core.summary.Summarizable
import
nl.lumc.sasc.biopet.utils.ConfigUtils
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Output
}
class
CoverageStats
(
val
roo
t
:
Configurable
)
extends
PythonCommandLineFunction
with
Summarizable
{
class
CoverageStats
(
val
paren
t
:
Configurable
)
extends
PythonCommandLineFunction
with
Summarizable
{
setPythonScript
(
"bedtools_cov_stats.py"
)
@Input
(
doc
=
"Input file"
,
required
=
false
)
...
...
basty/src/main/scala/nl/lumc/sasc/biopet/pipelines/basty/Basty.scala
View file @
dcff73d6
...
...
@@ -28,7 +28,7 @@ import nl.lumc.sasc.biopet.extensions.tools.BastyGenerateFasta
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
org.broadinstitute.gatk.queue.QScript
class
Basty
(
val
roo
t
:
Configurable
)
extends
QScript
with
MultiSampleQScript
{
class
Basty
(
val
paren
t
:
Configurable
)
extends
QScript
with
MultiSampleQScript
{
qscript
=>
def
this
()
=
this
(
null
)
...
...
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetFifoPipe.scala
View file @
dcff73d6
...
...
@@ -22,7 +22,7 @@ import org.broadinstitute.gatk.utils.commandline.Output
/**
* Created by pjvan_thof on 9/29/15.
*/
class
BiopetFifoPipe
(
val
roo
t
:
Configurable
,
class
BiopetFifoPipe
(
val
paren
t
:
Configurable
,
protected
var
commands
:
List
[
BiopetCommandLineFunction
])
extends
BiopetCommandLineFunction
{
def
fifos
:
List
[
File
]
=
{
...
...
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetPipe.scala
View file @
dcff73d6
...
...
@@ -72,7 +72,7 @@ class BiopetPipe(val commands: List[BiopetCommandLineFunction]) extends BiopetCo
override
def
defaultCoreMemory
=
0.0
override
def
defaultThreads
=
0
val
roo
t
:
Configurable
=
commands
.
head
.
roo
t
val
paren
t
:
Configurable
=
commands
.
head
.
paren
t
override
def
configNamespace
=
commands
.
map
(
_
.
configNamespace
).
mkString
(
"-"
)
def
cmdLine
:
String
=
{
"("
+
commands
.
head
.
cmdLine
+
(
if
(
commands
.
head
.
stdinFile
.
isDefined
)
{
...
...
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/Reference.scala
View file @
dcff73d6
...
...
@@ -33,7 +33,7 @@ trait Reference extends Configurable {
/** Returns species, default to unknown_species */
def
referenceSpecies
:
String
=
{
roo
t
match
{
paren
t
match
{
case
r
:
Reference
if
r.referenceSpecies
!=
"
unknown_species
"
=>
r
.
referenceSpecies
case
_
=>
config
(
"species"
,
default
=
"unknown_species"
,
path
=
super
.
configPath
)
}
...
...
@@ -41,7 +41,7 @@ trait Reference extends Configurable {
/** Return referencename, default to unknown_ref */
def
referenceName
:
String
=
{
roo
t
match
{
paren
t
match
{
case
r
:
Reference
if
r.referenceName
!=
"
unknown_ref
"
=>
r
.
referenceName
case
_
=>
val
default
:
String
=
config
(
"default"
,
default
=
"unknown_ref"
,
path
=
List
(
"references"
,
referenceSpecies
))
...
...
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/SampleLibraryTag.scala
View file @
dcff73d6
...
...
@@ -27,13 +27,13 @@ trait SampleLibraryTag extends Configurable {
//FIXME: not possible to have required sample / lib
@Argument
(
doc
=
"Sample ID"
,
shortName
=
"sample"
,
required
=
false
)
var
sampleId
:
Option
[
String
]
=
roo
t
match
{
var
sampleId
:
Option
[
String
]
=
paren
t
match
{
case
tag
:
SampleLibraryTag
=>
tag
.
sampleId
case
_
=>
None
}
@Argument
(
doc
=
"Library ID"
,
shortName
=
"library"
,
required
=
false
)
var
libId
:
Option
[
String
]
=
roo
t
match
{
var
libId
:
Option
[
String
]
=
paren
t
match
{
case
tag
:
SampleLibraryTag
=>
tag
.
libId
case
_
=>
None
}
...
...
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/WriteDependencies.scala
View file @
dcff73d6
...
...
@@ -30,7 +30,7 @@ import scala.collection.mutable.ListBuffer
* @author Peter van 't Hof <p.j.van_t_hof@lumc.nl>
*/
object
WriteDependencies
extends
Logging
with
Configurable
{
val
roo
t
:
Configurable
=
null
val
paren
t
:
Configurable
=
null
private
def
createFunctionNames
(
functions
:
Seq
[
QFunction
])
:
Map
[
QFunction
,
String
]
=
{
val
cache
:
mutable.Map
[
String
,
Int
]
=
mutable
.
Map
()
(
for
(
function
<-
functions
)
yield
{
...
...
@@ -113,7 +113,7 @@ object WriteDependencies extends Logging with Configurable {
case
_
=>
None
}),
"main_job"
->
(
f
match
{
case
cmd
:
BiopetCommandLineFunction
=>
cmd
.
mainFunction
case
s
:
WriteSummary
if
s.qscript.
roo
t
=
=
null
=>
true
case
s
:
WriteSummary
if
s.qscript.
paren
t
=
=
null
=>
true
case
_
=>
false
}),
"intermediate"
->
f
.
isIntermediate
,
"depends_on_intermediate"
->
BiopetQScript
.
safeInputs
(
f
).
getOrElse
(
Seq
()).
exists
(
files
(
_
).
isIntermediate
),
...
...
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/extensions/Md5sum.scala
View file @
dcff73d6
...
...
@@ -21,7 +21,7 @@ import nl.lumc.sasc.biopet.utils.config.Configurable
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Output
}
/** Extension for md5sum */
class
Md5sum
(
val
roo
t
:
Configurable
)
extends
BiopetCommandLineFunction
with
Version
{
class
Md5sum
(
val
paren
t
:
Configurable
)
extends
BiopetCommandLineFunction
with
Version
{
mainFunction
=
false
@Input
(
doc
=
"Input"
)
...
...
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/summary/WriteSummary.scala
View file @
dcff73d6
...
...
@@ -31,13 +31,13 @@ import scala.io.Source
*
* Created by pjvan_thof on 2/14/15.
*/
class
WriteSummary
(
val
roo
t
:
Configurable
)
extends
InProcessFunction
with
Configurable
{
class
WriteSummary
(
val
paren
t
:
Configurable
)
extends
InProcessFunction
with
Configurable
{
this
.
analysisName
=
getClass
.
getSimpleName
require
(
roo
t
.
isInstanceOf
[
SummaryQScript
],
"root is not a SummaryQScript"
)
require
(
paren
t
.
isInstanceOf
[
SummaryQScript
],
"root is not a SummaryQScript"
)
/** To access qscript for this summary */
val
qscript
=
roo
t
.
asInstanceOf
[
SummaryQScript
]
val
qscript
=
paren
t
.
asInstanceOf
[
SummaryQScript
]
@Input
(
doc
=
"deps"
,
required
=
false
)
var
deps
:
List
[
File
]
=
Nil
...
...
biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/BiopetPipeTest.scala
View file @
dcff73d6
...
...
@@ -23,14 +23,14 @@ import org.testng.annotations.Test
*/
class
BiopetPipeTest
extends
TestNGSuite
with
Matchers
{
class
Pipe1
extends
BiopetCommandLineFunction
{
val
roo
t
=
null
val
paren
t
=
null
def
cmdLine
=
"pipe1"
+
(
if
(!
inputAsStdin
)
" input1 "
else
""
)
+
(
if
(!
outputAsStsout
)
" output1 "
+
""
)
}
class
Pipe2
extends
BiopetCommandLineFunction
{
val
roo
t
=
null
val
paren
t
=
null
def
cmdLine
=
"pipe2"
+
(
if
(!
inputAsStdin
)
" input2 "
else
""
)
+
(
if
(!
outputAsStsout
)
" output2 "
+
""
)
...
...
biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/CommandLineResourcesTest.scala
View file @
dcff73d6
...
...
@@ -28,7 +28,7 @@ class CommandLineResourcesTest extends TestNGSuite with Matchers {
class
CommandLineFunctionMock
(
c
:
Map
[
String
,
Any
]
=
Map
())
extends
CommandLineFunction
with
Configurable
{
override
def
freezeFieldValues
()
{}
def
commandLine
=
"command"
val
roo
t
=
null
val
paren
t
=
null
override
def
globalConfig
=
new
Config
(
c
)
}
...
...
biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/MultiSampleQScriptTest.scala
View file @
dcff73d6
...
...
@@ -214,7 +214,7 @@ object MultiSampleQScriptTest {
override
def
globalConfig
=
new
Config
(
configs
.
foldLeft
(
Map
[
String
,
Any
]())
{
case
(
a
,
b
)
=>
ConfigUtils
.
mergeMaps
(
a
,
b
)
})
val
roo
t
=
null
val
paren
t
=
null
def
getLastLogMessage
:
String
=
{
Logging
.
errors
.
toList
.
last
.
getMessage
...
...
biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/ReferenceTest.scala
View file @
dcff73d6
...
...
@@ -105,7 +105,7 @@ object ReferenceTest {
r
:
Configurable
=
null
,
fai
:
Boolean
=
false
,
dict
:
Boolean
=
false
)
=
new
Reference
{
val
roo
t
=
r
val
paren
t
=
r
override
def
globalConfig
=
new
Config
(
configs
.
foldLeft
(
Map
[
String
,
Any
]())
{
case
(
a
,
b
)
=>
ConfigUtils
.
mergeMaps
(
a
,
b
)
})
override
def
dictRequired
=
if
(
dict
)
true
else
super
.
dictRequired
...
...
biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/SampleLibraryTagTest.scala
View file @
dcff73d6
...
...
@@ -26,7 +26,7 @@ class SampleLibraryTagTest extends TestNGSuite with Matchers {
@Test
def
testDefault
:
Unit
=
{
val
o
=
new
SampleLibraryTag
{
override
def
roo
t
:
Configurable
=
null
override
def
paren
t
:
Configurable
=
null
override
def
globalConfig
=
new
Config
(
Map
())
}
o
.
sampleId
shouldBe
None
...
...
@@ -36,7 +36,7 @@ class SampleLibraryTagTest extends TestNGSuite with Matchers {
@Test
def
testInherit
:
Unit
=
{
val
o1
=
new
SampleLibraryTag
{
override
def
roo
t
:
Configurable
=
null
override
def
paren
t
:
Configurable
=
null
override
def
globalConfig
=
new
Config
(
Map
())
}
o1
.
sampleId
=
Some
(
"sampleName"
)
...
...
@@ -45,7 +45,7 @@ class SampleLibraryTagTest extends TestNGSuite with Matchers {
o1
.
libId
shouldBe
Some
(
"libName"
)
val
o2
=
new
SampleLibraryTag
{
override
def
roo
t
:
Configurable
=
o1
override
def
paren
t
:
Configurable
=
o1
override
def
globalConfig
=
new
Config
(
Map
())
}
o2
.
sampleId
shouldBe
o1
.
sampleId
...
...
biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/ToolCommandTest.scala
View file @
dcff73d6
...
...
@@ -26,7 +26,7 @@ class ToolCommandTest extends TestNGSuite with Matchers {
@Test
def
testToolCommand
:
Unit
=
{
val
tool
=
new
ToolCommandFunction
{
def
roo
t
=
null
def
paren
t
=
null
def
toolObject
=
ToolCommandTest
}
...
...
biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/annotation/AnnotationTest.scala
View file @
dcff73d6
...
...
@@ -78,7 +78,7 @@ class AnnotationTest extends TestNGSuite with Matchers {
object
AnnotationTest
{
class
Script
(
c
:
Map
[
String
,
Any
])
extends
QScript
with
BiopetQScript
{
override
def
globalConfig
:
Config
=
new
Config
(
c
)
val
roo
t
=
null
val
paren
t
=
null
/** Init for pipeline */
def
init
()
:
Unit
=
???
...
...
Prev
1
2
3
4
5
…
15
Next
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