Skip to content

Commit 1f38063

Browse files
authored
Merge pull request #113 from apeltzer/files_in_channels
Files in channels (follow best practices)
2 parents 170e016 + 07e7ec6 commit 1f38063

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## [Unpublished / Dev Branch]
88

9+
### `Added`
10+
* [#113](https://github.com/nf-core/eager/pull/113) - All files are now staged via channels, which is considered best practice by Nextflow.
11+
912
### `Fixed`
1013
* [#110](https://github.com/nf-core/eager/pull/110) - Fix for [MultiQC Missing Second FastQC report](https://github.com/nf-core/eager/issues/107)
1114

main.nf

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,10 @@ params.bamutils_softclip = false
211211

212212

213213

214-
multiqc_config = file(params.multiqc_config)
215-
output_docs = file("$baseDir/docs/output.md")
216-
wherearemyfiles = file("$baseDir/assets/where_are_my_files.txt")
214+
ch_multiqc_config = Channel.fromPath(params.multiqc_config)
215+
ch_output_docs = Channel.fromPath("$baseDir/docs/output.md")
216+
Channel.fromPath("$baseDir/assets/where_are_my_files.txt")
217+
.into{ ch_where_for_bwa_index; ch_where_for_fasta_index; ch_where_for_seqdict}
217218

218219
// Validate inputs
219220
Channel.fromPath("${params.fasta}")
@@ -390,7 +391,7 @@ process makeBWAIndex {
390391

391392
input:
392393
file fasta from ch_fasta_for_bwa_indexing
393-
file wherearemyfiles
394+
file wherearemyfiles from ch_where_for_bwa_index
394395

395396
output:
396397
file "*.{amb,ann,bwt,pac,sa,fasta,fa}" into (ch_bwa_index,ch_bwa_index_bwamem)
@@ -417,7 +418,7 @@ process makeFastaIndex {
417418

418419
input:
419420
file fasta from ch_fasta_for_faidx_indexing
420-
file wherearemyfiles
421+
file wherearemyfiles from ch_where_for_fasta_index
421422

422423
output:
423424
file "${fasta}.fai" into ch_fasta_faidx_index
@@ -447,7 +448,7 @@ process makeSeqDict {
447448

448449
input:
449450
file fasta from ch_fasta_for_dict_indexing
450-
file wherearemyfiles
451+
file wherearemyfiles from ch_where_for_seqdict
451452

452453
output:
453454
file "*.dict" into ch_seq_dict
@@ -1009,7 +1010,7 @@ process multiqc {
10091010
publishDir "${params.outdir}/MultiQC", mode: 'copy'
10101011

10111012
input:
1012-
file multiqc_config
1013+
file multiqc_config from ch_multiqc_config.collect().ifEmpty([])
10131014
file ('fastqc_raw/*') from ch_fastqc_results.collect().ifEmpty([])
10141015
file('fastqc/*') from ch_fastqc_after_clipping.collect().ifEmpty([])
10151016
file ('software_versions/*') from software_versions_yaml.collect().ifEmpty([])
@@ -1045,7 +1046,7 @@ process output_documentation {
10451046
publishDir "${params.outdir}/Documentation", mode: 'copy'
10461047

10471048
input:
1048-
file output_docs
1049+
file output_docs from ch_output_docs
10491050

10501051
output:
10511052
file "results_description.html"

0 commit comments

Comments
 (0)