Skip to content

Commit 7b4d132

Browse files
authored
Merge pull request #16 from OpenMined/keelan/path-handling
update path handling
2 parents 7912cb4 + 9638d4d commit 7b4d132

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

examples/apol1/apol1-classifier/workflow.nf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ process apol1_classifier {
4747
path "result_APOL1_${participant_id}.tsv"
4848

4949
script:
50+
def genoFileName = genotype_file.getName()
5051
"""
51-
bioscript classify "${assets_dir}/classify_apol1.py" --file "${genotype_file}" --participant_id "${participant_id}"
52+
GENO_FILE=$(printf '%q' "${{genoFileName}}")
53+
bioscript classify "${{assets_dir}}/classify_apol1.py" --file $GENO_FILE --participant_id "${{participant_id}}"
5254
"""
5355
}
5456

examples/brca/brca-classifier/workflow.nf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ process brca_classifier {
4747
path "result_BRCA_${participant_id}.tsv"
4848

4949
script:
50+
def genoFileName = genotype_file.getName()
5051
"""
51-
bioscript classify "${assets_dir}/classify_brca.py" --file "${genotype_file}" --participant_id "${participant_id}"
52+
GENO_FILE=$(printf '%q' "${{genoFileName}}")
53+
bioscript classify "${{assets_dir}}/classify_brca.py" --file $GENO_FILE --participant_id "${{participant_id}}"
5254
"""
5355
}
5456

examples/herc2/herc2-classifier/workflow.nf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ process herc2_classifier {
4747
path "result_HERC2_${participant_id}.tsv"
4848

4949
script:
50+
def genoFileName = genotype_file.getName()
5051
"""
51-
bioscript classify "${assets_dir}/classify_herc2.py" --file "${genotype_file}" --participant_id "${participant_id}"
52+
GENO_FILE=$(printf '%q' "${{genoFileName}}")
53+
bioscript classify "${{assets_dir}}/classify_herc2.py" --file $GENO_FILE --participant_id "${{participant_id}}"
5254
"""
5355
}
5456

python/src/bioscript/biovault.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,8 +647,10 @@ def aggregated = aggregate_results(
647647
path "result_{classifier_name}_${{participant_id}}.tsv"
648648
649649
script:
650+
def genoFileName = genotype_file.getName()
650651
"""
651-
bioscript classify "${{assets_dir}}/{workflow_script_asset}" --file "${{genotype_file}}" --participant_id "${{participant_id}}"
652+
GENO_FILE=$(printf '%q' "${{genoFileName}}")
653+
bioscript classify "${{assets_dir}}/{workflow_script_asset}" --file $GENO_FILE --participant_id "${{participant_id}}"
652654
"""
653655
}}
654656

0 commit comments

Comments
 (0)