Wiki

Clone wiki

enterobase-web / api_sts

Top level links:

#Searching ST data - the sts query method Refer to interactive documentation : http://enterobase.warwick.ac.uk/api/v2.0/swagger-ui#!/Sts

The sts query method shows Sequence Types (STs) and IDs for pipeline/ genotype data.

An example of this type of query to try in the interactive documentation which is also on the page about downloading schemes has "database" set to "senterica", "scheme" (in the path and as a parameter) set to "MLST_Achtman", "show_alleles" set to "false" and "reldate" set to "20". This fetches the new STs in the 7 gene MLST scheme from the last 20 days. (Note that you may obtain different results than in this documentation due to the query being conducted at a different time resulting the query fetching results for a different time interval.) This corresponds to an HTTP request (using the API key) with the URL:

http://enterobase.warwick.ac.uk/api/v2.0/senterica/MLST_Achtman/sts?scheme=MLST_Achtman&show_alleles=false&limit=5&reldate=20

The results from this query (at the time of writing this documentation) are:

{
  "STs": [
    {
      "ST_id": "3856",
      "barcode_link": "http://enterobase.warwick.ac.uk/api/v1.0/lookup?barcode=SAL_HB2013AA_ST",
      "create_time": "2017-04-12 15:36:09.782739",
      "info": {
        "lineage": "",
        "st_complex": "224",
        "subspecies": ""
      },
      "reference": {
        "lab_contact": "public",
        "refstrain": "SAL_RA9042AA_AS",
        "source": "mlst.warwick.ac.uk"
      },
      "scheme": "UoW",
      "st_barcode": "SAL_HB2013AA_ST"
    },
    {
      "ST_id": "3857",
      "barcode_link": "http://enterobase.warwick.ac.uk/api/v1.0/lookup?barcode=SAL_HB2022AA_ST",
      "create_time": "2017-04-13 07:38:58.579619",
      "info": null,
      "reference": {
        "lab_contact": "public",
        "refstrain": "SAL_RA9134AA_AS",
        "source": "mlst.warwick.ac.uk"
      },
      "scheme": "UoW",
      "st_barcode": "SAL_HB2022AA_ST"
    },
    {
      "ST_id": "3858",
      "barcode_link": "http://enterobase.warwick.ac.uk/api/v1.0/lookup?barcode=SAL_HB2024AA_ST",
      "create_time": "2017-04-13 08:22:20.405268",
      "info": null,
      "reference": {
        "lab_contact": "public",
        "refstrain": "SAL_RA9183AA_AS",
        "source": "mlst.warwick.ac.uk"
      },
      "scheme": "UoW",
      "st_barcode": "SAL_HB2024AA_ST"
    },
    {
      "ST_id": "3859",
      "barcode_link": "http://enterobase.warwick.ac.uk/api/v1.0/lookup?barcode=SAL_HB2026AA_ST",
      "create_time": "2017-04-13 09:59:28.391416",
      "info": null,
      "reference": {
        "lab_contact": "public",
        "refstrain": "SAL_RA9211AA_AS",
        "source": "mlst.warwick.ac.uk"
      },
      "scheme": "UoW",
      "st_barcode": "SAL_HB2026AA_ST"
    },
    {
      "ST_id": "3860",
      "barcode_link": "http://enterobase.warwick.ac.uk/api/v1.0/lookup?barcode=SAL_HB2028AA_ST",
      "create_time": "2017-04-13 11:02:00.465841",
      "info": {
        "lineage": "",
        "st_complex": "4",
        "subspecies": ""
      },
      "reference": {
        "lab_contact": "public",
        "refstrain": "SAL_RA9255AA_AS",
        "source": "mlst.warwick.ac.uk"
      },
      "scheme": "UoW",
      "st_barcode": "SAL_HB2028AA_ST"
    }
  ],
  "links": {
    "paging": {
      "next": "http://enterobase.warwick.ac.uk/api/v2.0/senterica/MLST_Achtman/sts?limit=5&offset=5&show_alleles=false&scheme=MLST_Achtman&reldate=20"
    },
    "records": 5,
    "total_records": 28
  }
}

Note that as discussed in the notes about downloading schemes it is inadvisable to download the ST profiles in their entirety using the above method, rather to download a tarball with the daily dump of all data and update with new information at regular intervals using queries like the one above as is described on that page.

Updated