Skip to content

Commit

Permalink
Merge pull request #1406 from maxulysse/improve_samplesheetToList
Browse files Browse the repository at this point in the history
FIX: Keep only one samplesheetToList
  • Loading branch information
maxulysse authored Oct 11, 2024
2 parents 08dbcc9 + 141c15a commit 7794c69
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 25 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Special thanks to the following for their contributions to the release:
- [PR #1398](https://github.com/nf-core/rnaseq/pull/1398) - Bump pipeline version to 3.17.0dev
- [PR #1401](https://github.com/nf-core/rnaseq/pull/1401) - Template update for nf-core/tools v3.0.1
- [PR #1405](https://github.com/nf-core/rnaseq/pull/1405) - Fix bad variable name in subworkflow
- [PR #1406](https://github.com/nf-core/rnaseq/pull/1406) - Keep only one samplesheetToList

### Parameters

Expand Down
22 changes: 0 additions & 22 deletions subworkflows/local/utils_nfcore_rnaseq_pipeline/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import groovy.json.JsonSlurper

include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin'
include { paramsSummaryMap } from 'plugin/nf-schema'
include { samplesheetToList } from 'plugin/nf-schema'
include { completionEmail } from '../../nf-core/utils_nfcore_pipeline'
include { completionSummary } from '../../nf-core/utils_nfcore_pipeline'
include { imNotification } from '../../nf-core/utils_nfcore_pipeline'
Expand Down Expand Up @@ -71,28 +70,7 @@ workflow PIPELINE_INITIALISATION {
//
validateInputParameters()

//
// 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 {
checkSamplesAfterGrouping(it)
}
.set{ ch_samplesheet }

emit:
samplesheet = ch_samplesheet
versions = ch_versions
}

Expand Down
6 changes: 3 additions & 3 deletions workflows/rnaseq/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ workflow RNASEQ {
}
}
.groupTuple()
.map {
checkSamplesAfterGrouping(it)
.map { samplesheet ->
checkSamplesAfterGrouping(samplesheet)
}
.set{ ch_fastq }
.set { ch_fastq }

//
// Run RNA-seq FASTQ preprocessing subworkflow
Expand Down

0 comments on commit 7794c69

Please sign in to comment.