Skip to content

Commit 6552b91

Browse files
committed
Set to string all id
1 parent 4e85b3b commit 6552b91

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2525
- [#179](https://github.com/nf-core/phaseimpute/pull/179) - Fix VCF usage in `GLIMPSE2`.
2626
- [#183](https://github.com/nf-core/phaseimpute/pull/183) - Remove wrongfully added files in `BAM_EXTRACT_REGION_SAMTOOLS`.
2727
- [#185](https://github.com/nf-core/phaseimpute/pull/185) - Fix CSV generation and check that all mentioned path files exist.
28+
- [#189](https://github.com/nf-core/phaseimpute/pull/189) - Set meta map id as string to avoid error when using numbers in csv files.
2829

2930
## v1.0.0 - Black Labrador [2024-12-09]
3031

subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ workflow PIPELINE_INITIALISATION {
134134
.fromList(samplesheetToList(params.input_truth, "${projectDir}/assets/schema_input.json"))
135135
.map {
136136
meta, file, index ->
137-
[ meta, file, index ]
137+
[ meta + [id:meta.id.toString()], file, index ]
138138
}
139139
// Check if all extension are identical
140140
getFilesSameExt(ch_input_truth)
@@ -154,7 +154,10 @@ workflow PIPELINE_INITIALISATION {
154154
println "Panel file provided as input is a samplesheet"
155155
ch_panel = Channel.fromList(samplesheetToList(
156156
params.panel, "${projectDir}/assets/schema_input_panel.json"
157-
))
157+
)).map {
158+
meta, chr, file, index ->
159+
[ meta + [id:meta.id.toString()], chr, file, index ]
160+
}
158161
} else {
159162
// #TODO Wait for `oneOf()` to be supported in the nextflow_schema.json
160163
error "Panel file provided is of another format than CSV (not yet supported). Please separate your panel by chromosome and use the samplesheet format."
@@ -223,8 +226,11 @@ workflow PIPELINE_INITIALISATION {
223226
// Create posfile channel
224227
//
225228
if (params.posfile) {
226-
ch_posfile = Channel // ["panel", "chr", "vcf", "index", "hap", "legend"]
229+
ch_posfile = Channel // ["meta", "chr", "vcf", "index", "hap", "legend"]
227230
.fromList(samplesheetToList(params.posfile, "${projectDir}/assets/schema_posfile.json"))
231+
.map { meta, chr, vcf, index, hap, legend ->
232+
[ meta + [id:meta.id.toString()], chr, vcf, index, hap, legend ]
233+
}
228234
} else {
229235
ch_posfile = Channel.of([[],[],[],[],[]])
230236
}
@@ -243,6 +249,9 @@ workflow PIPELINE_INITIALISATION {
243249
if (params.chunks) {
244250
ch_chunks = Channel
245251
.fromList(samplesheetToList(params.chunks, "${projectDir}/assets/schema_chunks.json"))
252+
.map { meta, chr, chunks ->
253+
[ meta + [id:meta.id.toString()], chr, chunks ]
254+
}
246255
} else {
247256
ch_chunks = Channel.of([[],[]])
248257
}

0 commit comments

Comments
 (0)