Skip to content

Commit

Permalink
Merge pull request #42 from EBI-Metagenomics/bugfix/ips-unipro-docker…
Browse files Browse the repository at this point in the history
…-mounts-fix

Fixes for ref dbs mounts for docker in ips and unifire. Mem limit to emapper --dbmem flag
  • Loading branch information
mberacochea authored Jul 22, 2024
2 parents 584df69 + 09faeef commit 415a674
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
15 changes: 11 additions & 4 deletions modules/local/eggnog.nf
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,25 @@ process EGGNOG_MAPPER {
path "versions.yml", emit: versions

script:
def db_mem_flag = ""
/*
The required memory of the executor needs to be greater than 44GB
to be able to load the eggnog SQLite database into memory.
Docs: https://github.com/eggnogdb/eggnog-mapper/wiki/eggNOG-mapper-v2.1.5-to-v2.1.12#a-few-recipes
*/
if ( task.memory >= 44.GB ) {
db_mem_flag = "--dbmem"
}
if ( mode == "mapper" )
"""
emapper.py -i ${fasta} \
--database ${eggnog_db_dir}/eggnog.db \
--dmnd_db ${eggnog_db_dir}/eggnog_proteins.dmnd \
--data_dir ${eggnog_db_dir} \
--dbmem \
-m diamond \
--no_file_comments \
--cpu ${task.cpus} \
--no_annot \
--no_annot ${db_mem_flag} \
-o ${meta.prefix}
cat <<-END_VERSIONS > versions.yml
Expand All @@ -43,8 +51,7 @@ process EGGNOG_MAPPER {
--no_file_comments \
--cpu ${task.cpus} \
--tax_scope 'prokaryota_broad' \
--dbmem \
--annotate_hits_table ${annotation_hit_table} \
--annotate_hits_table ${annotation_hit_table} ${db_mem_flag} \
-o ${meta.prefix}
cat <<-END_VERSIONS > versions.yml
Expand Down
2 changes: 1 addition & 1 deletion modules/local/interproscan.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ process INTERPROSCAN {
if (workflow.containerEngine == 'singularity') {
return "--bind ${interproscan_db}/data:/opt/interproscan-5.62-94.0/data"
} else {
return "-v ${interproscan_db}/data:/opt/interproscan-5.62-94.0/data"
return "-v ./${interproscan_db}/data:/opt/interproscan-5.62-94.0/data"
}
}

Expand Down
3 changes: 2 additions & 1 deletion modules/local/unifire.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ process UNIFIRE {
label 'error_retry'

container "dockerhub.ebi.ac.uk/uniprot-public/unifire:2023.4"

containerOptions {
if (workflow.containerEngine == 'singularity') {
return "--bind unifire:/volume"
} else {
return "-v unifire:/volume"
return "-v ./unifire:/volume"
}
}

Expand Down
8 changes: 8 additions & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,14 @@ profiles {
}
test { includeConfig 'conf/test.config' }

local {
params {
// Any modern laptop / desktop should have at least...
max_memory = "12GB"
max_cpus = 8
}
}

ebi {
params.workdir = "/hps/nobackup/rdf/metagenomics/service-team/nextflow-workdir/mett-pipeline"
params.singularity_cachedir = "/hps/nobackup/rdf/metagenomics/service-team/singularity-cache/"
Expand Down

0 comments on commit 415a674

Please sign in to comment.