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
a9c9dfbd
Commit
a9c9dfbd
authored
Feb 03, 2015
by
bow
Browse files
Use requirements check on mapping and flexiprep pipeline
parent
ad0c55bc
Changes
2
Hide whitespace changes
Inline
Side-by-side
public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/Flexiprep.scala
View file @
a9c9dfbd
...
...
@@ -62,11 +62,12 @@ class Flexiprep(val root: Configurable) extends QScript with BiopetQScript {
val
summary
=
new
FlexiprepSummary
(
this
)
def
init
()
{
if
(
input_R1
==
null
)
throw
new
IllegalStateException
(
"Missing R1 on flexiprep module"
)
if
(
outputDir
==
null
)
throw
new
IllegalStateException
(
"Missing Output directory on flexiprep module"
)
if
(
sampleId
==
null
)
throw
new
IllegalStateException
(
"Missing Sample name on flexiprep module"
)
if
(
libId
==
null
)
throw
new
IllegalStateException
(
"Missing Library name on flexiprep module"
)
else
if
(!
outputDir
.
endsWith
(
"/"
))
outputDir
+=
"/"
require
(
outputDir
!=
null
,
"Missing output directory on flexiprep module"
)
require
(
input_R1
!=
null
,
"Missing output directory on flexiprep module"
)
require
(
sampleId
!=
null
,
"Missing sample ID on flexiprep module"
)
require
(
libId
!=
null
,
"Missing library ID on flexiprep module"
)
if
(!
outputDir
.
endsWith
(
"/"
))
outputDir
+=
"/"
paired
=
(
input_R2
!=
null
)
if
(
input_R1
.
endsWith
(
".gz"
))
R1_name
=
input_R1
.
getName
.
substring
(
0
,
input_R1
.
getName
.
lastIndexOf
(
".gz"
))
...
...
public/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/Mapping.scala
View file @
a9c9dfbd
...
...
@@ -95,13 +95,14 @@ class Mapping(val root: Configurable) extends QScript with BiopetQScript {
def
finalBamFile
:
File
=
outputDir
+
outputName
+
".final.bam"
def
init
()
{
if
(
outputDir
==
null
)
throw
new
IllegalStateException
(
"Missing Output directory on mapping module"
)
else
if
(!
outputDir
.
endsWith
(
"/"
))
outputDir
+=
"/"
if
(
input_R1
==
null
)
throw
new
IllegalStateException
(
"Missing FastQ R1 on mapping module"
)
require
(
outputDir
!=
null
,
"Missing output directory on mapping module"
)
require
(
input_R1
!=
null
,
"Missing output directory on mapping module"
)
require
(
sampleId
!=
null
,
"Missing sample ID on mapping module"
)
require
(
libId
!=
null
,
"Missing library ID on mapping module"
)
if
(!
outputDir
.
endsWith
(
"/"
))
outputDir
+=
"/"
paired
=
(
input_R2
!=
null
)
if
(
libId
==
null
)
libId
=
config
(
"library_id"
)
if
(
sampleId
==
null
)
sampleId
=
config
(
"sample_id"
)
if
(
readgroupId
==
null
&&
sampleId
!=
null
&&
libId
!=
null
)
readgroupId
=
sampleId
+
"-"
+
libId
else
if
(
readgroupId
==
null
)
readgroupId
=
config
(
"readgroup_id"
)
...
...
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