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
2a22fa63
Commit
2a22fa63
authored
Oct 13, 2014
by
wyleung
Browse files
Adding tophat
parent
85495563
Changes
1
Hide whitespace changes
Inline
Side-by-side
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/aligners/TopHat.scala
0 → 100644
View file @
2a22fa63
package
nl.lumc.sasc.biopet.extensions.aligners
import
nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
import
nl.lumc.sasc.biopet.core.config.Configurable
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Output
,
Argument
}
import
java.io.File
class
TopHat
(
val
root
:
Configurable
)
extends
BiopetCommandLineFunction
{
@Input
(
doc
=
"FastQ file R1"
,
shortName
=
"R1"
)
var
R1
:
File
=
_
@Input
(
doc
=
"FastQ file R2"
,
shortName
=
"R2"
,
required
=
false
)
var
R2
:
File
=
_
@Input
(
doc
=
"Bowtie index"
,
shortName
=
"bti"
)
var
bowtie_index
:
File
=
config
(
"bowtie_index"
,
required
=
true
)
@Argument
(
doc
=
"Output Directory"
)
var
outputDir
:
String
=
_
@Output
(
doc
=
"Output file SAM"
,
shortName
=
"output"
)
var
output
:
File
=
_
// options set via API or config
// var numrecords: String = config("numrecords", default = "all")
// var solexa: Boolean = config("solexa", default = false)
// var solexaold: Boolean = config("solexaold", default = false)
// var sanger: Boolean = config("sanger", default = false)
//
// var insertsize: Option[Int] = config("insertsize", default = 250)
// var insertsd: Option[Int] = config("insertsd", default = 60)
// var insertsize2: Option[Int] = config("insertsize2", default = -2000)
// var insertsd2: Option[Int] = config("insertsd2", default = -1)
//
// var sensitive: Boolean = config("sensitive", default = false)
// var fast: Boolean = config("fast", default = false)
//
// var readgroup: String = config("readgroup")
// var verbosity: Option[Int] = config("verbosity", default = 2)
// var logfile: String = config("logfile")
executable
=
config
(
"exe"
,
default
=
"tophat"
,
freeVar
=
false
)
override
val
versionRegex
=
"""TopHat v(.*)"""
.
r
override
val
versionExitcode
=
List
(
0
,
1
)
override
val
defaultVmem
=
"4G"
override
val
defaultThreads
=
8
override
def
versionCommand
=
executable
+
" --version"
override
def
afterGraph
()
{
if
(!
outputDir
.
endsWith
(
"/"
))
outputDir
+=
"/"
output
=
new
File
(
outputDir
+
"accepted_hits.bam"
)
}
def
cmdLine
:
String
=
{
var
cmd
:
String
=
required
(
executable
)
+
optional
(
"-p"
,
nCoresRequest
)
+
"--no-convert-bam"
+
required
(
bowtie_index
)
+
required
(
R1
)
+
optional
(
R2
)
return
cmd
}
}
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