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
28d55721
Commit
28d55721
authored
Feb 04, 2015
by
bow
Browse files
Refactor FastQC outputDir and dataFile to separate methods
parent
46c811a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/Fastqc.scala
View file @
28d55721
...
...
@@ -34,6 +34,14 @@ import nl.lumc.sasc.biopet.utils.ConfigUtils
*/
class
Fastqc
(
root
:
Configurable
)
extends
nl
.
lumc
.
sasc
.
biopet
.
extensions
.
Fastqc
(
root
)
{
/** Default FastQC output directory containing actual results */
// this is a def instead of a val since the value depends on the variable `output`, which is null on class creation
def
outputDir
:
File
=
new
File
(
output
.
getAbsolutePath
.
stripSuffix
(
".zip"
))
/** Default FastQC output data file */
// this is a def instead of a val since the value depends on the variable `output`, which is null on class creation
def
dataFile
:
File
=
new
File
(
outputDir
,
"fastqc_data.txt"
)
/**
* FastQC QC modules.
*
...
...
@@ -43,10 +51,7 @@ class Fastqc(root: Configurable) extends nl.lumc.sasc.biopet.extensions.Fastqc(r
*/
@throws
(
classOf
[
FileNotFoundException
])
@throws
(
classOf
[
IllegalStateException
])
protected
def
qcModules
:
Map
[
String
,
Array
[
String
]]
=
{
val
outputDir
=
output
.
getAbsolutePath
.
stripSuffix
(
".zip"
)
val
dataFile
=
new
File
(
outputDir
,
"fastqc_data.txt"
)
def
qcModules
:
Map
[
String
,
Array
[
String
]]
=
{
val
fqModules
=
Source
.
fromFile
(
dataFile
)
// drop all the characters before the first module delimiter (i.e. '>>')
...
...
@@ -128,7 +133,6 @@ class Fastqc(root: Configurable) extends nl.lumc.sasc.biopet.extensions.Fastqc(r
/** Summary of the FastQC run, stored in a [[Json]] object */
def
summary
:
Json
=
{
val
outputDir
:
String
=
output
.
getAbsolutePath
.
stripSuffix
(
".zip"
)
val
outputMap
=
Map
(
"plot_duplication_levels"
->
"Images/duplication_levels.png"
,
"plot_kmer_profiles"
->
"Images/kmer_profiles.png"
,
...
...
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