Giter Site home page Giter Site logo

Count of all semantic categories about ontobio HOT 5 OPEN

biolink avatar biolink commented on May 20, 2024
Count of all semantic categories

from ontobio.

Comments (5)

cmungall avatar cmungall commented on May 20, 2024

There are two types of document in the solr index, entity-oriented and association-oriented. The former uses 'category', the latter '{subject,object}_category'. The counts for the latter should be accurate. the former may only be implemented for searching a subset of types, @kshefchek ?

from ontobio.

lhannest avatar lhannest commented on May 20, 2024

Looks good, thanks.

from ontobio.

kshefchek avatar kshefchek commented on May 20, 2024

I get an error when trying to replicate:
"msg":"undefined field: "category"",

I don't believe this is in the monarch solr schema, which solr server are you using?

from ontobio.

lhannest avatar lhannest commented on May 20, 2024

@kshefchek I'm using version 0.2.11 of ontobio.

Chris' suggestion seems to be correct:

results = GolrAssociationQuery(
    rows=0,
    facet_fields=['subject_category', 'object_category']
).exec()
facet_counts = results['facet_counts']
return jsonify(facet_counts)

Which produces:

{
"object_category": {
"anatomy": 1325778,
"biological process": 870753,
"case": 29237,
"disease": 438822,
"family": 22759,
"gene": 13382523,
"genotype": 1239754,
"model": 24848,
"pathway": 300028,
"phenotype": 8589086,
"variant": 7487546
},
"subject_category": {
"case": 21592,
"disease": 273984,
"gene": 8908453,
"genotype": 1471295,
"model": 681489,
"pathway": 1928772,
"publication": 13326444,
"variant": 7099105
}
}

from ontobio.

cmungall avatar cmungall commented on May 20, 2024

from ontobio.

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.