This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to merge unique/non overlapping genes between 2 gene model GFF3 files?

How to merge unique/non overlapping genes between 2 gene model GFF3 files?

I have 2 gene models:

  1. Recent supposedly higher quality gene model
  2. Older supposedly lower quality gene model

Some genes though that are described in literature have been removed in the more recent gene model. While they are in the older gene model. I would like to add these and other "missing" genes back to the more recent gene model, from the older gene model.

But if there is an overlap between genes from the different models, I would like to keep the genes as described in the more recent gene model.

Is there a way to do this?

gff3

2 answers

bedtools intersect -v is one option for identifying the unique genes from the older gene model. https://bedtools.readthedocs.io/en/latest/content/tools/intersect.html

agat_sp_complement_annotations.pl from AGAT does the job also. It allows different coding gene loci to overlap at their UTR levels ( because it is often less well annotated ). It allows also to get e.g a non-coding element ( ncRNA, pseudogene, repeat) to overlap a coding gene. So it a bit less strict than bedtools.

Log in to answer this question.