Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[bioontology-support] mapping of classes- json output question

John Graybeal jgraybeal at stanford.edu
Mon Nov 11 17:40:07 PST 2019


Samira,

I am not a programmer, but I think this will tell you what you need to know. If this does not help you please reply and one of our programmers may be able to help.

In English, the mapping output is organized as follows:
 - an array of all the mappings; for each mapping:
   - the id of the mapping (null in most of these cases)
   - the source of the mapping
   - an array containing the two classes that are mapped to each other; for each class:
     - the identifier (@id) for the class
     - the type (type) for the class
     - an array of links that will let you learn more about that class (including the link to the class itself, which you were following)

The key entity you care about is 'the identifier (@id) for the class', for each of the two classes in each mapping.

Because for your request the array of all the mappings always shows mappings from your class to something else, you will see that the the first class in the array will always be your class (@id = "http://purl.bioontology.org/ontology/SNOMEDCT/410607006"). Thus it is the list of @id values, from the second class of every pair, that you want to have.

I *think* this would be something like
     jsonOutput.get("classes").get(1).get("@id")
but I am not 100% sure what get("classes") returns ,and this may just return the first pair of classes, or the second entry from a very long array of matching classes.

See if something like that works for you.

John


On Nov 10, 2019, at 7:11 AM, Samira Babalou <samira.babalou at uni-jena.de<mailto:samira.babalou at uni-jena.de>> wrote:


Dear Sir or Madam,

I have one question and would be very thankful, if you could help me on that.

I used your API to get the existing mapping for my_class(e.g.410607006) in one ontology (e.g. SNOMEDCT). The result is a JSON file. From this JSON output, e.g. this page<http://data.bioontology.org/ontologies/SNOMEDCT/classes/http%3A%2F%2Fpurl.bioontology.org%2Fontology%2FSNOMEDCT%2F410607006/mappings>, which elements should I read?

>From the output, i am retrieving :

jsonOutput.get("classes").get(0).get("links").get("self")
is mapped to
jsonOutput.get("classes").get(1).get("links").get("self")


But I have doubt, that this is correct. Could you tell me which entities from this json output should I read?

Actually, I want to have a list that give me, for instance

  *   my_class is mapped to A.
  *   my_class is mapped to B.
  *   etc.

I would really appreciate your help,

Thanks & Regards,
Samira Babalou

--

Heinz-Nixdorf Chair for Distributed Information Systems
Friedrich Schiller University of Jena
Institute of Computer Science
Leutragraben 1, Jentower, R17N01
07743 Jena, Germany

Email:  Samira.babalou at uni-jena.de<mailto:Samira.babalou at uni-jena.de>
Web:    http://fusion.cs.uni-jena.de/fusion/
        http://fusion.cs.uni-jena.de/fusion/members/samira-babalou/


<pEpkey.asc>_______________________________________________
bioontology-support mailing list
bioontology-support at lists.stanford.edu<mailto:bioontology-support at lists.stanford.edu>
https://mailman.stanford.edu/mailman/listinfo/bioontology-support

========================
John Graybeal
Technical Program Manager
Center for Expanded Data Annotation and Retrieval /+/ NCBO BioPortal
Stanford Center for Biomedical Informatics Research
650-736-1632  | ORCID  0000-0001-6875-5360



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/bioontology-support/attachments/20191112/33fde522/attachment-0001.html>


More information about the bioontology-support mailing list