Skip to content

Commit

Permalink
Added gunzip for additional annot too
Browse files Browse the repository at this point in the history
  • Loading branch information
svarona committed Jan 18, 2024
1 parent 257ed47 commit ea073b5
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion subworkflows/local/additional_annot.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Run snpEff, bgzip, tabix, stats and SnpSift commands
//

include { GUNZIP as GUNZIP_GFF } from '../../modules/nf-core/gunzip/main'
include { SNPEFF_BUILD } from '../../modules/local/snpeff_build'
include { SNPEFF_ANN } from '../../modules/local/snpeff_ann'
include { SNPSIFT_EXTRACTFIELDS } from '../../modules/local/snpsift_extractfields'
Expand All @@ -22,6 +23,21 @@ workflow ADDITIONAL_ANNOT {

ch_versions = Channel.empty()

//
// Uncompress additional annotation file
//
ch_annot = Channel.empty()

if (params.additional_annot.endsWith('.gz')) {
GUNZIP_GFF (
[ [:], annot ]
)
ch_annot = GUNZIP_GFF.out.gunzip.map { it[1] }
ch_versions = ch_versions.mix(GUNZIP_GFF.out.versions)
} else {
ch_annot = Channel.value(file(params.additional_annot))
}

//
// Make snpEff database
//
Expand All @@ -30,7 +46,7 @@ workflow ADDITIONAL_ANNOT {

SNPEFF_BUILD (
fasta,
annot
ch_annot
)
ch_snpeff_db = SNPEFF_BUILD.out.db
ch_snpeff_config = SNPEFF_BUILD.out.config
Expand Down

0 comments on commit ea073b5

Please sign in to comment.