Skip to content

Commit

Permalink
cloudprofile nextflow-version-error papanikos fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mult1fractal committed Jun 16, 2021
1 parent bd6efcd commit fc18d6a
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 12 deletions.
14 changes: 7 additions & 7 deletions configs/local.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ process {
withLabel: altair { cpus = 1 }
withLabel: chromomap { cpus = params.cores }
withLabel: checkV { cpus = params.cores }
withLabel: deepvirfinder { cpus = 4 }
withLabel: deepvirfinder { cpus = params.cores }
withLabel: emboss { cpus = params.cores }
withLabel: ggplot2 { cpus = 1 }
withLabel: hmmscan { cpus = params.cores }
withLabel: marvel { cpus = 4 }
withLabel: metaphinder { cpus = 4 }
withLabel: pprmeta { cpus = 4 }
withLabel: prodigal { cpus = 1 }
withLabel: marvel { cpus = params.cores }
withLabel: metaphinder { cpus = params.cores }
withLabel: pprmeta { cpus = params.cores }
withLabel: prodigal { cpus = 4 }
withLabel: python { cpus = 1 }
withLabel: r_plot { cpus = 1 }
withLabel: samtools { cpus = 1 }
withLabel: seqkit { cpus = 1 }
withLabel: sourmash { cpus = 4 }
withLabel: sourmash { cpus = params.cores }
withLabel: ubuntu { cpus = 1 }
withLabel: upsetr { cpus = 1 }
withLabel: vibrant { cpus = 4 }
withLabel: vibrant { cpus = params.cores }
withLabel: virfinder { cpus = params.cores }
withLabel: virnet { cpus = params.cores }
withLabel: virsorter { cpus = params.cores }
Expand Down
2 changes: 1 addition & 1 deletion configs/node.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ process {
withLabel: prodigal { cpus = 4; memory = '8 GB' }
withLabel: python { cpus = 2; memory = '3 GB' }
withLabel: r_plot { cpus = 4; memory = '4 GB' }
withLabel: samtools { cpus = 1 ; memory = '32 GB' }
withLabel: samtools { cpus = 4 ; memory = '6 GB' }
withLabel: seqkit { cpus = 1 ; memory = '4 GB' }
withLabel: sourmash { cpus = 8 ; memory = '32 GB' }
withLabel: ubuntu { cpus = 4; memory = '4 GB' }
Expand Down
2 changes: 1 addition & 1 deletion modules/databases/download_pvog_DB.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
process pvog_DB {
label 'noDocker'
if (params.cloudProcess) { publishDir "${params.databases}/", mode: 'copy'}
if (params.cloudProcess) { publishDir "${params.databases}/pvogs/", mode: 'copy'}
else { storeDir "${params.databases}/pvog" }
output:
path("pvogs", type: 'dir')
Expand Down
4 changes: 2 additions & 2 deletions modules/databases/download_references.nf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
process download_references {
label 'noDocker'
if (params.cloudProcess) { publishDir "${params.databases}/references/", mode: 'copy', pattern: "phage_references.fa" }
else { storeDir "${params.databases}/references/" }
label 'noDocker'
else { storeDir "${params.databases}/references/" }
output:
path("phage_references.fa")
script:
Expand Down
2 changes: 1 addition & 1 deletion modules/parser/filter_virsorter2.nf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ process filter_virsorter2 {
tuple val(name), path("virsorter2_*.txt")
shell:
"""
tail -n+2 *.tsv | awk '\$2>=${params.vs2_filter}' | awk '{ print \$1 }' > virsorter2_\${PWD##*/}.txt
tail -n+2 *.tsv | awk '\$2>=${params.vs2_filter}' | awk '{ print \$1 }' | cut -d'|' -f1 > virsorter2_\${PWD##*/}.txt
"""
}

Expand Down
22 changes: 22 additions & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,28 @@ profiles {
includeConfig 'configs/node.config'
}

ukj_cloud {
workDir = params.workdir
params.cloudProcess = true
docker { enabled = true }
process.executor = 'google-lifesciences'
params.databases = 'gs://persistant-storage/What-the-Phage'
bucketDir = 'gs://case-tmp-dir/What-the-Phage'
google {
project = 'case-dev-302214'
zone = 'europe-west1-b'
lifeSciences.preemptible = true
lifeSciences.bootDiskSize = 20.GB
}
includeConfig 'configs/container.config'
includeConfig 'configs/node.config'

// cloud error strategy
process.errorStrategy = { task.exitStatus in [10,14,143,137,104,134,139] ? 'retry' : 'terminate' }
process.maxRetries = 3
process { withLabel: noDocker { container = 'nanozoo/template:3.8--d089809' }}
}

//engines
docker {
docker { enabled = true }
Expand Down
2 changes: 2 additions & 0 deletions phage.nf
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ if ( workflow.profile == 'standard' ) { exit 1, "NO VALID EXECUTION PROFILE SELE

if (
workflow.profile.contains('singularity') ||
workflow.profile.contains('ukj_cloud') ||
workflow.profile.contains('docker')
) { "engine selected" }
else { exit 1, "No engine selected: -profile EXECUTER,ENGINE" }
Expand All @@ -82,6 +83,7 @@ if (
workflow.profile.contains('ebi') ||
workflow.profile.contains('slurm') ||
workflow.profile.contains('lsf') ||
workflow.profile.contains('ukj_cloud') ||
workflow.profile.contains('git_action')
) { "executer selected" }
else { exit 1, "No executer selected: -profile EXECUTER,ENGINE" }
Expand Down

0 comments on commit fc18d6a

Please sign in to comment.