COVID-19 PubSeq: Public SARS-CoV-2 Sequence Resource

public sequences ready for download!

Edit text!




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

1.1 Introduction

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

  "service": "PubSeq",
  "version": 0.1

The Python3 version is

import requests
baseURL="http://localhost:5067" # for development
# baseURL=""
response = requests.get(baseURL+"/api/version")
response_body = response.json()
assert response_body["service"] == "PubSeq", "PubSeq API not found"
service : PubSeq version : 0.1

1.2 Search for an entry

When you use the search box on PubSeq it queries the REST end point for information on the search items. For example

collection : fasta : id : MT533203.1 info :

where collection is the raw uploaded data. The hash value in c= is computed on the contents of the Arvados keep collection and effectively acts as a deduplication uuid.

1.3 Fetch metadata

Using above collection link you can fetch the metadata in JSON as it was uploaded originally from the SHeX expression, e.g. using

But better to use the more advanced sample metadata fetcher because is does a bit more in terms of expansion

collection : date : 2020-04-27 fasta : id : MT533203.1 info : mapper : minimap v. 2.17 sequencer : specimen :

1.4 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.

<?xml version="1.0" encoding="UTF-8"?>
  <SAMPLE alias="MT326090.1" center_name="COVID-19 PubSeq">
    <TITLE>COVID-19 PubSeq Sample</TITLE>
      <SCIENTIFIC_NAME>Severe acute respiratory syndrome coronavirus 2</SCIENTIFIC_NAME>
        <TAG>investigation type</TAG>
        <TAG>sequencing method</TAG>
        <TAG>collection date</TAG>
        <TAG>geographic location (latitude)</TAG>
        <TAG>geographic location (longitude)</TAG>
     <TAG>geographic location (country and/or sea)</TAG>
        <TAG>geographic location (region and locality)</TAG>
        <TAG>environment (material)</TAG>

2 Configure emacs to run tests

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

 '((python . t)))
(setq org-babel-python-command "python3")
(setq org-babel-eval-verbose t)
(setq org-confirm-babel-evaluate nil)

To skip confirmations you may also want to set

(setq org-confirm-babel-evaluate nil)

To see output of the inpreter open then Python buffer.

Edit text!

Other documents

We fetch sequence data and metadata. We query the metadata in multiple ways using SPARQL and onthologies
We submit a sequence to the database. In this BLOG we fetch a sequence from GenBank and add it to the database.
We modify a workflow to get new output
We modify metadata for all to use! In this BLOG we add a field for a creative commons license.
Dealing with PubSeq localisation data
We explore the Arvados command line and API
Generate the files needed for uploading to EBI/ENA
Documentation for PubSeq REST API