Wiki
Clone wikienterobase-web / api_alleles
Top level links:
Top level links:
- Main top level page for all documentation
- EnteroBase Features
- Registering on EnteroBase and logging in
- Tutorials
- Using the API
- About the underlying pipelines and other internals
- How schemes in EnteroBase work
- FAQ
The alleles query method
Refer to interactive documentation : http://enterobase.warwick.ac.uk/api/v2.0/swagger-ui#!/Alleles
The alleles
query method shows sequences for loci, derived from an assembly.
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" set to "MLST_Achtman", "reldate" set to "20", "locus" set to "aroC" and "limit" set to "50". This will fetch new allele sequences for aroC in the 7 gene MLST scheme for Salmonella from the last 20 days. The corresponds to an HTTP request to the URL:
http://enterobase.warwick.ac.uk/api/v2.0/senterica/MLST_Achtman/alleles?reldate=20&locus=aroC&limit=50
The result is:
{ "alleles": [ { "allele_barcode": "SAL_AP0358AA_AL", "allele_id": "716", "locus": "aroC", "seq": "GTGTTCCGTCCGGGGCACGCGGATTACACCTACGAACAAAAATACGGCCTGCGCGACTATCGCGGCGGCGGGCGTTCATCCGCCCGTGAAACCGCCATGCGCGTCGCGGCAGGCGCTATCGCCAAAAAATATCTGGCGCAGAAATTCGGCGTGGTGATTCGCGGCTGCCTGACCCAGATGGGTGATATTCCGCTGGAAATCAAAGACTGGGATCAGGTAGAGCAAAACCCGTTCTTCTGCCCGGACCCGGATAAAATCGAGGCGCTGGATGAGCTGATGCGCGCTCTGAAAAAAGAGGGCGATTCCATCGGCGCGAAAGTCACCGTGGTGGCCGACAGCGTGCCCGCCGGGCTTGGCGAGCCGGTATTTGACCGCCTGGACGCCGATATCGCCCACGCGCTGATGAGCATTAACGCCGTGAAGGGCGTGGAAATCGGCGACGGTTTCGGCGTGGTGCAACTGCGCGGCAGCCAGAACCGCGACGAAATCACCACTGCCGGT" } ], "links": { "paging": {}, "records": 1, "total_records": 1 } }
Note that as discussed in the notes about downloading schemes it is inadvisable to download the allele sequences 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