-
Notifications
You must be signed in to change notification settings - Fork 210
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
Getting is_a and part_of relationships in GO tree #126
Comments
I checked the current scripts,and found that the author only defines a node as parent using ‘is_a' |
…onal part_of relationships #126
…selected optional relationships. #126
GO DAG using is_a and user-specified optional relationships. #126
GO DAG using is_a and user-specified optional relationships. #126
Hello @risserlin , Thank you for your patience and interest in GOATOOLS. I have implemented the functionality that you requested: New Functionality:
Items 2 and 3 were added to facilitate testing and documentation of item 1, but will certainly be useful in their own right. 1) Traverse a user-specified subset of optional relationshipTo traverse ancestors or descendants of a GO term using the is_a standard relationships plus a user-specified subset of the optional relationships, like part_of, regulate, etc., check out the new Python notebook, https://github.com/tanghaibao/goatools/blob/master/notebooks/get_isa_and_partof.ipynb. To get the ancestor or descendant GO IDs:
Getting all ancestors and descendants using the GOTerm functions like get_all_parents, get_all_upper, get_all_children, and get_all_lower works well for a single GO ID, but becomes time-consuming for a group of GO IDs. Instead, the GoSubDag object manages a smaller user-provided GO subset and will calculate all the sets of ancestors and descendants faster than the using GOTerm functions one GO term at a time. 2) Added --relationships argument to the go_plot.py script
Examples of values for --relationships include:
3) Added -go_color_file=<file.txt> argument to go_plot.pyThe script searches for both a GO ID and 6 digit hex number preceded by a '#' on each line of the text "go color file", creating a go2color dictionary using the captured GO ID and color hex string. The dictionary may contain many more GO IDs than you will plot. Any unused GO IDs in go2color will be ignored. Finally, you can override the background GO colors in the go_color_file by specifiying a single GO on the command line and following it with a color hex string (#d8dcd6 = grey), like this:
|
Amazing! Thanks. I will give it a try. |
Great! Please let me know what you think. |
The code revisions address should your request. If they do not or if you would like some different functionality, please open a new issue. I am going to close this issue. Thank you very much for your interest in GOATOOLS and taking your time to request this very important, popular, and useful functionality. |
I want to get the GO ontology using is_a and part_of and I have figured out how to get is_a (default) and I have also used get_all_upper() to get all the parents using all relationships but is there a way to return the go tree with just is_a and part_of excluding the regulation type terms?
Thanks,
Ruth
The text was updated successfully, but these errors were encountered: