Skip to content

Commit

Permalink
Fix: Minor issues in the network_inference workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dileep-kishore committed May 27, 2021
1 parent 1242cd6 commit d6de68c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ process resample {
input:
tuple val(meta), file(otu_file), file(obs_metadata), file(sample_metadata), file(children_map)
output:
tuple val(meta), file(otu_file), file('bootstraps/*.boot.temp'), file(obsmeta_file), file(samplemeta_file), file(children_file)
tuple val(meta), file(otu_file), file('bootstraps/*_otu.boot'), file(obs_metadata), file(sample_metadata), file(children_map)
script:
ncpus = params.network_inference.bootstrap['resample']['ncpus']
bootstraps = params.network_inference.bootstrap['resample']['bootstraps']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include { getHierarchy } from '../../../functions/functions.nf'
process make_network_with_pvalue {
label 'micone'
tag "${meta.id}"
publishDir "${params.output_dir}/${f[0]}/${f[1]}/${f[2]}/${meta.id}",
publishDir "${params.output_dir}/${f[0]}/network/${f[1]}/${meta.id}",
mode: 'copy',
overwrite: true
input:
Expand All @@ -13,7 +13,7 @@ process make_network_with_pvalue {
script:
String task_process = "${task.process}"
f = getHierarchy(task_process)
metadata = params.network_inference.network['make_network_with_pvalue']['metadata']
metadata_file = params.network_inference.network['make_network_with_pvalue']['metadata_file']
interaction_threshold = params.network_inference.network['make_network_with_pvalue']['interaction_threshold']
pvalue_threshold = params.network_inference.network['make_network_with_pvalue']['pvalue_threshold']
template 'network_inference/network/make_network_with_pvalue.py'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include { getHierarchy } from '../../../functions/functions.nf'
process make_network_without_pvalue {
label 'micone'
tag "${meta.id}"
publishDir "${params.output_dir}/${f[0]}/${f[1]}/${f[2]}/${meta.id}",
publishDir "${params.output_dir}/${f[0]}/network/${f[1]}/${meta.id}",
mode: 'copy',
overwrite: true
input:
Expand All @@ -13,7 +13,7 @@ process make_network_without_pvalue {
script:
String task_process = "${task.process}"
f = getHierarchy(task_process)
metadata = params.network_inference.network['make_network_without_pvalue']['metadata']
metadata_file = params.network_inference.network['make_network_without_pvalue']['metadata_file']
interaction_threshold = params.network_inference.network['make_network_without_pvalue']['interaction_threshold']
template 'network_inference/network/make_network_without_pvalue.py'
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ function do_fastspar {
--threads 1
}

export -f do_fastspar

find . -name "*_otu.boot" | parallel -j ${ncpus} do_fastspar
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def create_cmetadata():
BASE_NAME = "${meta.id}"
CORR_FILE = "${corr_file}"
PVALUE_FILE = "${pvalue_file}"
META_FILE = "${metadata}"
META_FILE = "${metadata_file}"
OBSMETA_FILE = "${obs_metadata}"
CHILDREN_FILE = "${children_map}"
INTERACTION_THRESHOLD = ${interaction_threshold}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def create_cmetadata():
if __name__ == "__main__":
BASE_NAME = "${meta.id}"
CORR_FILE = "${corr_file}"
META_FILE = "${metadata}"
META_FILE = "${metadata_file}"
OBSMETA_FILE = "${obs_metadata}"
CHILDREN_FILE = "${children_map}"
INTERACTION_THRESHOLD = ${interaction_threshold}
Expand Down

0 comments on commit d6de68c

Please sign in to comment.