This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to merge two gff3 files?

Hello everyone, I'm looking for a script or a tool able to merge two gff3 files, made as follows:

1) A file containing annotation data for my species

2) Another file with additional annotation (information obtained later, trying to annotate the genome against another organism in order to give a function to more genes)

The coordinate system of the two gff3s is the same since both the gff3s are produced starting from the genome of my species of interest.

Anything I found seems to be outdated, thanks in advance for your help!

gff3 merge

1 answer

I use AGAT for that and many other GFF processing things as well.

AGAT - Another Gff Analysis Toolkit

Hi, thanks for your answer, what script do you use exactly?

agat_sp_merge_annotations.pl ?

depends on what exactly you want to achieve but yes, agat_sp_merge_annotations.pl sounds about right.

alternatively you can first cat both gff files together and then run agat_convert_sp_gxf2gxf.pl to fix the 'issues' .

On their github page there are lots of explanations and guidelines on what to use when. There are likely also different routes that lead to the same result.

Log in to answer this question.