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
112a7299
Commit
112a7299
authored
Apr 20, 2017
by
pjvan_thof
Browse files
Fixing temp files
parent
42e2ffe3
Changes
3
Hide whitespace changes
Inline
Side-by-side
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/CommandLineResources.scala
View file @
112a7299
...
...
@@ -22,6 +22,8 @@ import org.broadinstitute.gatk.queue.function.CommandLineFunction
*/
trait
CommandLineResources
extends
CommandLineFunction
with
Configurable
{
lazy
val
maxThreads
:
Option
[
Int
]
=
config
(
"max_threads"
)
def
defaultThreads
=
1
final
def
threads
=
nCoresRequest
match
{
case
Some
(
i
)
=>
i
...
...
@@ -72,7 +74,6 @@ trait CommandLineResources extends CommandLineFunction with Configurable {
* @return number of threads
*/
private
def
getThreads
(
default
:
Int
)
:
Int
=
{
val
maxThreads
:
Option
[
Int
]
=
config
(
"maxthreads"
)
val
threads
:
Int
=
config
(
"threads"
,
default
=
default
)
maxThreads
match
{
case
Some
(
max
)
=>
if
(
max
>
threads
)
threads
else
max
...
...
@@ -120,6 +121,7 @@ trait CommandLineResources extends CommandLineFunction with Configurable {
protected
def
combineResources
(
commands
:
List
[
CommandLineResources
])
:
Unit
=
{
commands
.
foreach
(
_
.
setResources
())
nCoresRequest
=
Some
(
commands
.
map
(
_
.
threads
).
sum
+
threadsCorrection
)
nCoresRequest
.
map
(
x
=>
if
(
x
>
maxThreads
.
getOrElse
(
x
))
maxThreads
.
getOrElse
(
x
)
else
x
)
_coreMemory
=
commands
.
map
(
cmd
=>
cmd
.
coreMemory
*
(
cmd
.
threads
.
toDouble
/
threads
.
toDouble
)).
sum
memoryLimit
=
Some
(
_coreMemory
*
threads
)
...
...
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/summary/SummaryQScript.scala
View file @
112a7299
...
...
@@ -135,6 +135,7 @@ trait SummaryQScript extends BiopetQScript { qscript: QScript =>
}
md5sum
.
input
=
file
md5sum
.
output
=
new
File
(
file
.
getParentFile
,
file
.
getName
+
".md5"
)
md5sum
.
jobOutputFile
=
new
File
(
file
.
getParentFile
,
s
".${file.getName}.md5.md5sum.out"
)
// Need to not write a md5 file outside the outputDir
if
(!
file
.
getAbsolutePath
.
startsWith
(
outputDir
.
getAbsolutePath
))
...
...
flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/Flexiprep.scala
View file @
112a7299
...
...
@@ -41,6 +41,8 @@ class Flexiprep(val parent: Configurable) extends QScript with SummaryQScript wi
/** Make a final fastq files, by default only when flexiprep is the main pipeline */
var
keepQcFastqFiles
:
Boolean
=
config
(
"keepQcFastqFiles"
,
default
=
parent
==
null
)
override
def
defaults
=
super
.
defaults
++
Map
(
"max_threads"
->
4
)
/** Returns files to store in summary */
def
summaryFiles
:
Map
[
String
,
File
]
=
{
Map
(
"input_R1"
->
inputR1
,
"output_R1"
->
fastqR1Qc
)
++
...
...
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