name: agat_convert_sp_gff2gtf
namespace: agat
description: |
  The script aims to convert any GTF/GFF file into a proper GTF file. Full
  information about the format can be found here:
  https://agat.readthedocs.io/en/latest/gxf.html You can choose among 7
  different GTF types (1, 2, 2.1, 2.2, 2.5, 3 or relax). Depending the
  version selected the script will filter out the features that are not
  accepted. For GTF2.5 and 3, every level1 feature (e.g nc_gene
  pseudogene) will be converted into gene feature and every level2 feature
  (e.g mRNA ncRNA) will be converted into transcript feature. Using the
  "relax" option you will produce a GTF-like output keeping all original
  feature types (3rd column). No modification will occur e.g. mRNA to
  transcript.

  To be fully GTF compliant all feature have a gene_id and a transcript_id
  attribute. The gene_id is unique identifier for the genomic source of
  the transcript, which is used to group transcripts into genes. The
  transcript_id is a unique identifier for the predicted transcript, which
  is used to group features into transcripts.
keywords: [gene annotations, GTF conversion]
links:
  homepage: https://github.com/NBISweden/AGAT
  documentation: https://agat.readthedocs.io/
  issue_tracker: https://github.com/NBISweden/AGAT/issues
  repository: https://github.com/NBISweden/AGAT
references: 
  doi: 10.5281/zenodo.3552717
license: GPL-3.0
requirements:
  commands: ["agat_convert_sp_gff2gtf.pl"]
authors:
  - __merge__: /src/_authors/leila_paquay.yaml
    roles: [ author, maintainer ]
argument_groups:
  - name: Inputs
    arguments:
      - name: --gff
        alternatives: [-i]
        description: Input GFF/GTF file that will be read
        type: file
        required: true
        direction: input
        example: input.gff
  - name: Outputs
    arguments:       
      - name: --output
        alternatives: [-o, --out, --outfile, --gtf]
        description: Output GTF file. If no output file is specified, the output will be written to STDOUT.
        type: file
        direction: output
        required: true
        example: output.gtf
  - name: Arguments
    arguments:
      - name: --gtf_version
        description: |
          Version of the GTF output (1,2,2.1,2.2,2.5,3 or relax). Default value from AGAT config file (relax for the default config). The script option has the higher priority.  
          
            * relax: all feature types are accepted.  
            * GTF3 (9 feature types accepted): gene, transcript, exon, CDS, Selenocysteine, start_codon, stop_codon, three_prime_utr and five_prime_utr.  
            * GTF2.5 (8 feature types accepted): gene, transcript, exon, CDS, UTR, start_codon, stop_codon, Selenocysteine.  
            * GTF2.2 (9 feature types accepted): CDS, start_codon, stop_codon, 5UTR, 3UTR, inter, inter_CNS, intron_CNS and exon.  
            * GTF2.1 (6 feature types accepted): CDS, start_codon, stop_codon, exon, 5UTR, 3UTR.  
            * GTF2 (4 feature types accepted): CDS, start_codon, stop_codon, exon.  
            * GTF1 (5 feature types accepted): CDS, start_codon, stop_codon, exon, intron.  
        type: string
        choices: [relax, "1", "2", "2.1", "2.2", "2.5", "3"]
        required: false
        example: "3"
      - name: --config
        alternatives: [-c]
        description: |
          Input agat config file. By default AGAT takes as input agat_config.yaml file from the working directory if any, otherwise it takes the orignal agat_config.yaml shipped with AGAT. To get the agat_config.yaml locally type: "agat config --expose". The --config option gives you the possibility to use your own AGAT config file (located elsewhere or named differently).
        type: file
        required: false
        example: custom_agat_config.yaml
resources:
  - type: bash_script
    path: script.sh
test_resources:
  - type: bash_script
    path: test.sh
  - type: file
    path: test_data
engines:
  - type: docker
    image: quay.io/biocontainers/agat:1.4.0--pl5321hdfd78af_0
    setup:
      - type: docker
        run: |
          agat --version | sed 's/AGAT\s\(.*\)/agat: "\1"/' > /var/software_versions.txt
runners:
  - type: executable
  - type: nextflow