1+ // BioVault workflow export v0.1.1
2+
13nextflow. enable. dsl= 2
24
35workflow USER {
@@ -39,6 +41,8 @@ process apol1_classifier {
3941 container ' ghcr.io/openmined/bioscript:0.1.4'
4042 publishDir params. results_dir, mode: ' copy' , overwrite: true , pattern: ' result_APOL1_*.tsv'
4143 tag { participant_id }
44+ errorStrategy { params. nextflow. error_strategy }
45+ maxRetries { params. nextflow. max_retries }
4246
4347 input:
4448 tuple path(assets_dir), val(participant_id), path(genotype_file)
@@ -47,9 +51,10 @@ process apol1_classifier {
4751 path " result_APOL1_${ participant_id} .tsv"
4852
4953 script:
50- def filename = genotype_file. name
54+ def genoFileName = genotype_file. getName()
5155 """
52- bioscript classify "${ {assets_dir}} /classify_apol1.py" --file "${ filename} " --participant_id "${ {participant_id}} "
56+ GENO_FILE=\$ (printf '%q' "${ genoFileName} ")
57+ bioscript classify "${ assets_dir} /classify_apol1.py" --file \$ GENO_FILE --participant_id "${ participant_id} "
5358 """
5459}
5560
@@ -64,13 +69,9 @@ process aggregate_results {
6469 path " result_APOL1.tsv"
6570
6671 script:
72+ def manifestContent = individual_results. collect { it. toString() }. join(' \n ' ) + ' \n '
6773 """
68- # Extract header from first file
69- head -n 1 ${ individual_results[0]} > result_APOL1.tsv
70-
71- # Append all data rows (skip headers)
72- for file in ${ individual_results} ; do
73- tail -n +2 "\$ file" >> result_APOL1.tsv
74- done
74+ cat <<'EOF' > results.list\n ${ manifestContent} EOF
75+ bioscript combine --list results.list --output result_APOL1.tsv
7576 """
7677}
0 commit comments