GithubHelp home page GithubHelp logo

dbrnz / anatomy-lookup Goto Github PK

View Code? Open in Web Editor NEW

This project forked from napakalas/anatomy-lookup

0.0 1.0 0.0 11.11 MB

Ontology lookup to UBERON and ILX

License: GNU General Public License v3.0

Python 100.00%

anatomy-lookup's Introduction

anatomy-lookup

Ontology lookup to UBERON and ILX

Install

pip install git+https://github.com/napakalas/anatomy-lookup.git

Lookup use

from anatomy_lookup import AnatomyLookup

al = AnatomyLookup()
al.search('nasophayrnx')

results

('http://purl.obolibrary.org/obo/UBERON_0001728',
 'nasopharynx',
 0.8313473463058472)

can use force

al.search('cochlear g.', force=True)

results

('http://purl.obolibrary.org/obo/UBERON_0000395',
 'cochlear ganglion',
 1.0000001192092896)

Update UBERON and ILX terms

al.update_terms()

Lookup with scope

al.search_with_scope('C1', ['Spinal cord'])

results

[('http://purl.obolibrary.org/obo/UBERON_0006469',
  'C1 segment of cervical spinal cord',
  0.758830189704895),
 ('http://purl.obolibrary.org/obo/UBERON_0007266',
  'intervertebral disk of atlas',
  0.7131606340408325),
 ('http://purl.obolibrary.org/obo/UBERON_0002828',
  'ventral cochlear nucleus',
  0.6487032771110535),
 ('http://purl.obolibrary.org/obo/UBERON_0006489',
  'C2 segment of cervical spinal cord',
  0.5675715208053589),
 ('http://purl.obolibrary.org/obo/UBERON_0006478',
  'Brodmann (1909) area 37',
  0.5620466470718384)]

running with force is also available

al.search_with_scope('C1', ['Spinal cord'], force=True)

Close instance to free resource

al.close()

Rebuild term embedding

al.build_indexes()

This will download the latest release of SCKAN from https://github.com/SciCrunch/NIF-Ontology/releases an then build the index

Running annotation

from anatomy_lookup import AnatomyAnnotator
anno = AnatomyAnnotator()
anno.annotate('annotation.json','name', ['systems', 'organ'])

can use force also

anno.annotate('annotation.json','name', ['systems', 'organ'], force=True)

Save to xlsx

anno.save_to_xlsx('annotation_test.xlsx')

Save to json

anno.save_to_json('annotation_test.json')

anatomy-lookup's People

Contributors

napakalas avatar

Watchers

 avatar

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.