PathwayCommons / factoid-converters

Web services for Factoid project to convert between JSON, BioPAX, SBGN data formats
http://biopax.baderlab.org/factoid-converters/
MIT License
2 stars 1 forks source link

biopax_to_factoid: /biopax-url-to-json format, grounding in response #14

Open jvwong opened 3 years ago

jvwong commented 3 years ago

Regarding the endpoint /biopax-url-to-json

  1. Could you indicate (swagger) what format you are expecting when the url is retrieved? I suspect it's not BioPAX owl, application/xml but a tar.gz file?

  2. grounding: I don't believe this makes its way into the JSON response for bioentities. Ideally biofactoid would want NCBI Gene uids, but I realize there might be some mapping required for that.

IgorRodchenkov commented 3 years ago

@metincansiper , @jvwong There is code public String biopaxUrlToFactoid( @ApiParam("URL of a BioPAX RDF/XML file") @RequestBody String url) { BiopaxToFactoid converter = new BiopaxToFactoid(); try { String body = getContentFromUrl(url); InputStream is = new ByteArrayInputStream(body.getBytes(StandardCharsets.UTF_8));

which I doubt it works - it is read the URL string itself instead of the remote file/content I bet Why @RequestBody String url ? (not @RequestParam String url) Are you really sending the URL as the request body content instead of using some JSON object or query parameter? (Sorry if I am missing something - long time not looking here ;)))

metincansiper commented 3 years ago

@jvwong I updated the api description. I think we resolved the grounding issue in another thread.