view nf/subworkflows/ncbi/gnomon/diamond/main.nf @ 6:a7304162d737 draft

planemo upload for repository https://github.com/ncbi/egapx commit 9e59da535540cb4d5c1c412bb2b0969744dfb0b0-dirty
author fubar
date Sun, 04 Aug 2024 02:30:36 +0000
parents d9c5c5b87fec
children
line wrap: on
line source

#!/usr/bin/env nextflow
nextflow.enable.dsl=2

include { merge_params; to_map; shellSplit } from '../../utilities'
include { run_diamond_egap;} from '../../shared/diamond/main'


workflow diamond_worker {
    take:
        gnomon_prot_ids
        swiss_prot_ids
        gnomon_prot_asn
        swiss_prot_asn
        parameters  // Map : extra parameter and parameter update
    main:
        String diamond_blastp_params = merge_params('--sam-query-len --very-sensitive --unal 0 --comp-based-stats 0 --masking 0', parameters, 'diamond_blastp')
        String diamond_regular_params = merge_params('-ofmt seq-align-set -query-fmt seq-ids -subject-fmt seq-ids -output-prefix hits', parameters, 'diamond')
        String diamond_egap_params = '-blastp-args \''  + diamond_blastp_params + '\' '  + diamond_regular_params
        
        run_diamond_egap(gnomon_prot_ids, swiss_prot_ids, gnomon_prot_asn, swiss_prot_asn, diamond_egap_params)

    emit:
        alignments = run_diamond_egap.out
}