-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update msa_alignment subworkflow to not use conditional includes
- Loading branch information
Showing
1 changed file
with
45 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,57 @@ | ||
if ( params.aligner == "clustalo/align" ) { | ||
include { CLUSTALO_ALIGN as ALIGNER } from '../../../modules/mirpedrol/clustalo/align/main' | ||
} else if ( params.aligner == "famsa/align" ) { | ||
include { FAMSA_ALIGN as ALIGNER } from '../../../modules/mirpedrol/famsa/align/main' | ||
} else if ( params.aligner == "kalign/align" ) { | ||
include { KALIGN_ALIGN as ALIGNER } from '../../../modules/mirpedrol/kalign/align/main' | ||
} else if ( params.aligner == "learnmsa/align" ) { | ||
include { LEARNMSA_ALIGN as ALIGNER } from '../../../modules/mirpedrol/learnmsa/align/main' | ||
} else if ( params.aligner == "mafft" ) { | ||
include { MAFFT as ALIGNER } from '../../../modules/mirpedrol/mafft/main' | ||
} else if ( params.aligner == "magus/align" ) { | ||
include { MAGUS_ALIGN as ALIGNER } from '../../../modules/mirpedrol/magus/align/main' | ||
} else if ( params.aligner == "muscle5/super5" ) { | ||
include { MUSCLE5_SUPER5 as ALIGNER } from '../../../modules/mirpedrol/muscle5/super5/main' | ||
} else if ( params.aligner == "tcoffee/align" ) { | ||
include { TCOFFEE_ALIGN as ALIGNER } from '../../../modules/mirpedrol/tcoffee/align/main' | ||
} | ||
include { CLUSTALO_ALIGN } from '../../../modules/mirpedrol/clustalo/align/main' | ||
include { FAMSA_ALIGN } from '../../../modules/mirpedrol/famsa/align/main' | ||
include { KALIGN_ALIGN } from '../../../modules/mirpedrol/kalign/align/main' | ||
include { LEARNMSA_ALIGN } from '../../../modules/mirpedrol/learnmsa/align/main' | ||
include { MAFFT } from '../../../modules/mirpedrol/mafft/main' | ||
include { MAGUS_ALIGN } from '../../../modules/mirpedrol/magus/align/main' | ||
include { MUSCLE5_SUPER5 } from '../../../modules/mirpedrol/muscle5/super5/main' | ||
include { TCOFFEE_ALIGN } from '../../../modules/mirpedrol/tcoffee/align/main' | ||
|
||
workflow MSA_ALIGNMENT { | ||
|
||
take: | ||
ch_fasta // channel: [ meta, fasta ] | ||
|
||
main: | ||
def ch_out_alignment = Channel.empty() | ||
def ch_versions = Channel.empty() | ||
|
||
ch_versions = Channel.empty() | ||
|
||
ALIGNER ( ch_fasta ) | ||
ch_versions = ch_versions.mix(ALIGNER.out.versions.first()) | ||
if ( params.aligner == "clustalo/align" ) { | ||
CLUSTALO_ALIGN( ch_fasta ) | ||
ch_out_alignment = ch_out_alignment.mix(CLUSTALO_ALIGN.out.alignment) | ||
ch_versions = ch_versions.mix(CLUSTALO_ALIGN.out.versions.first()) | ||
} else if ( params.aligner == "famsa/align" ) { | ||
FAMSA_ALIGN( ch_fasta ) | ||
ch_out_alignment = ch_out_alignment.mix(FAMSA_ALIGN.out.alignment) | ||
ch_versions = ch_versions.mix(FAMSA_ALIGN.out.versions.first()) | ||
} else if ( params.aligner == "kalign/align" ) { | ||
KALIGN_ALIGN( ch_fasta ) | ||
ch_out_alignment = ch_out_alignment.mix(KALIGN_ALIGN.out.alignment) | ||
ch_versions = ch_versions.mix(KALIGN_ALIGN.out.versions.first()) | ||
} else if ( params.aligner == "learnmsa/align" ) { | ||
LEARNMSA_ALIGN( ch_fasta ) | ||
ch_out_alignment = ch_out_alignment.mix(LEARNMSA_ALIGN.out.alignment) | ||
ch_versions = ch_versions.mix(LEARNMSA_ALIGN.out.versions.first()) | ||
} else if ( params.aligner == "mafft" ) { | ||
MAFFT( ch_fasta ) | ||
ch_out_alignment = ch_out_alignment.mix(MAFFT.out.alignment) | ||
ch_versions = ch_versions.mix(MAFFT.out.versions.first()) | ||
} else if ( params.aligner == "magus/align" ) { | ||
MAGUS_ALIGN( ch_fasta ) | ||
ch_out_alignment = ch_out_alignment.mix(MAGUS_ALIGN.out.alignment) | ||
ch_versions = ch_versions.mix(MAGUS_ALIGN.out.versions.first()) | ||
} else if ( params.aligner == "muscle5/super5" ) { | ||
MUSCLE5_SUPER5( ch_fasta ) | ||
ch_out_alignment = ch_out_alignment.mix(MUSCLE5_SUPER5.out.alignment) | ||
ch_versions = ch_versions.mix(MUSCLE5_SUPER5.out.versions.first()) | ||
} else if ( params.aligner == "tcoffee/align" ) { | ||
TCOFFEE_ALIGN( ch_fasta ) | ||
ch_out_alignment = ch_out_alignment.mix(TCOFFEE_ALIGN.out.alignment) | ||
ch_versions = ch_versions.mix(TCOFFEE_ALIGN.out.versions.first()) | ||
} | ||
|
||
emit: | ||
alignment = ALIGNER.out.alignment // channel: [ meta, *.aln.gz ] | ||
versions = ch_versions // channel: [ versions.yml ] | ||
alignment = ch_out_alignment // channel: [ meta, *.aln.gz ] | ||
versions = ch_versions // channel: [ versions.yml ] | ||
} | ||
|