Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to merge two genes with overlapping positions but no overlapping CDS? #468

Open
binzhengbin opened this issue Jun 20, 2024 · 9 comments

Comments

@binzhengbin
Copy link

I tried to merge genes with overlapping regions using agat_sp_fix_overlaping_genes.pl but it failed because their CDSs don't overlap, is there any way to fix this? Thanks!

微信图片_20240620193344
@Juke34
Copy link
Collaborator

Juke34 commented Jun 20, 2024

This script if for a particular purpose and avoid overlap of the end of genes to be exactly at the same position ( a peculiarity for submission to public archive)
You should use either the merge or complement script

@binzhengbin
Copy link
Author

I don't quite understand what you mean, can you point me in the right direction? Or do you know of any code that accomplishes this?

@Juke34
Copy link
Collaborator

Juke34 commented Jun 20, 2024

If you work on 2 files use agat_sp_merge_annotations.pl

If you work on a single file then use the gxf2gxf script but you must first activate the merge option in the agat config file ( agat config —expose)

@binzhengbin
Copy link
Author

I'll try your offer and I'll let you know if I hear anything new, thanks!

@binzhengbin
Copy link
Author

Following your advice, I used agat_convert_sp_gxf2gxf.pl to merge overlapping genes, and it seemed to do something, but only the genes with overlapping CDS positions were merged, while the genes with overlapping other genes/mRNAs were not merged.
24A5B0557481EB48A8BB22CB2435E6F8

@Juke34
Copy link
Collaborator

Juke34 commented Jun 24, 2024

What vesion of AGAT do you use?
To be able to merge gene without CDS, both gene must be of the same type (level1 must be similar e.g. gene and level2 must be of the same type e.g. mRNA).
I keep in mind that they have to be on the same strand.

@Juke34
Copy link
Collaborator

Juke34 commented Jun 25, 2024

Right if two genes have CDS it is at CDS level that the overlap will be taken into account to decide to merge the gene or not.
You would like to merge if it overlap at any level?
This is something not implemented but if. houseful I could add it.

@binzhengbin
Copy link
Author

Sorry, just saw the message now. It would be best if a gene level merge could be implemented.

@binzhengbin
Copy link
Author

Since your agat_sp_fix_overlaping_genes.pl program only merges for CDS that have overlap, it would be a great creation if we could be allowed to autonomously choose the level of merging (e.g., gene, mRNA, exon, and CDS, etc.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants