Skip to content

Commit

Permalink
changed configs for easier use
Browse files Browse the repository at this point in the history
rbpisupati committed Mar 27, 2019
1 parent e7dce99 commit dc02e51
Showing 3 changed files with 46 additions and 39 deletions.
6 changes: 3 additions & 3 deletions conf/mendel.config
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ executor {
}

params {
max_memory = 250.GB
max_cpus = 24
max_time = 2.d
max_memory = 180.GB
max_cpus = 12
max_time = 24.h
}
68 changes: 32 additions & 36 deletions conf/snpcall.config
Original file line number Diff line number Diff line change
@@ -12,75 +12,71 @@

process {

cpus = { check_max( 1 * task.attempt, 'cpus') }
memory = { check_max( 15.GB * task.attempt, 'memory') }
time = { check_max( 6.h * task.attempt, 'time') }

errorStrategy = { task.exitStatus in [143,137] ? 'retry' : 'terminate' }
maxRetries = 3
maxErrors = '-1'

$makeBWAindex {
withLabel: env_picard_small {
cpus = { check_max( 1 * task.attempt, 'cpus') }
memory = { check_max( 15.GB * task.attempt, 'memory') }
time = { check_max( 6.h * task.attempt, 'time') }
module = ['BWA/0.7.15-foss-2016a', 'SAMtools/1.3.1-foss-2016a', 'picard/2.6.0-Java-1.8.0_131']
}

$extractFastq {
module = ['picard/2.6.0-Java-1.8.0_131', 'sratoolkit/2.8.1-3']
}

$fastqc {
module = ['FastQC/0.11.5-foss-2016a']
withLabel: env_qual_small {
cpus = { check_max( 1 * task.attempt, 'cpus') }
memory = { check_max( 15.GB * task.attempt, 'memory') }
time = { check_max( 6.h * task.attempt, 'time') }
module = ['picard/2.6.0-Java-1.8.0_131', 'sratoolkit/2.8.1-3', 'FastQC/0.11.5-foss-2016a']
errorStrategy = { task.exitStatus in [143,137] ? 'retry' : 'ignore' }
}

$trim_galore {
module = ['Trim_Galore/0.4.1-foss-2016a']
withLabel: env_picard_medium {
cpus = { check_max( 2 * task.attempt, 'cpus') }
memory = { check_max( 20.GB * task.attempt, 'memory') }
time = { check_max( 8.h * task.attempt, 'time') }
time = { check_max( 16.h * task.attempt, 'time') }
module = ['BWA/0.7.15-foss-2016a', 'SAMtools/1.3.1-foss-2016a', 'picard/2.6.0-Java-1.8.0_131']
}

withLabel: env_bwa_small {
cpus = { check_max( 1 * task.attempt, 'cpus') }
memory = { check_max( 15.GB * task.attempt, 'memory') }
time = { check_max( 6.h * task.attempt, 'time') }
module = ['BWA/0.7.15-foss-2016a', 'SAMtools/1.3.1-foss-2016a', 'picard/2.6.0-Java-1.8.0_131']
}

$alignReads {
module = ['BWA/0.7.15-foss-2016a']
withLabel: env_bwa_large {
cpus = { check_max( 8 * task.attempt, 'cpus') }
memory = { check_max( 80.GB * task.attempt, 'memory') }
time = { check_max( 16.h * task.attempt, 'time') }
module = ['BWA/0.7.15-foss-2016a', 'SAMtools/1.3.1-foss-2016a', 'picard/2.6.0-Java-1.8.0_131']
}

$processBam {
module = ['SAMtools/1.3.1-intel-2016a']
withLabel: env_trim {
module = ['Trim_Galore/0.4.1-foss-2016a']
cpus = { check_max( 2 * task.attempt, 'cpus') }
memory = { check_max( 20.GB * task.attempt, 'memory') }
time = { check_max( 16.h * task.attempt, 'time') }
}

$picardBam {
module = ['SAMtools/1.3.1-intel-2016a', 'picard/2.6.0-Java-1.8.0_131']
time = { check_max( 8.h * task.attempt, 'time') }
}

$realignBam {
module = ['GATK/3.5-Java-1.8.0_45', 'SAMtools/1.3.1-intel-2016a']
withLabel: env_gatk_small {
cpus = { check_max( 1 * task.attempt, 'cpus') }
memory = { check_max( 15.GB * task.attempt, 'memory') }
time = { check_max( 6.h * task.attempt, 'time') }
module = ['GATK/3.5-Java-1.8.0_45', 'SAMtools/1.3.1-intel-2016a', 'tabix/0.2.6-goolf-1.4.10']
}

$doSNPcall {
module = ['GATK/3.5-Java-1.8.0_45']
withLabel: env_gatk_medium {
cpus = { check_max( 4 * task.attempt, 'cpus') }
memory = { check_max( 40.GB * task.attempt, 'memory') }
time = { check_max( 16.h * task.attempt, 'time') }
module = ['GATK/3.5-Java-1.8.0_45']
}

$joinGVCFs {
module = ['GATK/3.5-Java-1.8.0_45']
withLabel: env_gatk_large {
cpus = { check_max( 8 * task.attempt, 'cpus') }
memory = { check_max( 100.GB * task.attempt, 'memory') }
time = { check_max( 16.h * task.attempt, 'time') }
}

$getSamples {
module = ['tabix/0.2.6-goolf-1.4.10']
}

$selectSNPs {
module = ['GATK/3.5-Java-1.8.0_45']
}

11 changes: 11 additions & 0 deletions main.nf
Original file line number Diff line number Diff line change
@@ -125,6 +125,7 @@ log.info "========================================="
if (build_index == true){
process makeBWAindex {
publishDir "${reffol}", mode: 'copy'
label 'env_bwa_small'

input:
file genome
@@ -157,6 +158,7 @@ if (params.file_ext == "fastq"){
process extractFastq {
tag "$name"
storeDir "${params.tmpdir}/rawreads"
label 'env_qual_small'

input:
set val(name), file(reads) from read_files_processing
@@ -220,6 +222,7 @@ if(params.notrim){
} else {
process trim_galore {
tag "$name"
label 'env_trim'
publishDir "${params.outdir}/trim_galore", mode: 'copy',
saveAs: {filename ->
if (filename.indexOf("_fastqc") > 0) "FastQC/$filename"
@@ -261,6 +264,7 @@ if(params.notrim){
*/
process alignReads {
tag "$name"
label 'env_bwa_large'

input:
set val(name), file(reads) from trimmed_reads
@@ -281,6 +285,7 @@ process alignReads {
*/
process processBam {
tag "$name"
label 'env_picard_medium'

input:
set val(name), file(sam) from aligned_sam
@@ -301,6 +306,7 @@ process processBam {
*/
process picardBam {
tag "$name"
label 'env_picard_small'

input:
set val(name), file(bam) from sorted_bam
@@ -323,6 +329,7 @@ process picardBam {
process realignBam {
tag "$name"
publishDir "${params.outdir}/alignedBam", mode: 'copy'
label 'env_gatk_small'

input:
set val(name), file(bam) from modified_bam
@@ -354,6 +361,7 @@ process realignBam {
process doSNPcall {
tag "$name"
publishDir "${params.outdir}/gvcf", mode: 'copy'
label 'env_gatk_medium'

input:
set val(name), file(bam) from realigned_bam
@@ -383,6 +391,7 @@ input_genotypegvcf_index = raw_gvcf_index.collect()

process joinGVCFs {
publishDir "$params.outdir", mode: 'copy'
label 'env_gatk_large'

input:
file in_vcf from input_genotypegvcf
@@ -410,6 +419,7 @@ process joinGVCFs {
*/
process getSamples {
tag "joinGVCF"
label 'env_gatk_small'

input:
file gvcf from combgVCF_name
@@ -432,6 +442,7 @@ input_names = sample_names
process selectSNPs {
tag "$name"
publishDir "${params.outdir}/vcf", mode: 'copy'
label 'env_gatk_small'

input:
val name from input_names

0 comments on commit dc02e51

Please sign in to comment.