Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stub and update test #16

Merged
merged 22 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
----------------------------------------------------------------------------------------
*/

stubRun = true

params {
config_profile_name = 'Test profile'
config_profile_description = 'Minimal test dataset to check pipeline function'
Expand All @@ -29,3 +31,4 @@ params {
skip_iqtree = true
fastme_bootstrap = 0
}

12 changes: 12 additions & 0 deletions modules/local/convert_fasta.nf
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,16 @@ process CONVERT_FASTA {
Biopython: \$(pip show biopython | grep Version | cut -d ' ' -f 2)
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.fa

cat <<- END_VERSIONS > versions.yml
"${task.process}":
Python: \$(python --version | cut -d ' ' -f 2)
Biopython: \$(pip show biopython | grep Version | cut -d ' ' -f 2)
END_VERSIONS
"""
}
12 changes: 12 additions & 0 deletions modules/local/convert_phylip.nf
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,16 @@ process CONVERT_PHYLIP {
Biopython: \$(pip show biopython | grep Version | cut -d ' ' -f 2)
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.phy

cat <<- END_VERSIONS > versions.yml
"${task.process}":
Python: \$(python --version | cut -d ' ' -f 2)
Biopython: \$(pip show biopython | grep Version | cut -d ' ' -f 2)
END_VERSIONS
"""
}
5 changes: 4 additions & 1 deletion modules/local/create_tcoffeetemplate.nf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ process CREATE_TCOFFEETEMPLATE {
prefix = task.ext.prefix ?: "${meta.id}"
"""
# Prep templates
for structure in \$(ls *.pdb); do id=`echo \$structure| awk {'gsub(".pdb", "", \$0); print'}`; echo -e ">"\$id "_P_" "\${id}" >>${prefix}_template.txt ; done
for structure in \$(ls *.pdb); do
id=`echo \$structure | awk {'gsub(".pdb", "", \$0); print'}`;
echo -e ">"\$id "_P_" "\${id}" >> ${prefix}_template.txt;
done
"""

stub:
Expand Down
26 changes: 19 additions & 7 deletions modules/local/dump_params.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ process DUMP_PARAMS {

input:
tuple val(meta), path(exact)
val uniprot_query
val use_structures
val use_centroid
val min_score
val skip_downstream
val use_iqtree
val use_fastme

output:
tuple val(meta), path("params.yml"), emit: params
Expand All @@ -19,14 +26,19 @@ process DUMP_PARAMS {
"""
cat <<- END_PARAMS > params.yml
id: ${meta.id}
uniprot_query: ${params.uniprot_query}
uniprot_query: ${uniprot_query}
exact_match: \$(cat $exact)
use_structures: ${params.use_structures}
use_centroid: ${params.use_centroid}
min_score: ${params.min_score}
skip_downstream: ${params.skip_downstream}
use_iqtree: ${params.use_iqtree}
use_fastme: ${params.use_fastme}
use_structures: ${use_structures}
use_centroid: ${use_centroid}
min_score: ${min_score}
skip_downstream: ${skip_downstream}
use_iqtree: ${use_iqtree}
use_fastme: ${use_fastme}
END_PARAMS
"""

stub:
"""
touch params.yml
"""
}
12 changes: 12 additions & 0 deletions modules/local/fetch_afdb_structures.nf
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,16 @@ process FETCH_AFDB_STRUCTURES {
Python Requests: \$(pip show requests | grep Version | cut -d ' ' -f 2)
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.phy

cat <<- END_VERSIONS > versions.yml
"${task.process}"
Python: \$(python --version | cut -d ' ' -f 2)
Python Requests: \$(pip show requests | grep Version | cut -d ' ' -f 2)
END_VERSIONS
"""
}
16 changes: 16 additions & 0 deletions modules/local/fetch_eggnog_group_local.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ process FETCH_EGGNOG_GROUP_LOCAL {
tag "$meta.id"
label 'process_single'

conda "conda-forge::python=3.11.0 conda-forge::biopython=1.83.0 conda-forge::requests=2.31.0"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-bc54124b36864a4af42a9db48b90a404b5869e7e:5258b8e5ba20587b7cbf3e942e973af5045a1e59-0' :
'biocontainers/mulled-v2-bc54124b36864a4af42a9db48b90a404b5869e7e:5258b8e5ba20587b7cbf3e942e973af5045a1e59-0' }"

conda "conda-forge::python=3.11.0 conda-forge::biopython=1.83.0 conda-forge::requests=2.31.0"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-bc54124b36864a4af42a9db48b90a404b5869e7e:5258b8e5ba20587b7cbf3e942e973af5045a1e59-0' :
Expand Down Expand Up @@ -32,5 +37,16 @@ process FETCH_EGGNOG_GROUP_LOCAL {
Python: \$(python --version | cut -f2)
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_eggnog_group.txt
touch ${prefix}_eggnog_group.csv

cat <<- END_VERSIONS > versions.yml
"${task.process}":
Python: \$(python --version | cut -f2)
END_VERSIONS
"""
}
13 changes: 13 additions & 0 deletions modules/local/fetch_inspector_group_online.nf
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,17 @@ process FETCH_INSPECTOR_GROUP_ONLINE {
OrthoInspector Database: $inspector_version
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_inspector_group.csv

cat <<-END_VERSIONS > versions.yml
"${task.process}":
Python: \$(python --version | cut -d ' ' -f 2)
Python Requests: \$(pip show requests | grep Version | cut -d ' ' -f 2)
OrthoInspector Database: $inspector_version
END_VERSIONS
"""
}
15 changes: 15 additions & 0 deletions modules/local/fetch_oma_group_local.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ process FETCH_OMA_GROUP_LOCAL {
tag "$meta.id"
label 'process_single'

conda "conda-forge::python=3.11.0 conda-forge::biopython=1.83.0 conda-forge::requests=2.31.0"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-bc54124b36864a4af42a9db48b90a404b5869e7e:5258b8e5ba20587b7cbf3e942e973af5045a1e59-0' :
'biocontainers/mulled-v2-bc54124b36864a4af42a9db48b90a404b5869e7e:5258b8e5ba20587b7cbf3e942e973af5045a1e59-0' }"

conda "conda-forge::python=3.11.0 conda-forge::biopython=1.83.0 conda-forge::requests=2.31.0"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-bc54124b36864a4af42a9db48b90a404b5869e7e:5258b8e5ba20587b7cbf3e942e973af5045a1e59-0' :
Expand Down Expand Up @@ -36,4 +41,14 @@ process FETCH_OMA_GROUP_LOCAL {
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_oma_group.csv

cat <<- END_VERSIONS > versions.yml
"${task.process}":
Python: \$(python --version | cut -f2)
END_VERSIONS
"""
}
13 changes: 13 additions & 0 deletions modules/local/fetch_oma_group_online.nf
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,17 @@ process FETCH_OMA_GROUP_ONLINE {
\$(get_oma_version.py)
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_oma_group.csv

cat <<-END_VERSIONS > versions.yml
"${task.process}":
Python: \$(python --version | cut -d ' ' -f 2)
Python Requests: \$(pip show requests | grep Version | cut -d ' ' -f 2)
\$(get_oma_version.py)
END_VERSIONS
"""
}
16 changes: 16 additions & 0 deletions modules/local/fetch_panther_group_local.nf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ process FETCH_PANTHER_GROUP_LOCAL {
'https://depot.galaxyproject.org/singularity/python:3.10' :
'biocontainers/python:3.10' }"

conda "conda-forge::python=3.11.0 conda-forge::biopython=1.83.0 conda-forge::requests=2.31.0"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-bc54124b36864a4af42a9db48b90a404b5869e7e:5258b8e5ba20587b7cbf3e942e973af5045a1e59-0' :
'biocontainers/mulled-v2-bc54124b36864a4af42a9db48b90a404b5869e7e:5258b8e5ba20587b7cbf3e942e973af5045a1e59-0' }"

input:
tuple val(meta), path(uniprot_id), path(taxid), path(exact)
path panther_db
Expand All @@ -30,4 +35,15 @@ process FETCH_PANTHER_GROUP_LOCAL {
Python: \$(python --version | cut -f2)
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_panther_group.csv

cat <<- END_VERSIONS > versions.yml
"${task.process}":
Python: \$(python --version | cut -f2)
END_VERSIONS
"""
}
13 changes: 13 additions & 0 deletions modules/local/fetch_panther_group_online.nf
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,17 @@ process FETCH_PANTHER_GROUP_ONLINE {
Panther Database: \$(cat panther_version.txt)
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_panther_group.csv

cat <<- END_VERSIONS > versions.yml
"${task.process}":
Python: \$(python --version | cut -d ' ' -f 2)
Python Requests: \$(pip show requests | grep Version | cut -d ' ' -f 2)
Panther Database: \$(cat panther_version.txt)
END_VERSIONS
"""
}
15 changes: 15 additions & 0 deletions modules/local/fetch_sequences_online.nf
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,19 @@ process FETCH_SEQUENCES_ONLINE {
\$(get_oma_version.py)
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_orthologs.fa
touch ${prefix}_seq_hits.txt
touch ${prefix}_seq_misses.txt

cat <<- END_VERSIONS > versions.yml
"${task.process}":
Python: \$(python --version | cut -d ' ' -f 2)
Python Requests: \$(pip show requests | grep Version | cut -d ' ' -f 2)
\$(get_oma_version.py)
END_VERSIONS
"""
}
16 changes: 16 additions & 0 deletions modules/local/filter_fasta.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ process FILTER_FASTA {
tag "$meta.id"
label 'process_single'

conda "conda-forge::python=3.11.0 conda-forge::biopython=1.83.0 conda-forge::requests=2.31.0"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-bc54124b36864a4af42a9db48b90a404b5869e7e:5258b8e5ba20587b7cbf3e942e973af5045a1e59-0' :
'biocontainers/mulled-v2-bc54124b36864a4af42a9db48b90a404b5869e7e:5258b8e5ba20587b7cbf3e942e973af5045a1e59-0' }"

conda "conda-forge::python=3.11.0 conda-forge::biopython=1.83.0 conda-forge::requests=2.31.0"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-bc54124b36864a4af42a9db48b90a404b5869e7e:5258b8e5ba20587b7cbf3e942e973af5045a1e59-0' :
Expand All @@ -27,4 +32,15 @@ process FILTER_FASTA {
Python: \$(python --version | cut -d ' ' -f 2)
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_filtered.fa

cat <<- END_VERSIONS > versions.yml
"${task.process}":
Python: \$(python --version | cut -f2)
END_VERSIONS
"""
}
13 changes: 13 additions & 0 deletions modules/local/filter_hits.nf
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,17 @@ process FILTER_HITS {
Python: \$(python --version | cut -d ' ' -f 2)
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_minscore_000.txt
touch ${prefix}_centroid.txt
touch ${prefix}_filtered_hits.txt

cat <<- END_VERSIONS > versions.yml
"${task.process}":
Python: \$(python --version | cut -f2)
END_VERSIONS
"""
}
14 changes: 14 additions & 0 deletions modules/local/identify_seq_online.nf
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,18 @@ process IDENTIFY_SEQ_ONLINE {
Python Requests: \$(pip show requests | grep Version | cut -d ' ' -f 2)
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_id.txt
touch ${prefix}_taxid.txt
touch ${prefix}_exact.txt

cat <<- END_VERSIONS > versions.yml
"${task.process}":
Python: \$(python --version | cut -d ' ' -f 2)
Python Requests: \$(pip show requests | grep Version | cut -d ' ' -f 2)
END_VERSIONS
"""
}
16 changes: 15 additions & 1 deletion modules/local/make_report.nf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ process MAKE_REPORT {
'docker://itrujnara/orthologs-report:1.0.0' :
'itrujnara/orthologs-report:1.0.0' }"


input:
tuple val(meta), path(id), path(taxid), path(exact), path(score_table), path(filtered_hits), path(support_plot), path(venn_plot), path(jaccard_plot), path(orthostats), path(seq_hits), path(seq_misses), path(str_hits), path(str_misses), path(alignment), path(iqtree), path(fastme), path(params_file)

Expand Down Expand Up @@ -59,4 +58,19 @@ process MAKE_REPORT {
Python: \$(python --version | cut -d ' ' -f 2)
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
mkdir ${prefix}_dist
touch ${prefix}_dist/${prefix}_run.sh

cat <<- END_VERSIONS > versions.yml
${task.process}:
Node: \$(node --version)
Yarn: \$(yarn --version)
React: \$(yarn view react version)
Python: \$(python --version | cut -d ' ' -f 2)
END_VERSIONS
"""
}
11 changes: 11 additions & 0 deletions modules/local/make_score_table.nf
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,15 @@ process MAKE_SCORE_TABLE {
Python: \$(python3 --version | cut -d ' ' -f 2)
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_score_table.csv

cat <<- END_VERSIONS > versions.yml
"${task.process}":
Python: \$(python3 --version | cut -d ' ' -f 2)
END_VERSIONS
"""
}
Loading
Loading