Skip to content

Commit 996d101

Browse files
committed
Export versions and pass to MultiQC
1 parent 3857223 commit 996d101

4 files changed

Lines changed: 14 additions & 1 deletion

File tree

conf/modules.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ process {
6060
publishDir = [
6161
path: { "${params.outdir}/reference/${meta.id}/" },
6262
mode: params.publish_dir_mode,
63-
pattern: 'bowtie2',
63+
pattern: 'bowtie2/',
6464
enabled: params.save_reference
6565
]
6666
}

subworkflows/local/reference_indexing.nf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,22 @@ workflow REFERENCE_INDEXING {
1313
fasta_mapperindexdir
1414

1515
main:
16+
ch_versions = Channel.empty()
1617

1718
// TODO add WARN: if fasta.ext == csv && fai/dict/mapperindexdir supplied, then latter will be ignored with preference for info in csv!
1819

1920
if ( fasta_fai && fasta_dict && fasta_mapperindexdir ) {
2021
// TODO: if all are supplied
2122
} else if ( fasta.extension == 'csv' | fasta.extension == 'tsv' ) {
2223
ch_reference_for_mapping = REFERENCE_INDEXING_MULTI ( fasta ).reference
24+
ch_versions = ch_versions.mix( REFERENCE_INDEXING_MULTI.out.versions )
2325
} else {
2426
ch_reference_for_mapping = REFERENCE_INDEXING_SINGLE ( fasta, fasta_fai, fasta_dict, fasta_mapperindexdir ).reference
27+
ch_versions = ch_versions.mix( REFERENCE_INDEXING_SINGLE.out.versions )
2528
}
2629

2730
emit:
2831
reference = ch_reference_for_mapping // [ meta, fasta, fai, dict, mapindex ]
32+
versions = ch_versions
2933

3034
}

subworkflows/local/reference_indexing_single.nf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ workflow REFERENCE_INDEXING_SINGLE {
1919

2020
main:
2121

22+
ch_versions = Channel.empty()
23+
2224
def fasta_ext = grab_ungzipped_extension(fasta)
2325
def clean_name = fasta.name.toString() - fasta_ext
2426

@@ -29,20 +31,23 @@ workflow REFERENCE_INDEXING_SINGLE {
2931
ch_gz_ref = Channel.fromPath(fasta).map{[[], it]}
3032
GUNZIP ( ch_gz_ref )
3133
ch_ungz_ref = GUNZIP.out.gunzip.map{[[id: clean_name], it[1] ]}
34+
ch_versions = ch_versions.mix( GUNZIP.out.versions )
3235
} else {
3336
ch_ungz_ref = Channel.fromPath(fasta).map{[[id: clean_name], it ]}
3437
}
3538

3639
// Generate FAI if not supplied, and if supplied generate meta ID
3740
if ( !fasta_fai ) {
3841
ch_fasta_fai = SAMTOOLS_FAIDX ( ch_ungz_ref ).fai.map{[ [id: clean_name - '.fai'], it[1] ] }
42+
ch_versions = ch_versions.mix( SAMTOOLS_FAIDX.out.versions )
3943
} else {
4044
ch_fasta_fai = Channel.fromPath(fasta_fai).map{[[id: clean_name], it ]}
4145
}
4246

4347
// Generate DICT if not supplied, and if supplied generate meta
4448
if ( !fasta_dict ) {
4549
ch_fasta_dict = PICARD_CREATESEQUENCEDICTIONARY ( ch_ungz_ref ).reference_dict.map{[ [id: clean_name - '.fai'], it[1] ] }
50+
ch_versions = ch_versions.mix( PICARD_CREATESEQUENCEDICTIONARY.out.versions )
4651
} else {
4752
ch_fasta_dict = Channel.fromPath(ch_fasta_dict).map{[[id: clean_name], it ]}
4853
}
@@ -52,6 +57,7 @@ workflow REFERENCE_INDEXING_SINGLE {
5257

5358
if ( !fasta_mapperindexdir ) {
5459
ch_fasta_mapperindexdir = BWA_INDEX ( ch_ungz_ref ).index
60+
ch_versions = ch_versions.mix( BWA_INDEX.out.versions )
5561
} else {
5662
ch_fasta_mapperindexdir = Channel.fromPath(fasta_mapperindexdir).map{[[id: clean_name], it ]}
5763
}
@@ -60,6 +66,7 @@ workflow REFERENCE_INDEXING_SINGLE {
6066

6167
if ( !fasta_mapperindexdir ) {
6268
ch_fasta_mapperindexdir = BOWTIE2_BUILD ( ch_ungz_ref ).index
69+
ch_versions = ch_versions.mix( BOWTIE2_BUILD.out.versions )
6370
} else {
6471
ch_fasta_mapperindexdir = Channel.fromPath(fasta_mapperindexdir).map{[[id: clean_name], it ]}
6572
}
@@ -75,6 +82,7 @@ workflow REFERENCE_INDEXING_SINGLE {
7582

7683
emit:
7784
reference = ch_reference_for_mapping // [ meta, fasta, fai, dict, mapindex ]
85+
versions = ch_versions
7886

7987
}
8088

workflows/eager.nf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ workflow EAGER {
8989
//
9090

9191
REFERENCE_INDEXING ( fasta, fasta_fai, fasta_dict, fasta_mapperindexdir )
92+
ch_versions = ch_versions.mix( REFERENCE_INDEXING.out.versions )
9293

9394
//
9495
// MODULE: Run FastQC

0 commit comments

Comments
 (0)