This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to identify uniq genes between two gff files.

I have two GFF files of the same species obtained from different annotation methods, and I want to identify unique genes by comparing both GFF files.

Thank you

genes uniq annotation gff

2 answers

extract genes (e.g: awk '($3=="gene") {printf("%s\t%d\t%s\n",$1;int($4)-1,$5);}' ) from both files n sort, and use bedtools intersect with option -f .

hi Pierre Linderbaum,

after extracting genes, I have 5846 genes in afile.bed and 4456 genes in bfile.bed , while using bedtools intersect -a afile.bed -b bfile.bed -wa -wb -f 0.50 > genes.bed

I'm getting a count of 5800 genes, can you explain this ??

thank you

can you explain this ??

yes. you should use options like -u .

Write original A entry once if any overlaps found in B. In other words, just report the fact at least one overlap was found in B. Restricted by -f and -r.

yes got it, thank you very much.

You can run agat_sp_compare_two_annotations.pl from AGAT, you should get the information you are looking for. This method allows to catch gene nested in introns of other genes.

yes Juke34 , I tried agat_sp_compare_two_annotations.pl for both gff files and got comparative output in table format.

Thank you very much.

Do you get a similar result as found with bedtools?

Log in to answer this question.