Skip to content

[BUG] OboTerm.GetChildOntologyAnnotations does not return all children #8

@omaus

Description

@omaus

Try this:

let testTerms = [
    OboTerm.Create("test:000", Name = "test0")
    OboTerm.Create("test:001", Name = "test1a", IsA = ["test:000"])
    OboTerm.Create("test:002", Name = "test2", IsA = ["test:001"])
    OboTerm.Create("test:003", Name = "test1b", IsA = ["test:000"])
]

let testOntology = OboOntology.create testTerms []

testOntology.GetChildOntologyAnnotations(testTerms.Head.Id)

(Looks like this in a tree diagram:)

     test0
    /     \
test1a    test1b
   |
 test2

It should return "test1a", "test2", and "test1b" but the last one is missing.

If used with a first depth, it works:

testOntology.GetChildOntologyAnnotations(testTerms.Head.Id, Depth = 1)

If used with depth one level deeper, it again fails:

testOntology.GetChildOntologyAnnotations(testTerms.Head.Id, Depth = 2)

Prolly cause the algorithm goes as deep as possible and stops there. It is not capable of going back, so to speak.

Metadata

Metadata

Assignees

Labels

Type: BugSomething is not working, and it is confirmed by maintainers to be a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions