Skip to content

Commit 54ec4ec

Browse files
JmSchererwilkb777
andauthored
Update pipeline.nf
Co-authored-by: Brandon M Wilk <[email protected]>
1 parent 9b7a691 commit 54ec4ec

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

pipeline.nf

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,21 @@ process prediction {
8585
// Each file in the channel will be processed through the steps defined above.
8686
workflow {
8787
// Define input channels for the VCF files
88-
vcfFile = Channel.fromPath(params.sample_sheet).splitCsv(header: false)
88+
vcfFile = Channel.fromPath(params.sample_sheet)
89+
.splitText() // Emit each line as a separate item
90+
.map { line ->
91+
// For each line (relative path), create a Nextflow file object relative to params.data_dir
92+
if (line.startsWith("/")){
93+
return line.trim()
94+
} else {
95+
def abs_path = file(workflow.launchDir).resolve(line.trim())
96+
return abs_path
97+
}
98+
}
99+
.map { path_obj ->
100+
// Ensure the path is a proper Path object for staging
101+
file(path_obj, checkIfExists: true)
102+
}
89103
vcfBuild = params.build
90104
oc_mod_path = params.oc_modules
91105

0 commit comments

Comments
 (0)