Table of Contents

1 PubSeq REST API

Here we document the public REST API that comes with PubSeq. The tests run in the amazing emacs org-babel. See the bottom of this document for running the tests inside emacs.

1.1 Introduction

We built a REST API for COVID-19 PubSeq. The API source code can be found in api.py. To see if the service is up try

curl http://covid19.genenetwork.org/api/version
{
  "service": "PubSeq",
  "version": 0.1
}

The Python3 version is

import requests
response = requests.get("http://covid19.genenetwork.org/api/version")
response_body = response.json()
assert response_body["service"] == "PubSeq", "PubSeq API not found"
response_body

1.2 Fetch EBI XML

PubSeq provides an API that is used to export formats that are suitable for uploading data to EBI/ENA from our EXPORT menu. This is documented here.

requests.get("http://covid19.genenetwork.org/api/ebi/sample-MT32690.1.xml").text

2 Configure emacs to run tests

Execute a code block with C-c C-c. You may need to set

(org-babel-do-load-languages
 'org-babel-load-languages
 '((python . t)))
(setq org-babel-python-command "python3")

To skip confirmations you may also want to set

(setq org-confirm-babel-evaluate nil)

Created by Pjotr Prins (pjotr.public768 at thebird 'dot' nl) using Emacs org-mode and a healthy dose of Lisp!
Modified 2020-07-20 Mon 06:02
.