Skip to content

Commit

Permalink
fix dict channel issue when using --dict
Browse files Browse the repository at this point in the history
  • Loading branch information
maxulysse committed May 25, 2023
1 parent 9b933a1 commit f26f49b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#1014](https://github.com/nf-core/sarek/pull/1014) - Fix calls to `ensemblvep` and `snpeff` containers
- [#1022](https://github.com/nf-core/sarek/pull/1022) - Fix call to variantrecalibrator. (Making sure that dbsnp_vqsr, known_indels_vqsr and known_snps_vqsr are channels, and not strings.)
- [#1039](https://github.com/nf-core/sarek/pull/1039) - Remove concatenate_vcfs tests with singularity, as they are failing due to not enough space on GHA runners
- [#1040](https://github.com/nf-core/sarek/pull/1040) - Fix dict channel issue due to [#1032](https://github.com/nf-core/sarek/pull/1032)

### Deprecated

Expand Down
17 changes: 11 additions & 6 deletions workflows/sarek.nf
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,17 @@ workflow SAREK {

// Gather built indices or get them from the params
// Built from the fasta file:
dict = params.dict ? Channel.fromPath(params.dict).collect() : PREPARE_GENOME.out.dict
fasta_fai = params.fasta_fai ? Channel.fromPath(params.fasta_fai).collect() : PREPARE_GENOME.out.fasta_fai

bwa = params.bwa ? Channel.fromPath(params.bwa).collect() : PREPARE_GENOME.out.bwa
bwamem2 = params.bwamem2 ? Channel.fromPath(params.bwamem2).collect() : PREPARE_GENOME.out.bwamem2
dragmap = params.dragmap ? Channel.fromPath(params.dragmap).collect() : PREPARE_GENOME.out.hashtable
dict = params.dict ? Channel.fromPath(params.dict).map{ it -> [ [id:'dict'], it ] }.collect()
: PREPARE_GENOME.out.dict
fasta_fai = params.fasta_fai ? Channel.fromPath(params.fasta_fai).collect()
: PREPARE_GENOME.out.fasta_fai

bwa = params.bwa ? Channel.fromPath(params.bwa).collect()
: PREPARE_GENOME.out.bwa
bwamem2 = params.bwamem2 ? Channel.fromPath(params.bwamem2).collect()
: PREPARE_GENOME.out.bwamem2
dragmap = params.dragmap ? Channel.fromPath(params.dragmap).collect()
: PREPARE_GENOME.out.hashtable
// Gather index for mapping given the chosen aligner
index_alignement = params.aligner == "bwa-mem" ? bwa :
params.aligner == "bwa-mem2" ? bwamem2 :
Expand Down

0 comments on commit f26f49b

Please sign in to comment.