Skip to content
This repository was archived by the owner on Jan 27, 2020. It is now read-only.

Commit 347bebb

Browse files
authored
Merge pull request #696 from KochTobi/AWSQueueParam
AWS Batch queue parameter
2 parents be59f74 + f803720 commit 347bebb

11 files changed

Lines changed: 58 additions & 7 deletions

annotate.nf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ if (params.help) exit 0, helpMessage()
4242
if (!SarekUtils.isAllowedParams(params)) exit 1, "params unknown, see --help for more information"
4343
if (!checkUppmaxProject()) exit 1, "No UPPMAX project ID found! Use --project <UPPMAX Project ID>"
4444

45+
// Check for awsbatch profile configuration
46+
// make sure queue is defined
47+
if (workflow.profile == 'awsbatch') {
48+
if(!params.awsqueue) exit 1, "Provide the job queue for aws batch!"
49+
}
50+
51+
4552
tools = params.tools ? params.tools.split(',').collect{it.trim().toLowerCase()} : []
4653
annotateTools = params.annotateTools ? params.annotateTools.split(',').collect{it.trim().toLowerCase()} : []
4754
annotateVCF = params.annotateVCF ? params.annotateVCF.split(',').collect{it.trim()} : []

buildContainers.nf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ if (params.help) exit 0, helpMessage()
3838
if (!SarekUtils.isAllowedParams(params)) exit 1, "params unknown, see --help for more information"
3939
if (!checkUppmaxProject()) exit 1, "No UPPMAX project ID found! Use --project <UPPMAX Project ID>"
4040

41+
// Check for awsbatch profile configuration
42+
// make sure queue is defined
43+
if (workflow.profile == 'awsbatch') {
44+
if(!params.awsqueue) exit 1, "Provide the job queue for aws batch!"
45+
}
46+
4147
// Define containers to handle (build/push or pull)
4248
containersList = defineContainersList()
4349
containers = params.containers.split(',').collect {it.trim()}

buildReferences.nf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ if (params.help) exit 0, helpMessage()
4040
if (!SarekUtils.isAllowedParams(params)) exit 1, "params unknown, see --help for more information"
4141
if (!checkUppmaxProject()) exit 1, "No UPPMAX project ID found! Use --project <UPPMAX Project ID>"
4242

43+
// Check for awsbatch profile configuration
44+
// make sure queue is defined
45+
if (workflow.profile == 'awsbatch') {
46+
if(!params.awsqueue) exit 1, "Provide the job queue for aws batch!"
47+
}
48+
4349
ch_referencesFiles = Channel.fromPath("${params.refDir}/*")
4450

4551
/*

conf/aws-batch.config

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,18 @@ params {
1212
publishDirMode = 'copy'
1313
}
1414

15-
executor.name = 'awsbatch'
16-
executor.awscli = '/home/ec2-user/miniconda/bin/aws'
15+
executor {
16+
name = 'awsbatch'
17+
awscli = '/home/ec2-user/miniconda/bin/aws'
18+
}
1719

1820
process {
19-
executor = 'awsbatch'
20-
queue = 'Sarek-queue'
21+
queue = params.awsqueue
2122

2223
errorStrategy = {task.exitStatus == 143 ? 'retry' : 'terminate'}
2324
maxErrors = '-1'
24-
maxRetries = 2
25+
maxRetries = 4
2526
cpus = 2
26-
memory = 7.GB
27+
memory = 8.GB
28+
2729
}

conf/base.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ params {
3838
targetBED = false // no targets by default
3939
test = false // Not testing by default
4040
verbose = false // Enable for more verbose information
41+
awsqueue = false // Queue has to be provided when using awsbatch executor
4142
}
4243

4344
process {
@@ -70,4 +71,3 @@ trace { // Turning on trace tracking by default
7071
fields = 'process,task_id,hash,name,attempt,status,exit,realtime,%cpu,vmem,rss,submit,start,complete,duration,realtime,rchar,wchar'
7172
file = "${params.outDir}/Reports/Sarek_trace.txt"
7273
}
73-

docs/PARAMETERS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ Possible values are:
5858
`--tools` option is case insensitive to avoid easy introduction of errors when choosing tools.
5959
So you can write `--tools mutect2,ascat` or `--tools MuTect2,ASCAT` without worrying about case sensitivity.
6060

61+
### --awsqueue `BatchQueueName`
62+
63+
Only required if you use the awsbatch profile. This parameter specifies the queue for which jobs are submitted in AWS Batch.
64+
6165
### --verbose
6266

6367
Display more information about files being processed.

germlineVC.nf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ if (params.help) exit 0, helpMessage()
4343
if (!SarekUtils.isAllowedParams(params)) exit 1, "params unknown, see --help for more information"
4444
if (!checkUppmaxProject()) exit 1, "No UPPMAX project ID found! Use --project <UPPMAX Project ID>"
4545

46+
// Check for awsbatch profile configuration
47+
// make sure queue is defined
48+
if (workflow.profile == 'awsbatch') {
49+
if(!params.awsqueue) exit 1, "Provide the job queue for aws batch!"
50+
}
51+
4652
tools = params.tools ? params.tools.split(',').collect{it.trim().toLowerCase()} : []
4753

4854
directoryMap = SarekUtils.defineDirectoryMap(params.outDir)

lib/SarekUtils.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class SarekUtils {
3535
'annotate-VCF',
3636
'annotateTools',
3737
'annotateVCF',
38+
'awsqueue',
3839
'build',
3940
'call-name',
4041
'callName',

main.nf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ kate: syntax groovy; space-indent on; indent-width 2;
4040
================================================================================
4141
*/
4242

43+
// Check for awsbatch profile configuration
44+
// make sure queue is defined
45+
if (workflow.profile == 'awsbatch') {
46+
if(!params.awsqueue) exit 1, "Provide the job queue for aws batch!"
47+
}
48+
49+
4350
if (params.help) exit 0, helpMessage()
4451
if (!SarekUtils.isAllowedParams(params)) exit 1, "params unknown, see --help for more information"
4552
if (!checkUppmaxProject()) exit 1, "No UPPMAX project ID found! Use --project <UPPMAX Project ID>"

runMultiQC.nf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ if (params.help) exit 0, helpMessage()
3737
if (!SarekUtils.isAllowedParams(params)) exit 1, "params unknown, see --help for more information"
3838
if (!checkUppmaxProject()) exit 1, "No UPPMAX project ID found! Use --project <UPPMAX Project ID>"
3939

40+
// Check for awsbatch profile configuration
41+
// make sure queue is defined
42+
if (workflow.profile == 'awsbatch') {
43+
if(!params.awsqueue) exit 1, "Provide the job queue for aws batch!"
44+
}
45+
4046
directoryMap = SarekUtils.defineDirectoryMap(params.outDir)
4147
/*
4248
================================================================================

0 commit comments

Comments
 (0)