-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New script to move feature from features of a same record (agat_sp_mo…
…ve_attributes_within_records) (#413) * New script to move attributes from features of a same record, add test and doc * fix create_or_append_tag in Omniscient Tool to take more than the first value when the attribute has several values --------- Co-authored-by: Jacques Dainat <[email protected]>
- Loading branch information
Showing
8 changed files
with
504 additions
and
6 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# NAME | ||
|
||
agat\_sp\_move\_attributes\_within\_records.pl | ||
|
||
# DESCRIPTION | ||
|
||
The script aims to keep move attributes within a record e.g. from Level1 to Level2 and/or Level3 features; and / or from Level2 to Level2 or Level3 features; and / or from Level3 to Level3 features. | ||
Example of L1 feature: gene | ||
Example of L2 featrue | ||
|
||
# SYNOPSIS | ||
|
||
``` | ||
agat_sp_move_attributes_within_records.pl --gff infile.gff --feature_copy mRNA --feature_paste CDS --attribute Dbxref,Ontology [ --output outfile ] | ||
agat_sp_move_attributes_within_records.pl --help | ||
``` | ||
|
||
# OPTIONS | ||
|
||
- **-f**, **--reffile**, **--gff** or **-ref** | ||
|
||
Input GFF3 file that will be read | ||
|
||
- **--feature\_copy** or **--fc** | ||
|
||
primary tag (feature type) option to list from which feature we will copy the attributes, case insensitive. | ||
You can specified a feature (or a coma separated list) by giving its primary tag / feature type (column 3) value as: cds, Gene, MrNa, etc | ||
You can specify directly all the feature of a particular level: | ||
level2=mRNA,ncRNA,tRNA,etc | ||
level3=CDS,exon,UTR,etc | ||
By default all level2 feature are used. | ||
|
||
- **--feature\_paste** or **--fp** | ||
|
||
primary tag (feature type) option to list to which feature we will paste the attributes, case sensitive. | ||
You can specified a feature (or a coma separated list) by giving its primary tag / feature type (column 3) value as: cds, Gene, MrNa, etc | ||
You can specify directly all the feature of a particular level: | ||
level2=mRNA,ncRNA,tRNA,etc | ||
level3=CDS,exon,UTR,etc | ||
By default all feature level3 are used. | ||
|
||
- **-a** or **--attribute** | ||
|
||
Attribute that will be copied and pasted. Case sensitive. | ||
You can specified an attribute (or a coma separated list) by giving its attribute tag value (column9) as: Ontology, Dbxref, etc | ||
Default: all\_attributes | ||
/!\\ <all\_attributes> is a specific parameter meaning all the attributes will be use. | ||
|
||
- **-o** or **--output** | ||
|
||
Output GFF file. If no output file is specified, the output will be | ||
written to STDOUT. | ||
|
||
- **-v** | ||
|
||
Verbose option for debugging purpose. | ||
|
||
- **-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. | ||
|
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
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
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
3 changes: 3 additions & 0 deletions
3
t/scripts_output/in/agat_sp_move_attributes_within_records.gff
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ptg000002l AUGUSTUS mRNA 3255 4626 0.5 + . ID=NBISM00000000001;Parent=NBISG00000000001;Dbxref=CDD:cd07067,Gene3D:G3DSA:3.40.50.1240,InterPro:IPR013078,InterPro:IPR029033,;Name=ARB_03491;Ontology_term=-;makerName=g1.t1;product=Probable phosphoglycerate mutase ARB_03491;uniprot_id=D4B4V1 | ||
ptg000002l AUGUSTUS CDS 3255 3275 0.98 + 0 ID=NBISC00000000001;Parent=NBISM00000000001;makerName=g1.t1.CDS1 | ||
|
6 changes: 6 additions & 0 deletions
6
t/scripts_output/out/agat_sp_move_attributes_within_records.gff
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
##gff-version 3 | ||
ptg000002l AGAT gene 3255 4626 . + . ID=NBISG00000000001;Dbxref=CDD:cd07067,Gene3D:G3DSA:3.40.50.1240,InterPro:IPR013078,InterPro:IPR029033;Name=ARB_03491;Ontology_term=-;makerName=g1.t1;product=Probable phosphoglycerate mutase ARB_03491;uniprot_id=D4B4V1 | ||
ptg000002l AUGUSTUS mRNA 3255 4626 0.5 + . ID=NBISM00000000001;Parent=NBISG00000000001;Dbxref=CDD:cd07067,Gene3D:G3DSA:3.40.50.1240,InterPro:IPR013078,InterPro:IPR029033;Name=ARB_03491;Ontology_term=-;makerName=g1.t1;product=Probable phosphoglycerate mutase ARB_03491;uniprot_id=D4B4V1 | ||
ptg000002l AGAT exon 3255 4626 . + . ID=agat-exon-1;Parent=NBISM00000000001;Dbxref=CDD:cd07067,Gene3D:G3DSA:3.40.50.1240,InterPro:IPR013078,InterPro:IPR029033;Name=ARB_03491;Ontology_term=-;makerName=g1.t1.CDS1,g1.t1;product=Probable phosphoglycerate mutase ARB_03491;uniprot_id=D4B4V1 | ||
ptg000002l AUGUSTUS CDS 3255 3275 0.98 + 0 ID=NBISC00000000001;Parent=NBISM00000000001;Dbxref=CDD:cd07067,Gene3D:G3DSA:3.40.50.1240,InterPro:IPR013078,InterPro:IPR029033;Name=ARB_03491;Ontology_term=-;makerName=g1.t1.CDS1,g1.t1;product=Probable phosphoglycerate mutase ARB_03491;uniprot_id=D4B4V1 | ||
ptg000002l AGAT three_prime_UTR 3276 4626 . + . ID=agat-three_prime_utr-1;Parent=NBISM00000000001;makerName=g1.t1.CDS1 |