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
1a74faa7
Commit
1a74faa7
authored
Jul 25, 2017
by
pjvan_thof
Browse files
Adding extensions for stringtie
parent
c913b602
Changes
2
Hide whitespace changes
Inline
Side-by-side
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/stringtie/Stringtie.scala
0 → 100644
View file @
1a74faa7
package
nl.lumc.sasc.biopet.extensions.stringtie
import
java.io.File
import
nl.lumc.sasc.biopet.core.
{
BiopetCommandLineFunction
,
Reference
,
Version
}
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Output
}
import
scala.util.matching.Regex
class
Stringtie
(
val
parent
:
Configurable
)
extends
BiopetCommandLineFunction
with
Reference
with
Version
{
executable
=
config
(
"exe"
,
"stringtie"
)
@Input
(
required
=
true
)
var
inputBam
:
File
=
_
@Output
var
outputGtf
:
File
=
_
@Output
var
geneAbundances
:
Option
[
File
]
=
None
@Output
var
referenceCoverage
:
Option
[
File
]
=
None
var
rf
:
Boolean
=
config
(
"rf"
,
default
=
false
)
var
fr
:
Boolean
=
config
(
"fr"
,
default
=
false
)
var
v
:
Boolean
=
config
(
"v"
,
default
=
logger
.
isDebugEnabled
)
var
l
:
Option
[
String
]
=
None
var
f
:
Option
[
Double
]
=
config
(
"f"
)
var
m
:
Option
[
Int
]
=
config
(
"m"
)
var
a
:
Option
[
Int
]
=
config
(
"a"
)
var
j
:
Option
[
Float
]
=
config
(
"j"
)
var
t
:
Boolean
=
config
(
"t"
,
default
=
false
)
var
c
:
Option
[
Float
]
=
config
(
"c"
)
var
g
:
Option
[
Int
]
=
config
(
"g"
)
var
B
:
Boolean
=
config
(
"B"
,
default
=
false
)
var
b
:
Option
[
String
]
=
config
(
"b"
)
var
e
:
Boolean
=
config
(
"e"
,
default
=
false
)
var
M
:
Option
[
Float
]
=
config
(
"M"
)
var
x
:
List
[
String
]
=
config
(
"x"
,
default
=
Nil
)
/** Command to get version of executable */
def
versionCommand
:
String
=
executable
+
" --version"
/** Regex to get version from version command output */
def
versionRegex
:
Regex
=
".*"
.
r
def
cmdLine
:
String
=
required
(
executable
)
+
conditional
(
v
,
"-v"
)
+
required
(
"-p"
,
threads
)
+
conditional
(
rf
,
"--rf"
)
+
conditional
(
fr
,
"--fr"
)
+
optional
(
"-l"
,
l
)
+
optional
(
"-f"
,
f
)
+
optional
(
"-m"
,
m
)
+
optional
(
"-A"
,
geneAbundances
)
+
optional
(
"-C"
,
referenceCoverage
)
+
optional
(
"-a"
,
a
)
+
optional
(
"-j"
,
j
)
+
conditional
(
t
,
"-t"
)
+
optional
(
"-c"
,
c
)
+
optional
(
"-g"
,
g
)
+
conditional
(
B
,
"-B"
)
+
optional
(
"-b"
,
b
)
+
conditional
(
e
,
"-e"
)
+
optional
(
"-M"
,
M
)
+
(
if
(
x
.
nonEmpty
)
optional
(
"-x"
,
x
.
mkString
(
","
))
else
""
)
+
(
if
(
outputAsStdout
)
""
else
required
(
"-o"
,
outputGtf
))
}
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/stringtie/StringtieMerge.scala
0 → 100644
View file @
1a74faa7
package
nl.lumc.sasc.biopet.extensions.stringtie
import
java.io.File
import
nl.lumc.sasc.biopet.core.
{
BiopetCommandLineFunction
,
Reference
,
Version
}
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Output
}
import
scala.util.matching.Regex
class
StringtieMerge
(
val
parent
:
Configurable
)
extends
BiopetCommandLineFunction
with
Reference
with
Version
{
executable
=
config
(
"exe"
,
"stringtie"
)
@Input
(
required
=
true
)
var
inputBam
:
File
=
_
@Output
var
outputGtf
:
File
=
_
var
v
:
Boolean
=
config
(
"v"
,
default
=
logger
.
isDebugEnabled
)
var
l
:
Option
[
String
]
=
None
var
f
:
Option
[
Double
]
=
config
(
"f"
)
var
m
:
Option
[
Int
]
=
config
(
"m"
)
var
c
:
Option
[
Float
]
=
config
(
"c"
)
var
F
:
Option
[
Double
]
=
config
(
"F"
)
var
T
:
Option
[
Double
]
=
config
(
"T"
)
var
i
:
Boolean
=
config
(
"i"
,
default
=
false
)
/** Command to get version of executable */
def
versionCommand
:
String
=
executable
+
" --version"
/** Regex to get version from version command output */
def
versionRegex
:
Regex
=
".*"
.
r
def
cmdLine
:
String
=
required
(
executable
)
+
conditional
(
v
,
"-v"
)
+
required
(
"-p"
,
threads
)
+
optional
(
"-l"
,
l
)
+
optional
(
"-f"
,
f
)
+
optional
(
"-m"
,
m
)
+
optional
(
"-c"
,
c
)
+
optional
(
"-F"
,
F
)
+
conditional
(
i
,
"-i"
)
+
(
if
(
outputAsStdout
)
""
else
required
(
"-o"
,
outputGtf
))
}
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