This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to retrieve from a GFF3 file a AA and CDS files

I have an annotation file in GFF3 format, but I do not have the amino acid and cds sequences any more. Is there a tool which can retrieve those files from a genome in FASTA format and a GFF3 file?

Thank you in advance

gene annotation

1 answer

Yes using agat_sp_extract_sequences.pl from AGAT

CDS:
agat_sp_extract_sequences.pl --gff myfFile.gff -f fastaFile.fa -o cds.fa

Protein:
agat_sp_extract_sequences.pl --gff myfFile.gff -f fastaFile.fa -p -o protein.fa

Otherwise with bedtools or gffread

While using agat to convert to protein I got:

(In case your file contains only CDS features, and your organism is prokaryote (e.g rast file), using ID as comon_tag might be the solution.)

13 warning messages: Peculiar rare case, we found 8 three_prime_utr while 12 expected.
Either some are supernumerary or some have been merged they overlap or are adjacent while they are not suppose to.
In case you were using gtf file as input (no parent/id attributes), check you provide the attribute (i.e comon_tag) used to group features together (e.g. locus_tag, gene_id, etc.).
(In case your file contains only CDS features, and your organism is prokaryote (e.g rast file), using ID as comon_tag might be the solution.)

Is there a way to find out more information about it or to fix it?

Thank you in advance,

I would say, you don't need to worry about, because you are interested in proteins and the warning concern the UTRs. If you want to see which UTR/gene it concerns, run agat_sp_gxf_to_gff3.pl with high verbosity e.g -v 2

Log in to answer this question.