NBISweden / AGAT

Another Gtf/Gff Analysis Toolkit
GNU General Public License v3.0
431 stars 52 forks source link

can "agat_sp_compare_two_annotations.pl" output ID lists for each type of genes? #435

Closed HouYan20 closed 3 months ago

HouYan20 commented 4 months ago

Dear Jacques, Thanks a lot for creating AGAT! It is a wonderful tool. Helped me a lot. Recently, I used "agat_sp_compare_two_annotations.pl" to compare my two genome annotation outputs, one with homology evidence, and another with RNA-seq evidence.
Could you please update the script to generate ID lists for each case of genes found by the script? I mean outputs like, uniq_gene_gff1.txt, uniq_gene_gff2.txt, overlap.txt, split.txt, fusion.txt

They could be just gene ID lists. Such as, when "> cat uniq_gene_file1.txt", got gene_A000001 gene_C000002

Or, could be gene position list. Such as, when ">cat uniq_gene_file1.txt", got Chr1 start end ChrX start end

I want these information because my two annotations have many differences (see following output), which is not a big surprise. However, I would like to know what they are.
For example, I would like to check whether the 6300 genes (as shown in the following table), which has no overlap with the RNA evidence, could have any function annotation in Nr blastp result. Also, I would like to extract the 5006 genes that only annotated by RNA evidence and make a blast analysis.

Looking forward to hearing from you! Thanks a lot in advance! Best, Yan thumbnail_image

Juke34 commented 4 months ago

Could you give a try, I made the modification in the agat_sp_compare_two_annotations_435 branch. In the environment containing all dependencies (eg from conda or container installation):

git clone https://github.com/NBISweden/AGAT.git 
 cd AGAT 
git checkout agat_sp_compare_two_annotations_435
perl Makefile.PL
make
make test
make install

then you can execute as usual:
agat_sp_compare_two_annotations.pl --gff1 file1 --gff2 file2

Or:

git clone https://github.com/NBISweden/AGAT.git 
cd AGAT 
git checkout agat_sp_compare_two_annotations_435

then execute using this syntax: perl -I lib bin/agat_sp_compare_two_annotations.pl --gff1 file1 --gff2 file2

HouYan20 commented 3 months ago

Dear Jacques, Now the script worked exactlly as I wanted. Thank you very much!!!

Best, Yan