view nf/subworkflows/ncbi/default/annotwriter/main.nf @ 8:1680e72e27be draft default tip

planemo upload for repository https://github.com/ncbi/egapx commit bdbe05027c2c40e217a2ff0c9e0556450c443e54
author fubar
date Mon, 05 Aug 2024 03:56:41 +0000
parents d9c5c5b87fec
children
line wrap: on
line source

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


workflow annotwriter {
    take:
        accept_asn_file  // Channel: accept.asn file
        parameters     // Map : extra parameter and parameter update
    main:
        c =  run_annotwriter(accept_asn_file)
    emit:
        annoted_file = c
}


process run_annotwriter {
    input:
        path accept_asn_file
    output:
        path ('output/accept.gff'), emit: 'annoted_file'

    script:
    """
    mkdir -p output
    if [ -s ${accept_asn_file} ]; then
        annotwriter -i ${accept_asn_file} -nogenbank -format gff3 -o output/accept.gff
    else
        touch output/accept.gff
    fi
    """

    stub:
    """
    mkdir -p output
    echo "1"  > output/accept.gff
    """
}