Skip to content

Commit

Permalink
refactor: Remove old unused nf-core functions (#182)
Browse files Browse the repository at this point in the history
* refactor: Remove unused nf-core functions

Signed-off-by: jvfe <[email protected]>

* fix: Remove missing functions in RGI module

Signed-off-by: jvfe <[email protected]>

---------

Signed-off-by: jvfe <[email protected]>
  • Loading branch information
jvfe authored Jan 23, 2024
1 parent 1639668 commit 9fd06dd
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 161 deletions.
94 changes: 70 additions & 24 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,137 +8,183 @@
"bakta/bakta": {
"branch": "master",
"git_sha": "280c5c86b3da7dfcc92ebd5420584dd6ff26c4a8",
"installed_by": ["modules"]
"installed_by": [
"modules"
]
},
"bakta/baktadbdownload": {
"branch": "master",
"git_sha": "280c5c86b3da7dfcc92ebd5420584dd6ff26c4a8",
"installed_by": ["modules"]
"installed_by": [
"modules"
]
},
"blast/blastn": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"installed_by": ["modules"],
"installed_by": [
"modules"
],
"patch": "modules/nf-core/blast/blastn/blast-blastn.diff"
},
"blast/makeblastdb": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"installed_by": ["modules"],
"installed_by": [
"modules"
],
"patch": "modules/nf-core/blast/makeblastdb/blast-makeblastdb.diff"
},
"checkm/lineagewf": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"installed_by": ["modules"],
"installed_by": [
"modules"
],
"patch": "modules/nf-core/checkm/lineagewf/checkm-lineagewf.diff"
},
"custom/dumpsoftwareversions": {
"branch": "master",
"git_sha": "05c280924b6c768d484c7c443dad5e605c4ff4b4",
"installed_by": ["modules"],
"installed_by": [
"modules"
],
"patch": "modules/nf-core/custom/dumpsoftwareversions/custom-dumpsoftwareversions.diff"
},
"diamond/blastp": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"installed_by": ["modules"],
"installed_by": [
"modules"
],
"patch": "modules/nf-core/diamond/blastp/diamond-blastp.diff"
},
"diamond/blastx": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"installed_by": ["modules"],
"installed_by": [
"modules"
],
"patch": "modules/nf-core/diamond/blastx/diamond-blastx.diff"
},
"diamond/makedb": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"installed_by": ["modules"],
"installed_by": [
"modules"
],
"patch": "modules/nf-core/diamond/makedb/diamond-makedb.diff"
},
"fastp": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"installed_by": ["modules"],
"installed_by": [
"modules"
],
"patch": "modules/nf-core/fastp/fastp.diff"
},
"fastqc": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"installed_by": ["modules"],
"installed_by": [
"modules"
],
"patch": "modules/nf-core/fastqc/fastqc.diff"
},
"fasttree": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"installed_by": ["modules"],
"installed_by": [
"modules"
],
"patch": "modules/nf-core/fasttree/fasttree.diff"
},
"gubbins": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"installed_by": ["modules"],
"installed_by": [
"modules"
],
"patch": "modules/nf-core/gubbins/gubbins.diff"
},
"iqtree": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"installed_by": ["modules"],
"installed_by": [
"modules"
],
"patch": "modules/nf-core/iqtree/iqtree.diff"
},
"kraken2/kraken2": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"installed_by": ["modules"],
"installed_by": [
"modules"
],
"patch": "modules/nf-core/kraken2/kraken2/kraken2-kraken2.diff"
},
"mafft": {
"branch": "master",
"git_sha": "b265b4ff6a35b133b963b4eaddfca0ffb3395236",
"installed_by": ["modules"],
"installed_by": [
"modules"
],
"patch": "modules/nf-core/mafft/mafft.diff"
},
"multiqc": {
"branch": "master",
"git_sha": "ee80d14721e76e2e079103b8dcd5d57129e584ba",
"installed_by": ["modules"],
"installed_by": [
"modules"
],
"patch": "modules/nf-core/multiqc/multiqc.diff"
},
"panaroo/run": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"installed_by": ["modules"],
"installed_by": [
"modules"
],
"patch": "modules/nf-core/panaroo/run/panaroo-run.diff"
},
"phispy": {
"branch": "master",
"git_sha": "a60792caf1782dd570ad7a091b61806c592734d7",
"installed_by": ["modules"],
"installed_by": [
"modules"
],
"patch": "modules/nf-core/phispy/phispy.diff"
},
"prokka": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"installed_by": ["modules"],
"installed_by": [
"modules"
],
"patch": "modules/nf-core/prokka/prokka.diff"
},
"quast": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"installed_by": ["modules"],
"installed_by": [
"modules"
],
"patch": "modules/nf-core/quast/quast.diff"
},
"snpsites": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"installed_by": ["modules"],
"installed_by": [
"modules"
],
"patch": "modules/nf-core/snpsites/snpsites.diff"
},
"unicycler": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"installed_by": ["modules"],
"installed_by": [
"modules"
],
"patch": "modules/nf-core/unicycler/unicycler.diff"
}
}
Expand All @@ -148,4 +194,4 @@
}
}
}
}
}
68 changes: 0 additions & 68 deletions modules/local/functions.nf

This file was deleted.

30 changes: 0 additions & 30 deletions modules/local/get_minikraken.nf
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
// Import generic module functions
include { initOptions; saveFiles; getSoftwareName } from './functions'

params.options = [:]
options = initOptions(params.options)

process KRAKEN2_DB {
//publishDir 'dbcache/', mode:'copy'
tag "minikraken"
label 'process_medium'
label 'error_retry_delay'

Expand All @@ -19,26 +11,4 @@ process KRAKEN2_DB {
mkdir -p k2_standard_8gb_20201202
tar xvf k2_standard_8gb_20201202.tar.gz -C k2_standard_8gb_20201202
"""
// stub:
/*
minikraken = file("./dbcache/k2_standard_8gb_20201202")
if (!minikraken.exists()){
println "FARRRRT"
"""
curl https://genome-idx.s3.amazonaws.com/kraken/k2_standard_8gb_20201202.tar.gz --output k2_standard_8gb_20201202.tar.gz
mkdir -p k2_standard_8gb_20201202
tar xvf k2_standard_8gb_20201202.tar.gz -C k2_standard_8gb_20201202
"""
}
else{
"""
echo "database is cached"
"""
}
*/
// else{
// """
// ln -s ${minikraken} .
// """
// }
}
9 changes: 0 additions & 9 deletions modules/local/get_software_versions.nf
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
// Import generic module functions
include { saveFiles } from './functions'

params.options = [:]

process GET_SOFTWARE_VERSIONS {
publishDir "${params.outdir}",
mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:'pipeline_info', meta:[:], publish_by_meta:[]) }

conda (params.enable_conda ? "conda-forge::python=3.8.3" : null)
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/python:3.8.3"
Expand Down
4 changes: 1 addition & 3 deletions modules/local/mobsuite.nf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Import generic module functions
process MOB_RECON {
tag "$meta.id"
label 'process_low'
Expand All @@ -12,7 +11,6 @@ process MOB_RECON {

input:
tuple val(meta), path(fasta)
//path mob_db

output:
tuple val(meta), path("${meta.id}_mob_recon") , emit: mob_predictions
Expand All @@ -33,7 +31,7 @@ process MOB_RECON {
mobsuite: \$(echo \$(mob_recon --version 2>&1) | sed 's/^.*mob_recon //; s/ .*\$//')
END_VERSIONS
"""
//--database_directory $mob_db \\

stub:
"""
mkdir ${meta.id}_mob_recon
Expand Down
15 changes: 2 additions & 13 deletions modules/local/rgi.nf
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
// Import generic module functions
include { initOptions; saveFiles; getSoftwareName } from './functions'

params.options = [:]
options = initOptions(params.options)

process UPDATE_RGI_DB {
tag "CARD"
label 'process_low'
Expand Down Expand Up @@ -36,9 +30,6 @@ process UPDATE_RGI_DB {
process RGI {
tag "$meta.id"
label 'process_low'
publishDir "${params.outdir}",
mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }

conda (params.enable_conda ? "bioconda::rgi=6.0.2" : null)
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
Expand All @@ -57,8 +48,7 @@ process RGI {
path "versions.yml", emit: version

script:
def software = getSoftwareName(task.process)
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
def prefix = task.ext.prefix ? "${meta.id}${options.suffix}" : "${meta.id}"

"""
rgi load -i $card_db --local
Expand All @@ -70,8 +60,7 @@ process RGI {
END_VERSIONS
"""
stub:
def software = getSoftwareName(task.process)
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
def prefix = task.ext.prefix ? "${meta.id}${options.suffix}" : "${meta.id}"
"""
touch ${prefix}_rgi.txt
cat <<-END_VERSIONS > versions.yml
Expand Down
Loading

0 comments on commit 9fd06dd

Please sign in to comment.