@@ -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
0 commit comments