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
1db23864
Commit
1db23864
authored
Feb 09, 2015
by
bow
Browse files
Fix bug caused by incorrect type usage
parent
266b9f1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Fastqc.scala
View file @
1db23864
...
...
@@ -50,19 +50,31 @@ class Fastqc(val root: Configurable) extends BiopetCommandLineFunction {
override
def
afterGraph
{
this
.
checkExecutable
val
fastqcDir
=
executable
.
substring
(
0
,
executable
.
lastIndexOf
(
"/"
))
contaminants
=
contaminants
match
{
// user-defined contaminants file take precedence
case
userDefinedValue
@
Some
(
_
)
=>
userDefinedValue
// otherwise, use default contaminants file (depending on FastQC version)
case
None
=>
val
fastqcDir
=
executable
.
substring
(
0
,
executable
.
lastIndexOf
(
"/"
))
val
defaultContams
=
getVersion
match
{
case
"v0.11.2"
=>
Option
(
new
File
(
fastqcDir
+
"/Configuration/contaminant_list.txt"
)
)
case
_
=>
Option
(
new
File
(
fastqcDir
+
"/Contaminants/contaminant_list.txt"
)
)
case
"v0.11.2"
=>
new
File
(
fastqcDir
+
"/Configuration/contaminant_list.txt"
)
case
_
=>
new
File
(
fastqcDir
+
"/Contaminants/contaminant_list.txt"
)
}
config
(
"contaminants"
,
default
=
defaultContams
)
}
adapters
=
adapters
match
{
// user-defined contaminants file take precedence
case
userDefinedValue
@
Some
(
_
)
=>
userDefinedValue
// otherwise, check if adapters are already present (depending on FastQC version)
case
None
=>
val
defaultAdapters
=
getVersion
match
{
case
"v0.11.2"
=>
Option
(
new
File
(
fastqcDir
+
"/Configuration/adapter_list.txt"
))
case
"v0.11.2"
=>
Some
(
new
File
(
fastqcDir
+
"/Configuration/adapter_list.txt"
))
case
_
=>
None
}
config
(
"contaminants"
,
default
=
defaultContams
)
case
wrapped
@
Some
(
_
)
=>
wrapped
defaultAdapters
.
collect
{
case
adp
=>
config
(
"adapters"
,
default
=
adp
)
}
}
}
...
...
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