Skip to content
This repository has been archived by the owner on Sep 24, 2019. It is now read-only.

Export BEL Nanopubs in search result to a file. #5

Open
wshayes opened this issue Sep 17, 2015 · 5 comments
Open

Export BEL Nanopubs in search result to a file. #5

wshayes opened this issue Sep 17, 2015 · 5 comments
Assignees

Comments

@wshayes
Copy link
Member

wshayes commented Sep 17, 2015

Expanding upon the initial issue to support a CSV export:

We should allow export of the search results (total set after facets selected) to any file format supported by the OpenBEL API. We will then make CSV export a supported BEL Nanopub format.

This is a more useful, general solution that allows BEL Manager to export to all core file formats (e.g. BEL Script, XBEL, JSON) as well as user-added formats (e.g. SIF).

This work would involve:

Example:

Export at most 5000 BEL Nanopubs to a BEL Script file:

http://next.belframework.org/api/evidence?size=5000&format=bel

Export BEL Nanopubs filtered to Human to an XBEL file:

http://next.belframework.org/api/evidence?size=5000&filter={%22category%22:%22experiment_context%22,%22name%22:%22Species%22,%22value%22:%229606%22}&format=xbel
@kellymccann91
Copy link
Contributor

The Export button has been added on the top right of the search results.

Questions:
-What should it say? Is 'Export (+ icon)' meaningful enough for users to know that it refers to search results?
-Is the location alright now? As a user is that where you'd look?
-Aurelia.dialog - @wshayes: I should have pestered you about this yesterday. I have the plugin configured, but I'm struggling to actually call the code. I'll keep trying. Then I may need your help to retrieve and download the search results in Excel/CSV format.

@wshayes wshayes modified the milestone: 1.0 Release Nov 12, 2015
@wshayes wshayes assigned wshayes and abargnesi and unassigned kellymccann91 and wshayes Dec 13, 2015
@wshayes
Copy link
Member Author

wshayes commented Dec 13, 2015

Tony - can you provide an API endpoint that will accept a search query and provide an export as either BEL Script, XBEL or Evidence JSON as you did with the Dataset exports?

After that, please assign this back to Kelly so she can redo the Export button to allow a dropdown to select the export format.

@wshayes wshayes removed this from the 1.0 Release milestone Dec 13, 2015
@abargnesi
Copy link
Member

Can do. I can add the Accept header and format query parameter option to GET /api/evidence to export the whole, or filtered set, of the evidence_collection resource to a download.

@abargnesi abargnesi changed the title Add export of search results Export BEL Nanopubs in search result to a file. Mar 22, 2016
@abargnesi
Copy link
Member

OpenBEL API 0.6.1 added retrieving BEL Nanopubs in any supported file format.

I have improved the solution in the issue description above, @kellymccann91 please take a look.

@wshayes
Copy link
Member Author

wshayes commented Mar 29, 2016

Tony shared the following on the API enhancement:

The /api/evidence and /api/datasets/{id}/evidence endpoints will respect the "Accept" request header and "format" query parameter. The "format" query parameter is preferred when both are provided.

Example:

Accept: application/xml
/api/evidence?start=0&size=1000&filter={...}

OR

/api/evidence?start=0&size=1000&filter={...}&format=xbel


The OpenBEL API provides the following by default:

  • id: bel, name: "BEL Script Translator", media_type: application/bel, extension: bel
  • id: xbel, name: "XBEL Translator", media_type: application/xml, extension: xbel
  • id: json_evidence, name: "JSON Evidence Translator", media_type: application/json, extension: json
  • id: jgf, name: "JSON Graph Format Translator", media_type: application/vnd.jgf+json, extension: jgf.json
  • id: nquads, name: "N-quads RDF Translator", media_type: application/n-quads, extension: nq
  • id: turtle, name: "Turtle RDF Translator", media_type: application/turtle OR application/x-turtle, extension: ttl

There are some other RDF formats supported but they can wait for 104.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants