Giter Site home page Giter Site logo

Comments (3)

smlmbrt avatar smlmbrt commented on September 26, 2024

Correct, but I think this is the ideal behaviour. The purpose of this endpoint is to find a list of traits that match your search terms/criteria, not to expose the structure of those terms in the ontology (parent/child relationships). For that it makes more sense to interrogate each term with the /rest/trait/{trait_id} endpoint.

The point of the include_children flag is to get EFO terms that might not have directly matching synonyms but are definitely related. For instance breast carcinoma (EFO_0000305) isn't returned in the /rest/trait/search?term=breast%20cancer&exact=0&include_children=0 query but is in the /rest/trait/search?term=breast%20cancer&exact=0&include_children=1 results because it doesn't have breast cancer as a synonym/label but it does have a parent with that term. In this way the behaviour of this endpoint makes sense as-is and wouldn't result in child terms being duplicated as results of the query and in the return of child terms in multiple parent terms.

Adding more of a description to the schema regarding its purpose is probably the best way to resolve this. Thoughts?

from pgs_catalog.

ramiromagno avatar ramiromagno commented on September 26, 2024

Okay, thanks for the explanation Sam!

from pgs_catalog.

smlmbrt avatar smlmbrt commented on September 26, 2024

No worries, this is the proposed change:

Search for Traits based on terms present in the ID, label, description synonyms, categories, or external mapped terms. The search term and filters for exact matching and child-term relationships can be included directly in the request URL, e.g.
https://www.pgscatalog.org/rest/trait/search?term=Alzheimer
This returns a list of Traits matching the search term (and by default their child terms from the ontology), including for each of them:

  • Ontology ID, trait label, description and URL
  • Trait categories
  • Synonyms and external mapped terms
  • Associated Polygenic Score(s)
  • Associated Polygenic Score(s) with child trait(s)

This endpoint searches all traits in the database, including parent terms from the ontology that aren’t included in the /rest/trait/all endpoint.

from pgs_catalog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.