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

Load obsolete GO terms: GODag("go.obo", load_obsolete=True) #153

Closed
AgustinPardo opened this issue Feb 19, 2020 · 5 comments
Closed

Load obsolete GO terms: GODag("go.obo", load_obsolete=True) #153

AgustinPardo opened this issue Feb 19, 2020 · 5 comments

Comments

@AgustinPardo
Copy link

Hello,

I am parsing the go.obo file by:

obodag = GODag("go.obo")
go_name = obodag.get(go_id#).name
go_namespace = obodag.get(go_id#).namespace

I get a key error because some of the terms(GO ids) are not included in the obodag dictionary (obodag).
That terms are not included because they are deprecated/obsolete, but they are in the go.obo file, for example:

[Term]
id: GO:0044444
name: obsolete cytoplasmic part
namespace: cellular_component
def: "OBSOLETE. Any constituent part of the cytoplasm, all of the contents of a cell excluding the plasma membrane and nucleus, but including other subcellular structures." [GOC:jl]
comment: Note that this term is in the subset of terms that should not be used for direct gene product annotation. Instead, select a child term or, if no appropriate child term exists, please request a new term. Direct annotations to this term may be amended during annotation QC.
subset: gocheck_do_not_annotate
synonym: "cytoplasm component" EXACT []
is_obsolete: true
consider: GO:0005737

Do you know some way to include them in the "obodag = GODag("go.obo")" dictionary?
Also they provide another GO term to consider (GO:0005737 in this case). Do you know how to get if by the deprecated term?

Many regards

@dvklopfenstein
Copy link
Collaborator

Hello @AgustinPardo,

Thank you for your interest in GOATOOLS and taking the time to write and thank you for the great question.

Yes, you can load obsolete GO terms by setting the GODag argument, load_obsolete=True. By default it is False. It would look like this:

obodag = GODag("go.obo", load_obsolete=True)

This is a terrific question and we should have a Jupyter notebook showing how to do this. I will add one shortly.

@AgustinPardo
Copy link
Author

Thanks for the quick answer!

@dvklopfenstein dvklopfenstein changed the title Obsolete terms not parsed Load obsolete GO terms: GODag("go.obo", load_obsolete=True) Feb 19, 2020
@AgustinPardo
Copy link
Author

AgustinPardo commented Feb 20, 2020

Hello,
I am having problems trying to capture the "consider" key of the GO terms that are obsoletes in the go.obo file:

For example this term:

[Term]
id: GO:0000067
name: obsolete DNA replication and chromosome cycle
namespace: biological_process
def: "OBSOLETE. (Was not defined before being made obsolete)." [GOC:ai]
comment: This term was made obsolete because it has been superseded by more accurate terms to represent the biological processes occurring, and it is not clear that this term represents a useful entity.
synonym: "DNA replication and chromosome cycle" EXACT []
is_obsolete: true
consider: GO:0006260
consider: GO:0007059
consider: GO:0051276

So I try:

obodag["GO:0000067"].is_obsolete
True

That is ok, so I try this and I get an error:

obodag["GO:0000067"].consider
AttributeError: 'GOTerm' object has no attribute 'consider'

How could I get the "consider" information of the terms?

Regards

@dvklopfenstein
Copy link
Collaborator

Can you open a new issue for this question? We can track the issues better that way.

@AgustinPardo
Copy link
Author

Done! Many thanks!

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