Skip to content

Commit c7eb46f

Browse files
committed
output params string in md5sum_version.txt
1 parent f882533 commit c7eb46f

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

modules/local/compare_sequences.nf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ process COMPARE_SEQUENCES {
1414
val(similarity_threshold) // Similarity threshold for maches of VSEARCH
1515
val(query_or_target) // what reagion to evaluate (query,target,alignment) from params.expected_sequences_region
1616
val(trace_report_suffix) // timestamp of pipeline info files
17+
val(val_params_string) // params map converted to string
1718

1819
output:
1920
path("*.svg") , emit: svg
@@ -39,6 +40,7 @@ process COMPARE_SEQUENCES {
3940
# save unique tags to file
4041
echo "md5sum_version ${meta.id}" > "md5sum_version.txt"
4142
echo "trace_report_suffix ${trace_report_suffix}" >> "md5sum_version.txt"
43+
echo "params ${val_params_string}" >> "md5sum_version.txt"
4244
4345
# isolate warnings (when grep find no match, exit code is 1, "|| true" fixes that)
4446
grep "WARN -" "nucleotide-differences.log" | sed 's/^\\[1\\] //g' | sed 's/"//g' > Warnings.txt || true

subworkflows/local/comparison_wf.nf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ include { COMPARE_PERFORMANCE } from '../../modules/local/compare_performanc
55
workflow COMPARISON_WF {
66
take:
77
val_md5sum_version // md5sum of params appended by pipeline version
8+
val_params_string // params map converted to string
89
trace_report_suffix // params.trace_report_suffix that allows linkage to files in pipeline_info, such as pipeline_info/params_<trace_report_suffix>.json
910
query_or_target // region to evaluate
1011
ch_observed_sequences // observed sequences (fasta)
@@ -24,7 +25,7 @@ workflow COMPARISON_WF {
2425
"query+target+ql+tl+qilo+qihi+tilo+tihi+gaps+mism+qstrand" )
2526

2627
// Investigate mismatches per sample, plus barplot (y = number of sequences, x = number of mismatches)
27-
COMPARE_SEQUENCES ( VSEARCH_USEARCHGLOBAL_BM.out.tsv, ch_observed_abundances, ch_expected_abundances.ifEmpty([]), similarity_threshold, query_or_target, trace_report_suffix )
28+
COMPARE_SEQUENCES ( VSEARCH_USEARCHGLOBAL_BM.out.tsv, ch_observed_abundances, ch_expected_abundances.ifEmpty([]), similarity_threshold, query_or_target, trace_report_suffix, val_params_string )
2829
COMPARE_SEQUENCES.out.warnings.subscribe{ it ->
2930
if( it.countLines() > 0 ) { log.warn "about comparing sequences\n\n" + it.splitText().join("") }
3031
}

workflows/ampliseq.nf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1118,8 +1118,10 @@ workflow AMPLISEQ {
11181118
// WORKFLOW: Comparison to expected
11191119
//
11201120
if ( params.expected_sequences ) {
1121+
def val_params_string = params.findAll{ it.key != 'trace_report_suffix' }.toString()
11211122
COMPARISON_WF (
1122-
( params.findAll{ it.key != 'trace_report_suffix' }.toString().md5() + "_${workflow.manifest.version}" ), // md5sum of params (without variable time stamp in "trace_report_suffix") appended by pipeline version
1123+
( val_params_string.md5() + "_${workflow.manifest.version}" ), // md5sum of params (without variable time stamp in "trace_report_suffix") appended by pipeline version
1124+
val_params_string,
11231125
params.trace_report_suffix, // record this as link to files in pipeline_info
11241126
params.expected_sequences_region,
11251127
run_qiime2 && !params.skip_abundance_tables ? QIIME2_EXPORT.out.abs_fasta : ch_dada2_fasta, // observed sequences (fasta)

0 commit comments

Comments
 (0)