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] bulk download of mapping data?

Miller, Mark markampa at pennmedicine.upenn.edu
Wed Aug 1 05:38:09 PDT 2018


Thanks, Jennifer.  I understand.

I modified the python label-fetching example https://github.com/ncbo/ncbo_rest_sample_code/blob/master/python/python3/get_labels.py to get mappings.  I also wrote an R script that gets terms from the search API.  I’m thinking of ways to make them more efficient, but in the absence of that, there may be times when I send queries that require a lot of paging.

-Mark

From: Jennifer Leigh Vendetti [mailto:vendetti at stanford.edu]
Sent: Monday, July 30, 2018 12:09 PM
To: Miller, Mark <markampa at pennmedicine.upenn.edu>
Cc: support at bioontology.org
Subject: Re: [bioontology-support] bulk download of mapping data?

Hello Mark,



On Jul 27, 2018, at 12:45 PM, Miller, Mark <markampa at pennmedicine.upenn.edu<mailto:markampa at pennmedicine.upenn.edu>> wrote:

I’m user markampa

I would like to download a large number of your high-quality term mappings.  I think I see how to do it thought the API, but would prefer downloading a static file or retrieving the mappings with a SPARQL query.


The open SPARQL endpoint is a beta service that we published a number of years ago, but haven’t had the resources to maintain. The data is entirely out of date. Current ontology data is only available via our REST API.

Apologies that we also don’t make the mappings available as static files.

If you let me know what mappings you’re trying to retrieve, I can help with which API calls to use.

Kind regards,
Jennifer





I see https://www.bioontology.org/wiki/SPARQL_BioPortal but can’t seem to get the sample queries to work.

I created a query file like this

mark at office:~/apache-jena-3.8.0/bin$<mailto:mark at office:~/apache-jena-3.8.0/bin$> cat > ~/bpmap.rq
PREFIX map: <http://protege.stanford.edu/ontologies/mappings/mappings.rdfs#<http://protege.stanford.edu/ontologies/mappings/mappings.rdfs>>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#<http://www.w3.org/2000/01/rdf-schema>>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#<http://www.w3.org/2004/02/skos/core>>
SELECT
*
WHERE {
        ?mapping map:target <http://purl.bioontology.org/ontology/CSP/0468-5952> .
        ?mapping map:source ?source .
    }

And submitted it with Jena’s remote query command like this, but got an error.

mark at office:~/apache-jena-3.8.0/bin$<mailto:mark at office:~/apache-jena-3.8.0/bin$> ./rsparql --service 'http://sparql.bioontology.org/mappings/sparql/?apikey=9cf735c3-a44a-404f-8b2f-c49d48b2b8b2' --query  ~/bpmap.rq
HTTP Exeception
HttpException: 500 HTTP 500 error making the query: INTERNAL SERVER ERROR
        at org.apache.jena.sparql.engine.http.HttpQuery.rewrap(HttpQuery.java:370)
        at org.apache.jena.sparql.engine.http.HttpQuery.execGet(HttpQuery.java:336)
        at org.apache.jena.sparql.engine.http.HttpQuery.exec(HttpQuery.java:288)
        at org.apache.jena.sparql.engine.http.QueryEngineHTTP.execResultSetInner(QueryEngineHTTP.java:352)
        at org.apache.jena.sparql.engine.http.QueryEngineHTTP.execSelect(QueryEngineHTTP.java:344)
        at org.apache.jena.sparql.util.QueryExecUtils.doSelectQuery(QueryExecUtils.java:196)
        at org.apache.jena.sparql.util.QueryExecUtils.executeQuery(QueryExecUtils.java:79)
        at arq.rsparql.exec(rsparql.java:76)
        at jena.cmd.CmdMain.mainMethod(CmdMain.java:93)
        at jena.cmd.CmdMain.mainRun(CmdMain.java:58)
        at jena.cmd.CmdMain.mainRun(CmdMain.java:45)
        at arq.rsparql.main(rsparql.java:44)
mark at office:~/apache-jena-3.8.0/bin$<mailto:mark at office:~/apache-jena-3.8.0/bin$>
_______________________________________________
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

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


More information about the bioontology-support mailing list