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
66773002
Commit
66773002
authored
May 02, 2017
by
Sander Bollen
Browse files
fix variable typo
parent
29b6ec30
Changes
37
Hide whitespace changes
Inline
Side-by-side
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetCommandLineFunction.scala
View file @
66773002
...
...
@@ -149,7 +149,7 @@ trait BiopetCommandLineFunction extends CommandLineResources { biopetFunction =>
private
[
core
]
var
_inputAsStdin
=
false
def
inputAsStdin
=
_inputAsStdin
private
[
core
]
var
_outputAsStdout
=
false
def
outputAsSt
s
out
=
_outputAsStdout
def
outputAsSt
d
out
=
_outputAsStdout
/**
* This operator sends stdout to `that` and combine this into 1 command line function
...
...
biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/BiopetPipeTest.scala
View file @
66773002
...
...
@@ -27,7 +27,7 @@ class BiopetPipeTest extends TestNGSuite with Matchers {
def
cmdLine
=
"pipe1"
+
(
if
(!
inputAsStdin
)
" input1 "
else
""
)
+
(
if
(!
outputAsSt
s
out
)
" output1 "
+
""
)
(
if
(!
outputAsSt
d
out
)
" output1 "
+
""
)
}
class
Pipe2
extends
BiopetCommandLineFunction
{
...
...
@@ -35,7 +35,7 @@ class BiopetPipeTest extends TestNGSuite with Matchers {
def
cmdLine
=
"pipe2"
+
(
if
(!
inputAsStdin
)
" input2 "
else
""
)
+
(
if
(!
outputAsSt
s
out
)
" output2 "
+
""
)
(
if
(!
outputAsSt
d
out
)
" output2 "
+
""
)
}
@Test
def
testPipeCommands
:
Unit
=
{
...
...
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Awk.scala
View file @
66773002
...
...
@@ -44,7 +44,7 @@ class Awk(val parent: Configurable) extends BiopetCommandLineFunction with Versi
executable
+
required
(
command
)
+
(
if
(
inputAsStdin
)
""
else
required
(
input
))
+
(
if
(
outputAsSt
s
out
)
""
else
" > "
+
required
(
output
))
(
if
(
outputAsSt
d
out
)
""
else
" > "
+
required
(
output
))
}
object
Awk
{
...
...
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Bgzip.scala
View file @
66773002
...
...
@@ -36,12 +36,12 @@ class Bgzip(val parent: Configurable) extends BiopetCommandLineFunction {
override
def
beforeGraph
()
:
Unit
=
{
super
.
beforeGraph
()
if
(
input
.
isEmpty
&&
!
inputAsStdin
)
Logging
.
addError
(
"Input is missing for Bgzip"
)
if
(
output
==
null
&&
!
outputAsSt
s
out
)
Logging
.
addError
(
"Output is missing for Bgzip"
)
if
(
output
==
null
&&
!
outputAsSt
d
out
)
Logging
.
addError
(
"Output is missing for Bgzip"
)
}
def
cmdLine
=
required
(
executable
)
+
conditional
(
f
,
"-f"
)
+
" -c "
+
repeat
(
input
)
+
(
if
(
outputAsSt
s
out
)
""
else
" > "
+
required
(
output
))
(
if
(
outputAsSt
d
out
)
""
else
" > "
+
required
(
output
))
}
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Cat.scala
View file @
66773002
...
...
@@ -38,7 +38,7 @@ class Cat(val parent: Configurable) extends BiopetCommandLineFunction {
def
cmdLine
=
required
(
executable
)
+
(
if
(
inputAsStdin
)
""
else
repeat
(
input
))
+
(
if
(
outputAsSt
s
out
)
""
else
(
if
(
appending
)
" >> "
else
" > "
)
+
required
(
output
))
(
if
(
outputAsSt
d
out
)
""
else
(
if
(
appending
)
" >> "
else
" > "
)
+
required
(
output
))
}
/**
...
...
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Curl.scala
View file @
66773002
...
...
@@ -34,5 +34,5 @@ class Curl(val parent: Configurable) extends BiopetCommandLineFunction with Vers
def
versionRegex
=
"""curl (\w+\.\w+\.\w+) .*"""
.
r
def
cmdLine
:
String
=
required
(
executable
)
+
required
(
url
)
+
(
if
(
outputAsSt
s
out
)
""
else
" > "
+
required
(
output
))
required
(
executable
)
+
required
(
url
)
+
(
if
(
outputAsSt
d
out
)
""
else
" > "
+
required
(
output
))
}
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Cutadapt.scala
View file @
66773002
...
...
@@ -165,7 +165,7 @@ class Cutadapt(val parent: Configurable)
optional
(
"--untrimmed-paired-output"
,
untrimmedPairedOutput
)
+
// input / output
required
(
fastqInput
)
+
(
if
(
outputAsSt
s
out
)
""
(
if
(
outputAsSt
d
out
)
""
else
required
(
"--output"
,
fastqOutput
)
+
" > "
+
required
(
statsOutput
))
...
...
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Freebayes.scala
View file @
66773002
...
...
@@ -206,5 +206,5 @@ class Freebayes(val parent: Configurable)
conditional
(
debug
,
"--debug"
)
+
optional
(
"--haplotype-length"
,
haplotypeLength
)
+
(
if
(
inputAsStdin
)
required
(
"--stdin"
)
else
""
)
+
(
if
(
outputAsSt
s
out
)
""
else
optional
(
"--vcf"
,
outputVcf
))
(
if
(
outputAsSt
d
out
)
""
else
optional
(
"--vcf"
,
outputVcf
))
}
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/GffRead.scala
View file @
66773002
...
...
@@ -38,6 +38,6 @@ class GffRead(val parent: Configurable) extends BiopetCommandLineFunction {
def
cmdLine
=
executable
+
(
if
(
inputAsStdin
)
""
else
required
(
input
))
+
(
if
(
outputAsSt
s
out
)
""
else
required
(
"-o"
,
output
))
+
(
if
(
outputAsSt
d
out
)
""
else
required
(
"-o"
,
output
))
+
conditional
(
T
,
"-T"
)
}
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Grep.scala
View file @
66773002
...
...
@@ -46,7 +46,7 @@ class Grep(val parent: Configurable) extends BiopetCommandLineFunction {
conditional
(
perlRegexp
,
"-P"
)
+
required
(
grepFor
)
+
(
if
(
inputAsStdin
)
""
else
required
(
input
))
+
(
if
(
outputAsSt
s
out
)
""
else
" > "
+
required
(
output
))
(
if
(
outputAsSt
d
out
)
""
else
" > "
+
required
(
output
))
}
object
Grep
{
...
...
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/GtfToGenePred.scala
View file @
66773002
...
...
@@ -51,5 +51,5 @@ class GtfToGenePred(val parent: Configurable) extends BiopetCommandLineFunction
conditional
(
simple
,
"-simple"
)
+
conditional
(
geneNameAsName2
,
"-geneNameAsName2"
)
+
repeat
(
inputGtfs
)
+
(
if
(
outputAsSt
s
out
)
required
(
"/dev/stdout"
)
else
required
(
outputGenePred
))
(
if
(
outputAsSt
d
out
)
required
(
"/dev/stdout"
)
else
required
(
outputGenePred
))
}
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Gzip.scala
View file @
66773002
...
...
@@ -35,7 +35,7 @@ class Gzip(val parent: Configurable) extends BiopetCommandLineFunction with Vers
def
cmdLine
=
required
(
executable
)
+
" -c "
+
(
if
(
inputAsStdin
)
""
else
repeat
(
input
))
+
(
if
(
outputAsSt
s
out
)
""
else
" > "
+
required
(
output
))
(
if
(
outputAsSt
d
out
)
""
else
" > "
+
required
(
output
))
}
object
Gzip
{
...
...
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Sed.scala
View file @
66773002
...
...
@@ -46,6 +46,6 @@ class Sed(val parent: Configurable) extends BiopetCommandLineFunction with Versi
executable
+
repeat
(
"-e"
,
expressions
)
+
(
if
(
inputAsStdin
)
""
else
required
(
inputFile
))
+
(
if
(
outputAsSt
s
out
)
""
else
" > "
+
required
(
outputFile
))
(
if
(
outputAsSt
d
out
)
""
else
" > "
+
required
(
outputFile
))
}
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Sickle.scala
View file @
66773002
...
...
@@ -78,13 +78,13 @@ class Sickle(val parent: Configurable)
cmd
+
(
if
(
inputAsStdin
)
required
(
"-f"
,
new
File
(
"/dev/stdin"
))
else
required
(
"-f"
,
inputR1
))
+
required
(
"-t"
,
qualityType
)
+
(
if
(
outputAsSt
s
out
)
required
(
"-o"
,
new
File
(
"/dev/stdout"
))
else
required
(
"-o"
,
outputR1
))
+
(
if
(
outputAsSt
d
out
)
required
(
"-o"
,
new
File
(
"/dev/stdout"
))
else
required
(
"-o"
,
outputR1
))
+
optional
(
"-q"
,
qualityThreshold
)
+
optional
(
"-l"
,
lengthThreshold
)
+
conditional
(
noFiveprime
,
"-x"
)
+
conditional
(
discardN
,
"-n"
)
+
conditional
(
quiet
||
outputAsSt
s
out
,
"--quiet"
)
+
(
if
(
outputAsSt
s
out
)
""
else
" > "
+
required
(
outputStats
))
conditional
(
quiet
||
outputAsSt
d
out
,
"--quiet"
)
+
(
if
(
outputAsSt
d
out
)
""
else
" > "
+
required
(
outputStats
))
}
override
def
summaryDeps
=
outputStats
::
super
.
summaryDeps
...
...
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Zcat.scala
View file @
66773002
...
...
@@ -39,7 +39,7 @@ class Zcat(val parent: Configurable) extends BiopetCommandLineFunction with Vers
def
cmdLine
=
required
(
executable
)
+
(
if
(
inputAsStdin
)
""
else
repeat
(
input
))
+
(
if
(
outputAsSt
s
out
)
""
else
(
if
(
appending
)
" >> "
else
" > "
)
+
required
(
output
))
(
if
(
outputAsSt
d
out
)
""
else
(
if
(
appending
)
" >> "
else
" > "
)
+
required
(
output
))
}
object
Zcat
{
...
...
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bcftools/BcftoolsCall.scala
View file @
66773002
...
...
@@ -82,6 +82,6 @@ class BcftoolsCall(val parent: Configurable) extends Bcftools {
optional
(
"-P"
,
P
)
+
conditional
(
X
,
"-X"
)
+
conditional
(
Y
,
"-Y"
)
+
(
if
(
outputAsSt
s
out
)
""
else
required
(
"-o"
,
output
))
+
(
if
(
outputAsSt
d
out
)
""
else
required
(
"-o"
,
output
))
+
(
if
(
inputAsStdin
)
"-"
else
required
(
input
))
}
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bcftools/BcftoolsMerge.scala
View file @
66773002
...
...
@@ -49,7 +49,7 @@ class BcftoolsMerge(val parent: Configurable) extends Bcftools {
def
cmdLine
=
required
(
executable
)
+
required
(
"merge"
)
+
(
if
(
outputAsSt
s
out
)
""
else
required
(
"-o"
,
output
))
+
(
if
(
outputAsSt
d
out
)
""
else
required
(
"-o"
,
output
))
+
conditional
(
forcesamples
,
"--force-samples"
)
+
conditional
(
printheader
,
"--print-header"
)
+
optional
(
"--use-header"
,
useheader
)
+
...
...
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsCoverage.scala
View file @
66773002
...
...
@@ -59,7 +59,7 @@ class BedtoolsCoverage(val parent: Configurable) extends Bedtools with Reference
conditional
(
sorted
,
"-sorted"
)
+
(
if
(
sorted
)
required
(
"-g"
,
BedtoolsCoverage
.
getGenomeFile
(
referenceFai
,
jobTempDir
))
else
""
)
+
(
if
(
outputAsSt
s
out
)
""
else
" > "
+
required
(
output
))
(
if
(
outputAsSt
d
out
)
""
else
" > "
+
required
(
output
))
}
...
...
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsSort.scala
View file @
66773002
...
...
@@ -37,6 +37,6 @@ class BedtoolsSort(val parent: Configurable) extends Bedtools with Reference {
def
cmdLine
=
required
(
executable
)
+
required
(
"sort"
)
+
required
(
"-i"
,
input
)
+
optional
(
"-faidx"
,
faidx
)
+
(
if
(
outputAsSt
s
out
)
""
else
" > "
+
required
(
output
))
(
if
(
outputAsSt
d
out
)
""
else
" > "
+
required
(
output
))
}
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/bowtie/Bowtie2.scala
View file @
66773002
...
...
@@ -256,5 +256,5 @@ class Bowtie2(val parent: Configurable)
optional
(
"-2"
,
r2
)
case
_
=>
required
(
"-U"
,
R1
)
})
+
(
if
(
outputAsSt
s
out
)
""
else
required
(
"-S"
,
output
))
(
if
(
outputAsSt
d
out
)
""
else
required
(
"-S"
,
output
))
}
Prev
1
2
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