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

parents vs ancestors #26

Closed
christianholland opened this issue May 29, 2018 · 2 comments
Closed

parents vs ancestors #26

christianholland opened this issue May 29, 2018 · 2 comments

Comments

@christianholland
Copy link

Hi,
what exactly is the difference between the functions parents() and ancestors(). From my feeling parents should provide the direct upstream node while ancestors list all related upstream nodes. However, regarding my analysis parents and ancestors behave equally.

ontology = Ontology("doid")
anc = ancestors(term(ontology , "DOID:3458"))
par = parents(term(ontology , "DOID:3458"))
identical(anc, par) # TRUE

Is this intended?
Thanks in advance,
Christian

@lgatto
Copy link
Owner

lgatto commented Jun 1, 2018

Your expectation is correct. Thank you for reporting this issue, I'll look into it.

@lgatto lgatto closed this as completed in 4e26293 Jun 1, 2018
@lgatto
Copy link
Owner

lgatto commented Jun 1, 2018

Thanks again for reporting the bug. It is now fixed

> library(rols)

This is 'rols' version 2.9.1 

> ontology <- Ontology("doid")
> parents(term(ontology , "DOID:3458"))
Object of class 'Terms' with 1 entries
 From the DOID ontology
DOID:3459 
> ancestors(term(ontology , "DOID:3458"))
Object of class 'Terms' with 11 entries
 From the DOID ontology
  DOID:3459, DOID:1612 ... DOID:162, DOID:14566 

The fix is available on github immediately and should also become available on Bioconductor devel (2.9.1) and release (2.8.1).

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