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
e945e4db
Commit
e945e4db
authored
Nov 27, 2015
by
Wai Yi Leung
Browse files
Check for bowtie2-Index files in bowtie2
parent
ac61c9dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Bowtie2.scala
View file @
e945e4db
...
...
@@ -3,6 +3,7 @@ package nl.lumc.sasc.biopet.extensions
import
java.io.File
import
nl.lumc.sasc.biopet.core.
{
BiopetCommandLineFunction
,
Reference
,
Version
}
import
nl.lumc.sasc.biopet.utils.Logging
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Output
}
...
...
@@ -129,6 +130,15 @@ class Bowtie2(val root: Configurable) extends BiopetCommandLineFunction with Ref
var
seed
:
Option
[
Int
]
=
config
(
"seed"
)
var
non_deterministic
:
Boolean
=
config
(
"non_deterministic"
,
default
=
false
)
override
def
beforeGraph
()
{
super
.
beforeGraph
()
val
indexDir
=
new
File
(
bowtieIndex
).
getParentFile
val
basename
=
bowtieIndex
.
stripPrefix
(
indexDir
.
getPath
+
File
.
separator
)
if
(
indexDir
.
exists
())
{
if
(!
indexDir
.
list
().
toList
.
filter
(
_
.
startsWith
(
basename
)).
exists
(
_
.
endsWith
(
".bt2"
)))
Logging
.
addError
(
s
"No index files found for bowtie2 in: $indexDir with basename: $basename"
)
}
}
/** return commandline to execute */
def
cmdLine
=
required
(
executable
)
+
conditional
(
q
,
"-q"
)
+
...
...
@@ -203,7 +213,7 @@ class Bowtie2(val root: Configurable) extends BiopetCommandLineFunction with Ref
conditional
(
no_sq
,
"--no-sq"
)
+
optional
(
"--rg-id"
,
rg_id
)
+
repeat
(
"--rg"
,
rg
)
conditional
(
omit_sec_seq
,
"--omit-sec-seq"
)
+
conditional
(
omit_sec_seq
,
"--omit-sec-seq"
)
+
/* Performance */
optional
(
"--threads"
,
threads
)
+
conditional
(
reorder
,
"--reorder"
)
+
...
...
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