Skip to content

Commit

Permalink
Template update to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
DLBPointon committed Feb 7, 2025
1 parent 37a26e4 commit a27fed3
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions subworkflows/local/utils_nfcore_ear_pipeline/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -67,28 +67,28 @@ workflow PIPELINE_INITIALISATION {
// Create channel from input file provided through params.input
//

Channel
.fromList(samplesheetToList(params.input, "${projectDir}/assets/schema_input.json"))
.map {
meta, fastq_1, fastq_2 ->
if (!fastq_2) {
return [ meta.id, meta + [ single_end:true ], [ fastq_1 ] ]
} else {
return [ meta.id, meta + [ single_end:false ], [ fastq_1, fastq_2 ] ]
}
}
.groupTuple()
.map { samplesheet ->
validateInputSamplesheet(samplesheet)
}
.map {
meta, fastqs ->
return [ meta, fastqs.flatten() ]
}
.set { ch_samplesheet }
// Channel
// .fromList(samplesheetToList(params.input, "${projectDir}/assets/schema_input.json"))
// .map {
// meta, fastq_1, fastq_2 ->
// if (!fastq_2) {
// return [ meta.id, meta + [ single_end:true ], [ fastq_1 ] ]
// } else {
// return [ meta.id, meta + [ single_end:false ], [ fastq_1, fastq_2 ] ]
// }
// }
// .groupTuple()
// .map { samplesheet ->
// validateInputSamplesheet(samplesheet)
// }
// .map {
// meta, fastqs ->
// return [ meta, fastqs.flatten() ]
// }
// .set { ch_samplesheet }

emit:
samplesheet = ch_samplesheet
samplesheet = params.input
versions = ch_versions
}

Expand Down

0 comments on commit a27fed3

Please sign in to comment.