Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
biopet.biopet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Mirrors
biopet.biopet
Commits
3c489130
Commit
3c489130
authored
Jan 19, 2017
by
Sander Bollen
Committed by
GitHub
Jan 19, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7 from biopet/fix-BIOPET-500
Fix BIOPET-500
parents
31be1177
7f01b3a5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
63 additions
and
7 deletions
+63
-7
.gitmodules
.gitmodules
+3
-0
Jenkinsfile
Jenkinsfile
+39
-0
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetCommandLineFunction.scala
.../nl/lumc/sasc/biopet/core/BiopetCommandLineFunction.scala
+8
-2
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/CommandLineResources.scala
...scala/nl/lumc/sasc/biopet/core/CommandLineResources.scala
+11
-5
gatk
gatk
+1
-0
pom.xml
pom.xml
+1
-0
No files found.
.gitmodules
0 → 100644
View file @
3c489130
[submodule "gatk"]
path = gatk
url = https://github.com/biopet/gatk.git
Jenkinsfile
0 → 100644
View file @
3c489130
node
(
'local'
)
{
try
{
stage
(
'Init'
)
{
tool
'JDK 8u102'
tool
'Apache Maven 3.3.9'
}
stage
(
'Checkout'
)
{
checkout
scm
sh
'git submodule update --init --recursive'
}
stage
(
'Build and Test'
)
{
withMaven
(
maven:
'Apache Maven 3.3.9'
,
jdk:
'JDK 8u102'
)
{
sh
'mvn -B -T 2 -Dmaven.test.failure.ignore clean package'
}
}
stage
(
'Report tests'
)
{
junit
'*/target/surefire-reports/*.xml'
}
if
(
currentBuild
.
result
==
null
||
"SUCCESS"
.
equals
(
currentBuild
.
result
))
{
currentBuild
.
result
=
"SUCCESS"
slackSend
(
color:
'#00FF00'
,
message:
"${currentBuild.result}: Job '${env.JOB_NAME} #${env.BUILD_NUMBER}' (<${env.BUILD_URL}|Open>)"
,
channel:
'#biopet-bot'
,
teamDomain:
'lumc'
,
tokenCredentialId:
'lumc'
)
}
else
{
slackSend
(
color:
'#FFFF00'
,
message:
"${currentBuild.result}: Job '${env.JOB_NAME} #${env.BUILD_NUMBER}' (<${env.BUILD_URL}|Open>)"
,
channel:
'#biopet-bot'
,
teamDomain:
'lumc'
,
tokenCredentialId:
'lumc'
)
}
}
catch
(
e
)
{
if
(
currentBuild
.
result
==
null
||
"FAILED"
.
equals
(
currentBuild
.
result
))
{
currentBuild
.
result
=
"FAILED"
}
slackSend
(
color:
'#FF0000'
,
message:
"${currentBuild.result}: Job '${env.JOB_NAME} #${env.BUILD_NUMBER}' (<${env.BUILD_URL}|Open>)"
,
channel:
'#biopet-bot'
,
teamDomain:
'lumc'
,
tokenCredentialId:
'lumc'
)
throw
e
}
}
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetCommandLineFunction.scala
View file @
3c489130
...
...
@@ -47,6 +47,11 @@ trait BiopetCommandLineFunction extends CommandLineResources { biopetFunction =>
private
def
changeScript
(
file
:
File
)
:
Unit
=
{
val
lines
=
Source
.
fromFile
(
file
).
getLines
().
toList
val
writer
=
new
PrintWriter
(
file
)
remoteCommand
match
{
case
"bash"
=>
writer
.
println
(
"#!/bin/bash"
)
case
"sh"
=>
writer
.
println
(
"#!/bin/sh"
)
case
_
=>
writer
.
println
(
s
"#!$remoteCommand"
)
}
writer
.
println
(
"set -eubf"
)
writer
.
println
(
"set -o pipefail"
)
lines
.
foreach
(
writer
.
println
)
...
...
@@ -66,8 +71,9 @@ trait BiopetCommandLineFunction extends CommandLineResources { biopetFunction =>
changeScript
(
new
File
(
jt
.
getArgs
.
head
.
toString
))
jt
.
setRemoteCommand
(
remoteCommand
)
case
ps
:
ProcessSettings
=>
changeScript
(
new
File
(
ps
.
getCommand
.
tail
.
head
))
ps
.
setCommand
(
Array
(
remoteCommand
)
++
ps
.
getCommand
.
tail
)
changeScript
(
new
File
(
ps
.
getCommand
.
last
))
if
(
ps
.
getCommand
.
head
!=
"srun"
)
ps
.
setCommand
(
Array
(
remoteCommand
)
++
ps
.
getCommand
.
tail
)
}
/**
...
...
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/CommandLineResources.scala
View file @
3c489130
...
...
@@ -48,14 +48,19 @@ trait CommandLineResources extends CommandLineFunction with Configurable {
def
coreMemory
=
_coreMemory
/** This value is for SGE and is defined in seconds */
protected
val
maxWalltimeLimit
:
Option
[
Int
]
=
config
(
"max_walltime_limit"
)
wallTime
=
config
(
"max_walltime"
)
/** This value is specific for slurm */
qualityOfSerice
=
config
(
"quality_of_serice"
)
var
retry
=
0
override
def
freezeFieldValues
()
:
Unit
=
{
setResources
()
if
(
useSge
&&
vmem
.
isDefined
)
jobResourceRequests
:+=
s
"h_vmem=${vmem.get}"
if
(
useSge
&&
maxWalltimeLimit
.
isDefined
)
jobResourceRequests
:+=
s
"h_rt=${maxWalltimeLimit.get}"
if
(
useSge
)
{
vmem
.
foreach
(
v
=>
jobResourceRequests
:+=
s
"h_vmem=$v"
)
wallTime
.
foreach
(
t
=>
jobResourceRequests
:+=
s
"h_rt=$t"
)
}
super
.
freezeFieldValues
()
}
...
...
@@ -106,6 +111,7 @@ trait CommandLineResources extends CommandLineFunction with Configurable {
if
(
vmem
.
isDefined
)
jobResourceRequests
=
jobResourceRequests
.
filterNot
(
_
.
contains
(
"h_vmem="
))
if
(
retry
>
0
)
logger
.
info
(
"Auto raise memory on retry"
)
retry
+=
1
waitBeforeJob
=
waitBeforeJob
.
map
(
_
+
(
retry
*
10
))
this
.
freezeFieldValues
()
}
...
...
@@ -117,8 +123,8 @@ trait CommandLineResources extends CommandLineFunction with Configurable {
_coreMemory
=
commands
.
map
(
cmd
=>
cmd
.
coreMemory
*
(
cmd
.
threads
.
toDouble
/
threads
.
toDouble
)).
sum
memoryLimit
=
Some
(
_coreMemory
*
threads
)
residentLimit
=
Some
((
_coreMemory
+
(
0.5
*
retry
))
*
residentFactor
)
vmem
=
Some
((
_coreMemory
*
(
vmemFactor
+
(
0.5
*
retry
)))
+
"G"
)
residentLimit
=
Some
((
_coreMemory
+
(
0.5
*
retry
))
*
residentFactor
*
(
if
(
multiplyRssThreads
)
threads
else
1
)
)
vmem
=
Some
((
_coreMemory
*
(
vmemFactor
+
(
0.5
*
retry
))
*
(
if
(
multiplyVmemThreads
)
threads
else
1
)
)
+
"G"
)
}
}
gatk
@
7805065f
Subproject commit 7805065f00df24c58948ea9961a4e9393ae64c70
pom.xml
View file @
3c489130
...
...
@@ -24,6 +24,7 @@
<version>
0.8.0-SNAPSHOT
</version>
<modules>
<module>
gatk
</module>
<module>
biopet-package
</module>
<module>
bam2wig
</module>
<module>
bammetrics
</module>
...
...
Write
Preview
Markdown
is supported
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