From 4e6ede854c9ee6f588d9369d4d7147203e92a513 Mon Sep 17 00:00:00 2001 From: Leila011 Date: Fri, 7 Jun 2024 15:03:20 +0200 Subject: [PATCH 01/25] Fill in the metadata --- .../agat_convertspgff2gtf/config.vsh.yaml | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/agat/agat_convertspgff2gtf/config.vsh.yaml diff --git a/src/agat/agat_convertspgff2gtf/config.vsh.yaml b/src/agat/agat_convertspgff2gtf/config.vsh.yaml new file mode 100644 index 00000000..acf4e309 --- /dev/null +++ b/src/agat/agat_convertspgff2gtf/config.vsh.yaml @@ -0,0 +1,32 @@ +name: agat_convertspgff2gtf +namespace: agat +description: AGAT is a toolkit for manipulation and getting information from GFF/GTF files +keywords: [tag1, tag2] +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 v3 +argument_groups: + - name: Inputs + arguments: <...> + - name: Outputs + arguments: <...> + - name: Arguments + arguments: <...> +resources: + - type: bash_script + path: script.sh +test_resources: + - type: bash_script + path: test.sh + - type: file + path: test_data +engines: + - <...> +runners: + - type: executable + - type: nextflow \ No newline at end of file From a72d08a31276685b51e122ff951a515e140e8767 Mon Sep 17 00:00:00 2001 From: Leila011 Date: Wed, 19 Jun 2024 09:36:34 +0200 Subject: [PATCH 02/25] add help.txt --- src/agat/agat_convertspgff2gtf/help.txt | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/agat/agat_convertspgff2gtf/help.txt diff --git a/src/agat/agat_convertspgff2gtf/help.txt b/src/agat/agat_convertspgff2gtf/help.txt new file mode 100644 index 00000000..20c0b61a --- /dev/null +++ b/src/agat/agat_convertspgff2gtf/help.txt @@ -0,0 +1,7 @@ +cat < src/agat/agat_convertspgff2gtf/help.txt +```sh +agat/agat_convertspgff2gtf --help +``` +EOF + +docker run quay.io/biocontainers/agat/agat_convertspgff2gtf:1.4.0--pl5321hdfd78af_0 agat/agat_convertspgff2gtf --help >> src/agat/agat_convertspgff2gtf/help.txt \ No newline at end of file From 7b3e329ab15ddaabc5dfe59faeb9ab2877a09ae6 Mon Sep 17 00:00:00 2001 From: Leila011 Date: Wed, 19 Jun 2024 10:18:43 +0200 Subject: [PATCH 03/25] add test data --- .../test_data/0_test.gff | 36 +++++++++++++++++++ .../agat_convertspgff2gtf/test_data/script.sh | 12 +++++++ 2 files changed, 48 insertions(+) create mode 100644 src/agat/agat_convertspgff2gtf/test_data/0_test.gff create mode 100755 src/agat/agat_convertspgff2gtf/test_data/script.sh diff --git a/src/agat/agat_convertspgff2gtf/test_data/0_test.gff b/src/agat/agat_convertspgff2gtf/test_data/0_test.gff new file mode 100644 index 00000000..fafe86ed --- /dev/null +++ b/src/agat/agat_convertspgff2gtf/test_data/0_test.gff @@ -0,0 +1,36 @@ +##gff-version 3 +scaffold625 maker gene 337818 343277 . + . ID=CLUHARG00000005458;Name=TUBB3_2 +scaffold625 maker mRNA 337818 343277 . + . ID=CLUHART00000008717;Parent=CLUHARG00000005458 +scaffold625 maker exon 337818 337971 . + . ID=CLUHART00000008717:exon:1404;Parent=CLUHART00000008717 +scaffold625 maker exon 340733 340841 . + . ID=CLUHART00000008717:exon:1405;Parent=CLUHART00000008717 +scaffold625 maker exon 341518 341628 . + . ID=CLUHART00000008717:exon:1406;Parent=CLUHART00000008717 +scaffold625 maker exon 341964 343277 . + . ID=CLUHART00000008717:exon:1407;Parent=CLUHART00000008717 +scaffold625 maker CDS 337915 337971 . + 0 ID=CLUHART00000008717:cds;Parent=CLUHART00000008717 +scaffold625 maker CDS 340733 340841 . + 0 ID=CLUHART00000008717:cds;Parent=CLUHART00000008717 +scaffold625 maker CDS 341518 341628 . + 2 ID=CLUHART00000008717:cds;Parent=CLUHART00000008717 +scaffold625 maker CDS 341964 343033 . + 2 ID=CLUHART00000008717:cds;Parent=CLUHART00000008717 +scaffold625 maker five_prime_UTR 337818 337914 . + . ID=CLUHART00000008717:five_prime_utr;Parent=CLUHART00000008717 +scaffold625 maker three_prime_UTR 343034 343277 . + . ID=CLUHART00000008717:three_prime_utr;Parent=CLUHART00000008717 +scaffold789 maker gene 558184 564780 . + . ID=CLUHARG00000003852;Name=PF11_0240 +scaffold789 maker mRNA 558184 564780 . + . ID=CLUHART00000006146;Parent=CLUHARG00000003852 +scaffold789 maker exon 558184 560123 . + . ID=CLUHART00000006146:exon:995;Parent=CLUHART00000006146 +scaffold789 maker exon 561401 561519 . + . ID=CLUHART00000006146:exon:996;Parent=CLUHART00000006146 +scaffold789 maker exon 564171 564235 . + . ID=CLUHART00000006146:exon:997;Parent=CLUHART00000006146 +scaffold789 maker exon 564372 564780 . + . ID=CLUHART00000006146:exon:998;Parent=CLUHART00000006146 +scaffold789 maker CDS 558191 560123 . + 0 ID=CLUHART00000006146:cds;Parent=CLUHART00000006146 +scaffold789 maker CDS 561401 561519 . + 2 ID=CLUHART00000006146:cds;Parent=CLUHART00000006146 +scaffold789 maker CDS 564171 564235 . + 0 ID=CLUHART00000006146:cds;Parent=CLUHART00000006146 +scaffold789 maker CDS 564372 564588 . + 1 ID=CLUHART00000006146:cds;Parent=CLUHART00000006146 +scaffold789 maker five_prime_UTR 558184 558190 . + . ID=CLUHART00000006146:five_prime_utr;Parent=CLUHART00000006146 +scaffold789 maker three_prime_UTR 564589 564780 . + . ID=CLUHART00000006146:three_prime_utr;Parent=CLUHART00000006146 +scaffold789 maker mRNA 558184 564780 . + . ID=CLUHART00000006147;Parent=CLUHARG00000003852 +scaffold789 maker exon 558184 560123 . + . ID=CLUHART00000006147:exon:997;Parent=CLUHART00000006147 +scaffold789 maker exon 561401 561519 . + . ID=CLUHART00000006147:exon:998;Parent=CLUHART00000006147 +scaffold789 maker exon 562057 562121 . + . ID=CLUHART00000006147:exon:999;Parent=CLUHART00000006147 +scaffold789 maker exon 564372 564780 . + . ID=CLUHART00000006147:exon:1000;Parent=CLUHART00000006147 +scaffold789 maker CDS 558191 560123 . + 0 ID=CLUHART00000006147:cds;Parent=CLUHART00000006147 +scaffold789 maker CDS 561401 561519 . + 2 ID=CLUHART00000006147:cds;Parent=CLUHART00000006147 +scaffold789 maker CDS 562057 562121 . + 0 ID=CLUHART00000006147:cds;Parent=CLUHART00000006147 +scaffold789 maker CDS 564372 564588 . + 1 ID=CLUHART00000006147:cds;Parent=CLUHART00000006147 +scaffold789 maker five_prime_UTR 558184 558190 . + . ID=CLUHART00000006147:five_prime_utr;Parent=CLUHART00000006147 +scaffold789 maker three_prime_UTR 564589 564780 . + . ID=CLUHART00000006147:three_prime_utr;Parent=CLUHART00000006147 diff --git a/src/agat/agat_convertspgff2gtf/test_data/script.sh b/src/agat/agat_convertspgff2gtf/test_data/script.sh new file mode 100755 index 00000000..abf31742 --- /dev/null +++ b/src/agat/agat_convertspgff2gtf/test_data/script.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# clone repo +if [ ! -d /tmp/agat_source ]; then + git clone --depth 1 --single-branch --branch master https://github.com/NBISweden/AGAT /tmp/agat_source +fi + +# copy test data +cp -r /tmp/agat_source/t/gff_syntax/in/0_test.gff src/agat/agat_convertspgff2gtf/test_data + + + From 8f047d652287209e7ea22e331fcb8f701a17d221 Mon Sep 17 00:00:00 2001 From: Leila011 Date: Wed, 19 Jun 2024 11:00:48 +0200 Subject: [PATCH 04/25] update help.txt --- src/agat/agat_convertspgff2gtf/help.txt | 103 +++++++++++++++++++++++- 1 file changed, 99 insertions(+), 4 deletions(-) diff --git a/src/agat/agat_convertspgff2gtf/help.txt b/src/agat/agat_convertspgff2gtf/help.txt index 20c0b61a..fdd45507 100644 --- a/src/agat/agat_convertspgff2gtf/help.txt +++ b/src/agat/agat_convertspgff2gtf/help.txt @@ -1,7 +1,102 @@ -cat < src/agat/agat_convertspgff2gtf/help.txt ```sh -agat/agat_convertspgff2gtf --help +agat_convert_sp_gff2gtf.pl --help ``` -EOF + ------------------------------------------------------------------------------ +| Another GFF Analysis Toolkit (AGAT) - Version: v1.4.0 | +| https://github.com/NBISweden/AGAT | +| National Bioinformatics Infrastructure Sweden (NBIS) - www.nbis.se | + ------------------------------------------------------------------------------ + + +Name: + agat_convert_sp_gff2gtf.pl + +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. + +Usage: + agat_convert_sp_gff2gtf.pl --gff infile.gff [ -o outfile ] + agat_convert_sp_gff2gtf -h + +Options: + --gff, --gtf or -i + Input GFF/GTF file that will be read + + --gtf_version 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 + + -o , --output , --out , --outfile or --gtf + Output GTF file. If no output file is specified, the output will + be written to STDOUT. + + -c or --config + String - 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). + + -h or --help + Display this helpful text. + +Feedback: + Did you find a bug?: + Do not hesitate to report bugs to help us keep track of the bugs and + their resolution. Please use the GitHub issue tracking system available + at this address: + + https://github.com/NBISweden/AGAT/issues + + Ensure that the bug was not already reported by searching under Issues. + If you're unable to find an (open) issue addressing the problem, open a new one. + Try as much as possible to include in the issue when relevant: + - a clear description, + - as much relevant information as possible, + - the command used, + - a data sample, + - an explanation of the expected behaviour that is not occurring. + + Do you want to contribute?: + You are very welcome, visit this address for the Contributing + guidelines: + https://github.com/NBISweden/AGAT/blob/master/CONTRIBUTING.md -docker run quay.io/biocontainers/agat/agat_convertspgff2gtf:1.4.0--pl5321hdfd78af_0 agat/agat_convertspgff2gtf --help >> src/agat/agat_convertspgff2gtf/help.txt \ No newline at end of file From 8a8c2652f7faf81f2bf85a33967e9aa2544fbdbb Mon Sep 17 00:00:00 2001 From: Leila011 Date: Fri, 28 Jun 2024 14:26:44 +0200 Subject: [PATCH 05/25] add arguments for input file, output file and other arguments --- .../agat_convertspgff2gtf/config.vsh.yaml | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/src/agat/agat_convertspgff2gtf/config.vsh.yaml b/src/agat/agat_convertspgff2gtf/config.vsh.yaml index acf4e309..4baaebd0 100644 --- a/src/agat/agat_convertspgff2gtf/config.vsh.yaml +++ b/src/agat/agat_convertspgff2gtf/config.vsh.yaml @@ -12,11 +12,37 @@ references: license: GPL v3 argument_groups: - name: Inputs - arguments: <...> + arguments: + - name: --gff + alternatives: [--gtf, -i] + description: Input GFF/GTF file that will be read + type: file + required: true + example: input.gff - name: Outputs - arguments: <...> + 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 + required: false + example: output.gtf - name: Arguments - 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. + type: string + choices: [relax, GTF3, GTF2.5, GTF2.2, GTF2.1, GTF2, GTF1] + required: false + default: relax + example: GTF3 + - name: --config + 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: string + required: false + default: agat_config.yaml + example: custom_agat_config.yaml resources: - type: bash_script path: script.sh From 4a5344c5248881026040c06915722ad5b5f95864 Mon Sep 17 00:00:00 2001 From: Leila011 Date: Fri, 28 Jun 2024 14:27:12 +0200 Subject: [PATCH 06/25] add a Docker engine --- src/agat/agat_convertspgff2gtf/config.vsh.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/agat/agat_convertspgff2gtf/config.vsh.yaml b/src/agat/agat_convertspgff2gtf/config.vsh.yaml index 4baaebd0..fda81ae0 100644 --- a/src/agat/agat_convertspgff2gtf/config.vsh.yaml +++ b/src/agat/agat_convertspgff2gtf/config.vsh.yaml @@ -52,7 +52,8 @@ test_resources: - type: file path: test_data engines: - - <...> + - type: docker + image: quay.io/biocontainers/agat:1.4.0--pl5321hdfd78af_0 runners: - type: executable - type: nextflow \ No newline at end of file From 320bb8805c036451d1314ef53e4a01fc48173371 Mon Sep 17 00:00:00 2001 From: Leila011 Date: Fri, 28 Jun 2024 14:43:17 +0200 Subject: [PATCH 07/25] Write a runner script --- src/agat/agat_convertspgff2gtf/config.vsh.yaml | 3 ++- src/agat/agat_convertspgff2gtf/script.sh | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 src/agat/agat_convertspgff2gtf/script.sh diff --git a/src/agat/agat_convertspgff2gtf/config.vsh.yaml b/src/agat/agat_convertspgff2gtf/config.vsh.yaml index fda81ae0..79ef0b71 100644 --- a/src/agat/agat_convertspgff2gtf/config.vsh.yaml +++ b/src/agat/agat_convertspgff2gtf/config.vsh.yaml @@ -37,9 +37,10 @@ argument_groups: default: relax example: GTF3 - 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: string + type: file required: false default: agat_config.yaml example: custom_agat_config.yaml diff --git a/src/agat/agat_convertspgff2gtf/script.sh b/src/agat/agat_convertspgff2gtf/script.sh new file mode 100644 index 00000000..e49703c6 --- /dev/null +++ b/src/agat/agat_convertspgff2gtf/script.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +## VIASH START +## VIASH END + +agat_convert_sp_gff2gtf.pl \ + --i "$par_gff" \ + --o "$par_output" \ + ${par_gtf_version:+--gtf_version "${par_gtf_version}"} \ + ${par_config:+-c "${par_config}"} \ \ No newline at end of file From 29d1d5abcfac6d88dbc55b4afdba49cf7eccf375 Mon Sep 17 00:00:00 2001 From: Leila011 Date: Fri, 28 Jun 2024 15:40:04 +0200 Subject: [PATCH 08/25] correct --gtf_version choices --- src/agat/agat_convertspgff2gtf/config.vsh.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agat/agat_convertspgff2gtf/config.vsh.yaml b/src/agat/agat_convertspgff2gtf/config.vsh.yaml index 79ef0b71..54143cfb 100644 --- a/src/agat/agat_convertspgff2gtf/config.vsh.yaml +++ b/src/agat/agat_convertspgff2gtf/config.vsh.yaml @@ -32,7 +32,7 @@ argument_groups: - 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. type: string - choices: [relax, GTF3, GTF2.5, GTF2.2, GTF2.1, GTF2, GTF1] + choices: [relax, "1", "2", "2.1", "2.2", "2.5", "3"] required: false default: relax example: GTF3 From beeadfb1c891b73c922ec2a256bbff40430c4dca Mon Sep 17 00:00:00 2001 From: Leila011 Date: Fri, 28 Jun 2024 15:52:18 +0200 Subject: [PATCH 09/25] update description --- .../agat_convertspgff2gtf/config.vsh.yaml | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/agat/agat_convertspgff2gtf/config.vsh.yaml b/src/agat/agat_convertspgff2gtf/config.vsh.yaml index 54143cfb..f9c328b5 100644 --- a/src/agat/agat_convertspgff2gtf/config.vsh.yaml +++ b/src/agat/agat_convertspgff2gtf/config.vsh.yaml @@ -1,6 +1,24 @@ name: agat_convertspgff2gtf namespace: agat -description: AGAT is a toolkit for manipulation and getting information from GFF/GTF files +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: [tag1, tag2] links: homepage: https://github.com/NBISweden/AGAT From 6c7df8f94886e41b12d269e9cb935be86e60b10f Mon Sep 17 00:00:00 2001 From: Leila011 Date: Fri, 28 Jun 2024 15:55:40 +0200 Subject: [PATCH 10/25] update keywords --- src/agat/agat_convertspgff2gtf/config.vsh.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agat/agat_convertspgff2gtf/config.vsh.yaml b/src/agat/agat_convertspgff2gtf/config.vsh.yaml index f9c328b5..bfe974ad 100644 --- a/src/agat/agat_convertspgff2gtf/config.vsh.yaml +++ b/src/agat/agat_convertspgff2gtf/config.vsh.yaml @@ -19,7 +19,7 @@ description: | transcript_id is a unique identifier for the predicted transcript, which is used to group features into transcripts. -keywords: [tag1, tag2] +keywords: [gene annotations, GTF conversion] links: homepage: https://github.com/NBISweden/AGAT documentation: https://agat.readthedocs.io/ From e7181c24cec51277c8ff51f049edc8c1f6fd5cbf Mon Sep 17 00:00:00 2001 From: Leila011 Date: Fri, 28 Jun 2024 16:10:44 +0200 Subject: [PATCH 11/25] Create test script --- .../agat_convertspgff2gtf/config.vsh.yaml | 1 - src/agat/agat_convertspgff2gtf/test.sh | 22 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 src/agat/agat_convertspgff2gtf/test.sh diff --git a/src/agat/agat_convertspgff2gtf/config.vsh.yaml b/src/agat/agat_convertspgff2gtf/config.vsh.yaml index bfe974ad..6deaf2ef 100644 --- a/src/agat/agat_convertspgff2gtf/config.vsh.yaml +++ b/src/agat/agat_convertspgff2gtf/config.vsh.yaml @@ -18,7 +18,6 @@ description: | 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 diff --git a/src/agat/agat_convertspgff2gtf/test.sh b/src/agat/agat_convertspgff2gtf/test.sh new file mode 100644 index 00000000..dc8e8f5a --- /dev/null +++ b/src/agat/agat_convertspgff2gtf/test.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +## VIASH START +## VIASH END + +test_dir="${meta_resources_dir}/test_data" + + +echo "> Run agat_convertspgff2gtf with test data" +"$meta_executable" \ + --gff "$test_dir/0_test.gff" \ + --output "output.gtf" + +echo ">> Checking output" +[ ! -f "output.gtf" ] && echo "Output file output.gtf does not exist" && exit 1 + +echo ">> Check if output is empty" +[ ! -s "output.gtf" ] && echo "Output file output.gtf is empty" && exit 1 + +rm output.gtf + +echo "> Test successful" \ No newline at end of file From 53de9ff691faa1c45274613b0e0398651454ade2 Mon Sep 17 00:00:00 2001 From: Leila011 Date: Fri, 28 Jun 2024 16:27:48 +0200 Subject: [PATCH 12/25] Create a /var/software_versions.txt file --- src/agat/agat_convertspgff2gtf/config.vsh.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/agat/agat_convertspgff2gtf/config.vsh.yaml b/src/agat/agat_convertspgff2gtf/config.vsh.yaml index 6deaf2ef..d0950641 100644 --- a/src/agat/agat_convertspgff2gtf/config.vsh.yaml +++ b/src/agat/agat_convertspgff2gtf/config.vsh.yaml @@ -72,6 +72,10 @@ test_resources: 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 \ No newline at end of file From 90c636601506c3e6f75fd5c7b0768836e5512a7e Mon Sep 17 00:00:00 2001 From: Leila011 Date: Sat, 29 Jun 2024 17:28:45 +0200 Subject: [PATCH 13/25] remove duplicated argument --- src/agat/agat_convertspgff2gtf/config.vsh.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agat/agat_convertspgff2gtf/config.vsh.yaml b/src/agat/agat_convertspgff2gtf/config.vsh.yaml index d0950641..adfdfe70 100644 --- a/src/agat/agat_convertspgff2gtf/config.vsh.yaml +++ b/src/agat/agat_convertspgff2gtf/config.vsh.yaml @@ -31,7 +31,7 @@ argument_groups: - name: Inputs arguments: - name: --gff - alternatives: [--gtf, -i] + alternatives: [-i] description: Input GFF/GTF file that will be read type: file required: true From d32fae58350421f02845dca97d5173a348a8057c Mon Sep 17 00:00:00 2001 From: Leila011 Date: Fri, 5 Jul 2024 15:19:36 +0200 Subject: [PATCH 14/25] update config --- src/agat/agat_convertspgff2gtf/config.vsh.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/agat/agat_convertspgff2gtf/config.vsh.yaml b/src/agat/agat_convertspgff2gtf/config.vsh.yaml index adfdfe70..846b8aaf 100644 --- a/src/agat/agat_convertspgff2gtf/config.vsh.yaml +++ b/src/agat/agat_convertspgff2gtf/config.vsh.yaml @@ -35,6 +35,7 @@ argument_groups: description: Input GFF/GTF file that will be read type: file required: true + direction: input example: input.gff - name: Outputs arguments: @@ -42,7 +43,8 @@ argument_groups: alternatives: [-o, --out, --outfile, --gtf] description: Output GTF file. If no output file is specified, the output will be written to STDOUT. type: file - required: false + direction: output + required: true example: output.gtf - name: Arguments arguments: @@ -59,7 +61,6 @@ argument_groups: 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 - default: agat_config.yaml example: custom_agat_config.yaml resources: - type: bash_script From 46d4573e88087414fb5854b708d2f1cad8de735d Mon Sep 17 00:00:00 2001 From: Leila011 Date: Mon, 8 Jul 2024 13:01:47 +0200 Subject: [PATCH 15/25] change name to agat_convert_sp_gff2gtf --- .../config.vsh.yaml | 2 +- .../{agat_convertspgff2gtf => agat_convert_sp_gff2gtf}/help.txt | 0 .../script.sh | 0 .../{agat_convertspgff2gtf => agat_convert_sp_gff2gtf}/test.sh | 2 +- .../test_data/0_test.gff | 0 .../test_data/script.sh | 2 +- 6 files changed, 3 insertions(+), 3 deletions(-) rename src/agat/{agat_convertspgff2gtf => agat_convert_sp_gff2gtf}/config.vsh.yaml (99%) rename src/agat/{agat_convertspgff2gtf => agat_convert_sp_gff2gtf}/help.txt (100%) rename src/agat/{agat_convertspgff2gtf => agat_convert_sp_gff2gtf}/script.sh (100%) rename src/agat/{agat_convertspgff2gtf => agat_convert_sp_gff2gtf}/test.sh (89%) rename src/agat/{agat_convertspgff2gtf => agat_convert_sp_gff2gtf}/test_data/0_test.gff (100%) rename src/agat/{agat_convertspgff2gtf => agat_convert_sp_gff2gtf}/test_data/script.sh (89%) diff --git a/src/agat/agat_convertspgff2gtf/config.vsh.yaml b/src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml similarity index 99% rename from src/agat/agat_convertspgff2gtf/config.vsh.yaml rename to src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml index 846b8aaf..89551be5 100644 --- a/src/agat/agat_convertspgff2gtf/config.vsh.yaml +++ b/src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml @@ -1,4 +1,4 @@ -name: agat_convertspgff2gtf +name: agat_convert_sp_gff2gtf namespace: agat description: | The script aims to convert any GTF/GFF file into a proper GTF file. Full diff --git a/src/agat/agat_convertspgff2gtf/help.txt b/src/agat/agat_convert_sp_gff2gtf/help.txt similarity index 100% rename from src/agat/agat_convertspgff2gtf/help.txt rename to src/agat/agat_convert_sp_gff2gtf/help.txt diff --git a/src/agat/agat_convertspgff2gtf/script.sh b/src/agat/agat_convert_sp_gff2gtf/script.sh similarity index 100% rename from src/agat/agat_convertspgff2gtf/script.sh rename to src/agat/agat_convert_sp_gff2gtf/script.sh diff --git a/src/agat/agat_convertspgff2gtf/test.sh b/src/agat/agat_convert_sp_gff2gtf/test.sh similarity index 89% rename from src/agat/agat_convertspgff2gtf/test.sh rename to src/agat/agat_convert_sp_gff2gtf/test.sh index dc8e8f5a..335d9c7a 100644 --- a/src/agat/agat_convertspgff2gtf/test.sh +++ b/src/agat/agat_convert_sp_gff2gtf/test.sh @@ -6,7 +6,7 @@ test_dir="${meta_resources_dir}/test_data" -echo "> Run agat_convertspgff2gtf with test data" +echo "> Run agat_convert_sp_gff2gtf with test data" "$meta_executable" \ --gff "$test_dir/0_test.gff" \ --output "output.gtf" diff --git a/src/agat/agat_convertspgff2gtf/test_data/0_test.gff b/src/agat/agat_convert_sp_gff2gtf/test_data/0_test.gff similarity index 100% rename from src/agat/agat_convertspgff2gtf/test_data/0_test.gff rename to src/agat/agat_convert_sp_gff2gtf/test_data/0_test.gff diff --git a/src/agat/agat_convertspgff2gtf/test_data/script.sh b/src/agat/agat_convert_sp_gff2gtf/test_data/script.sh similarity index 89% rename from src/agat/agat_convertspgff2gtf/test_data/script.sh rename to src/agat/agat_convert_sp_gff2gtf/test_data/script.sh index abf31742..acfb0e04 100755 --- a/src/agat/agat_convertspgff2gtf/test_data/script.sh +++ b/src/agat/agat_convert_sp_gff2gtf/test_data/script.sh @@ -6,7 +6,7 @@ if [ ! -d /tmp/agat_source ]; then fi # copy test data -cp -r /tmp/agat_source/t/gff_syntax/in/0_test.gff src/agat/agat_convertspgff2gtf/test_data +cp -r /tmp/agat_source/t/gff_syntax/in/0_test.gff src/agat/agat_convert_sp_gff2gtf/test_data From 260fe1ce870ecef01cddb44ce863a0ae73ddf01c Mon Sep 17 00:00:00 2001 From: Leila011 Date: Mon, 8 Jul 2024 13:03:03 +0200 Subject: [PATCH 16/25] update license --- src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml b/src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml index 89551be5..617eca69 100644 --- a/src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml +++ b/src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml @@ -26,7 +26,7 @@ links: repository: https://github.com/NBISweden/AGAT references: doi: 10.5281/zenodo.3552717 -license: GPL v3 +license: GPL-3.0 argument_groups: - name: Inputs arguments: From 88565ff6b7702b7bf3927e4da6646ea8ef567cbb Mon Sep 17 00:00:00 2001 From: Leila011 Date: Mon, 8 Jul 2024 13:25:25 +0200 Subject: [PATCH 17/25] replace module name by $meta_name in test.sh --- src/agat/agat_convert_sp_gff2gtf/test.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/agat/agat_convert_sp_gff2gtf/test.sh b/src/agat/agat_convert_sp_gff2gtf/test.sh index 335d9c7a..8feaeb2d 100644 --- a/src/agat/agat_convert_sp_gff2gtf/test.sh +++ b/src/agat/agat_convert_sp_gff2gtf/test.sh @@ -5,8 +5,7 @@ test_dir="${meta_resources_dir}/test_data" - -echo "> Run agat_convert_sp_gff2gtf with test data" +echo "> Run $meta_name with test data" "$meta_executable" \ --gff "$test_dir/0_test.gff" \ --output "output.gtf" From f2dc58db4ef3b96540a53270b2216d2854f791b6 Mon Sep 17 00:00:00 2001 From: Leila011 Date: Mon, 8 Jul 2024 13:25:54 +0200 Subject: [PATCH 18/25] Add more info to --gtf_version description --- src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml b/src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml index 617eca69..4f0ad031 100644 --- a/src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml +++ b/src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml @@ -49,12 +49,19 @@ argument_groups: - 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. + 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 - default: relax - example: GTF3 + example: "3" - name: --config alternatives: [-c] description: | From 2046191fd9bd63e3329fd5e5c3b53f318c347c1a Mon Sep 17 00:00:00 2001 From: Leila011 Date: Tue, 9 Jul 2024 10:07:01 +0200 Subject: [PATCH 19/25] remove extra \ --- src/agat/agat_convert_sp_gff2gtf/script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agat/agat_convert_sp_gff2gtf/script.sh b/src/agat/agat_convert_sp_gff2gtf/script.sh index e49703c6..5d9e94f3 100644 --- a/src/agat/agat_convert_sp_gff2gtf/script.sh +++ b/src/agat/agat_convert_sp_gff2gtf/script.sh @@ -7,4 +7,4 @@ agat_convert_sp_gff2gtf.pl \ --i "$par_gff" \ --o "$par_output" \ ${par_gtf_version:+--gtf_version "${par_gtf_version}"} \ - ${par_config:+-c "${par_config}"} \ \ No newline at end of file + ${par_config:+-c "${par_config}"} From e1f7efa15a8beefac4adfb1cf34745b24f1dc558 Mon Sep 17 00:00:00 2001 From: Leila011 Date: Tue, 9 Jul 2024 10:08:11 +0200 Subject: [PATCH 20/25] add additional test: check if the D column in the first line of the GFF was correctly converted into GTF format --- src/agat/agat_convert_sp_gff2gtf/test.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/agat/agat_convert_sp_gff2gtf/test.sh b/src/agat/agat_convert_sp_gff2gtf/test.sh index 8feaeb2d..50a5bb2c 100644 --- a/src/agat/agat_convert_sp_gff2gtf/test.sh +++ b/src/agat/agat_convert_sp_gff2gtf/test.sh @@ -16,6 +16,10 @@ echo ">> Checking output" echo ">> Check if output is empty" [ ! -s "output.gtf" ] && echo "Output file output.gtf is empty" && exit 1 -rm output.gtf +echo ">> Check if the conversion resulted in the right GTF format" +idGFF=$(head -n 2 "$test_dir/0_test.gff" | grep -o 'ID=[^;]*' | cut -d '=' -f 2-) +expectedGTF="gene_id \"$idGFF\"; ID \"$idGFF\";" +extractedGTF=$(head -n 3 "output.gtf" | grep -o 'gene_id "[^"]*"; ID "[^"]*";') +[ "$extractedGTF" != "$expectedGTF" ] && echo "Output file output.gtf does not have the right format!" && exit 1 echo "> Test successful" \ No newline at end of file From d91e8df620fd7064e42f71556750c3f46d03d93c Mon Sep 17 00:00:00 2001 From: Leila011 Date: Tue, 9 Jul 2024 10:11:31 +0200 Subject: [PATCH 21/25] update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a036fba..06d94ebe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -73,6 +73,9 @@ - `bedtools_getfasta`: extract sequences from a FASTA file for each of the intervals defined in a BED/GFF/VCF file (PR #59). +* `agat`: + - `agat_convert_sp_gff2gtf`: convert any GTF/GFF file into a proper GTF file (PR #76). + ## MINOR CHANGES * Uniformize component metadata (PR #23). From 67d3cd897e20c3df7e98f77a793a505c074aa126 Mon Sep 17 00:00:00 2001 From: Leila011 Date: Mon, 15 Jul 2024 10:22:08 +0200 Subject: [PATCH 22/25] Markdown: add newline before listing --- src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml b/src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml index 4f0ad031..6ade16b6 100644 --- a/src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml +++ b/src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml @@ -51,6 +51,7 @@ argument_groups: - 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 From 0805222d9d1507dc723ad12d0aa6da492bb9d11f Mon Sep 17 00:00:00 2001 From: Leila011 Date: Mon, 15 Jul 2024 10:34:44 +0200 Subject: [PATCH 23/25] add test to check if the header contains the right GTF version --- src/agat/agat_convert_sp_gff2gtf/test.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/agat/agat_convert_sp_gff2gtf/test.sh b/src/agat/agat_convert_sp_gff2gtf/test.sh index 50a5bb2c..1e7cc142 100644 --- a/src/agat/agat_convert_sp_gff2gtf/test.sh +++ b/src/agat/agat_convert_sp_gff2gtf/test.sh @@ -20,6 +20,18 @@ echo ">> Check if the conversion resulted in the right GTF format" idGFF=$(head -n 2 "$test_dir/0_test.gff" | grep -o 'ID=[^;]*' | cut -d '=' -f 2-) expectedGTF="gene_id \"$idGFF\"; ID \"$idGFF\";" extractedGTF=$(head -n 3 "output.gtf" | grep -o 'gene_id "[^"]*"; ID "[^"]*";') -[ "$extractedGTF" != "$expectedGTF" ] && echo "Output file output.gtf does not have the right format!" && exit 1 +[ "$extractedGTF" != "$expectedGTF" ] && echo "Output file output.gtf does not have the right format" && exit 1 + +rm output.gtf + +echo "> Run $meta_name with test data and GTF version 2.5" +"$meta_executable" \ + --gff "$test_dir/0_test.gff" \ + --output "output.gtf" \ + --gtf_version "2.5" + +echo ">> Check if the output file header display the right GTF version" +grep -q "##gtf-version 2.5" "output.gtf" +[ $? -ne 0 ] && echo "Output file output.gtf header does not display the right GTF version" && exit 1 echo "> Test successful" \ No newline at end of file From 18858dc1b59d152e8b7fbf6d09be40ec73752acb Mon Sep 17 00:00:00 2001 From: Leila011 Date: Mon, 15 Jul 2024 10:37:37 +0200 Subject: [PATCH 24/25] cleanup --- src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml b/src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml index 6ade16b6..7a3c105c 100644 --- a/src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml +++ b/src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml @@ -50,15 +50,15 @@ argument_groups: 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. + 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 + * 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 From 78da7b5f8c1f7b9be64a1e1697c2507c425fbf6e Mon Sep 17 00:00:00 2001 From: Robrecht Cannoodt Date: Wed, 17 Jul 2024 17:52:17 +0200 Subject: [PATCH 25/25] fix formatting --- .../agat_convert_sp_gff2gtf/config.vsh.yaml | 52 +++++++++---------- src/agat/agat_convert_sp_gff2gtf/script.sh | 6 +-- .../test_data/script.sh | 3 -- 3 files changed, 29 insertions(+), 32 deletions(-) diff --git a/src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml b/src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml index 7a3c105c..b788c7c7 100644 --- a/src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml +++ b/src/agat/agat_convert_sp_gff2gtf/config.vsh.yaml @@ -1,23 +1,23 @@ 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. +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. + 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 @@ -50,15 +50,15 @@ argument_groups: 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. + 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 diff --git a/src/agat/agat_convert_sp_gff2gtf/script.sh b/src/agat/agat_convert_sp_gff2gtf/script.sh index 5d9e94f3..69d66739 100644 --- a/src/agat/agat_convert_sp_gff2gtf/script.sh +++ b/src/agat/agat_convert_sp_gff2gtf/script.sh @@ -4,7 +4,7 @@ ## VIASH END agat_convert_sp_gff2gtf.pl \ - --i "$par_gff" \ - --o "$par_output" \ + -i "$par_gff" \ + -o "$par_output" \ ${par_gtf_version:+--gtf_version "${par_gtf_version}"} \ - ${par_config:+-c "${par_config}"} + ${par_config:+--config "${par_config}"} diff --git a/src/agat/agat_convert_sp_gff2gtf/test_data/script.sh b/src/agat/agat_convert_sp_gff2gtf/test_data/script.sh index acfb0e04..e453e772 100755 --- a/src/agat/agat_convert_sp_gff2gtf/test_data/script.sh +++ b/src/agat/agat_convert_sp_gff2gtf/test_data/script.sh @@ -7,6 +7,3 @@ fi # copy test data cp -r /tmp/agat_source/t/gff_syntax/in/0_test.gff src/agat/agat_convert_sp_gff2gtf/test_data - - -