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

Plot all the significant GOterms from custom association file #113

Open
rafarios50 opened this issue Oct 10, 2018 · 1 comment
Open

Plot all the significant GOterms from custom association file #113

rafarios50 opened this issue Oct 10, 2018 · 1 comment

Comments

@rafarios50
Copy link

I have a custom annotation from a non model organism and want to plot the graph of the significant GOterms found.

The idea is to be able to plot the graph similar to the one shown in the this notebook: https://github.com/tanghaibao/goatools/blob/master/notebooks/goea_nbt3102.ipynb

But im not sure how to load my custom association file to create the GOEA object.

Also, couldnt find the example files to run the notebook, to replicate it and try to match those files from my data.

Could you please help me explaining me how to do that, or where to find the example files?

Thanks,

@algogalo
Copy link

algogalo commented Jul 15, 2021

Hi there @rafarios50 ,

You need to import and use the IdToGosReader method to read an association file from a custom database of a non-model organism.

Basically you need to make sure that your association file is in the same shape and format as the example provided here.

Then, in step "2b. Load Associations" of the notebook you mentioned, you create the objanno object using IdToGosReader function. You have to specify two parameters for that function: the path to your association file and the GODag that was previously downloaded in step "2a. Load Ontologies" of that same notebook.

Here is how the code looks like

from __future__ import print_function
from goatools.anno.idtogos_reader import IdToGosReader
objanno=IdToGosReader("association.txt",godag=obodag)

Good luck and I hope this is still useful almost three years later :D

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