-
Notifications
You must be signed in to change notification settings - Fork 4
PubMLST API setup tutorial for FastMLST
This tutorial shows how to create your PubMLST API credentials and use them with FastMLST.
- You need a PubMLST account.
- You need FastMLST installed.
- These steps only need to be completed once for each PubMLST account.
If you do not already have a PubMLST account, create one and follow the registration instructions on the website.
After you have access to your account, go to MY ACCOUNT in the top-right corner of the PubMLST website.
Open Database registrations and select all available databases using Check all.
Press the REGISTER button to complete the database registration.
After registering the databases, go to API keys.
Create a new API key by pressing the SUBMIT button. You can change the key name before creating it if you want.
Once the key is created, save the following values:
Client idClient secret
Use your Client id and Client secret with FastMLST:
fastmlst --pubmlst-connect \
--pubmlst-client-id "YOUR_CLIENT_ID" \
--pubmlst-client-secret "YOUR_CLIENT_SECRET"Example:
fastmlst --pubmlst-connect \
--pubmlst-client-id "KzXGdTYf1cf4fnWbxON8SN7t" \
--pubmlst-client-secret "JookHVPRgmCRnaZrhFzcTa0qtgvi62udcw7Cw0nlFm"This command opens the PubMLST authorization flow in your browser and stores the access tokens locally for future use.
Authorize FastMLST in your browser and paste the verifier code:
https://pubmlst.org/bigsdb?db=pubmlst_neisseria_seqdef&page=authorizeClient&oauth_token=MISwl272pbgppOtAsZdmwuw4J42FmEim
OAuth verifier: After the connection is configured, you can list the available PubMLST schemes:
fastmlst --scheme-list
(1) pubmlst_achromobacter_seqdef_1 | pubmlst_achromobacter_seqdef:1 | achromobacter | MLST
(2) pubmlst_abaumannii_seqdef_1 | pubmlst_abaumannii_seqdef:1 | abaumannii | MLST (Oxford)
(3) pubmlst_abaumannii_seqdef_2 | pubmlst_abaumannii_seqdef:2 | abaumannii | MLST (Pasteur)
(4) pubmlst_abaumannii_seqdef_3 | pubmlst_abaumannii_seqdef:3 | abaumannii | cgMLST v1
(5) pubmlst_actinobacillus_seqdef_1 | pubmlst_actinobacillus_seqdef:1 | actinobacillus | MLST
(6) pubmlst_aeromonas_seqdef_1 | pubmlst_aeromonas_seqdef:1 | aeromonas | MLST
(7) pubmlst_aactinomycetemcomitans_seqdef_1 | pubmlst_aactinomycetemcomitans_seqdef:1 | aactinomycetemcomitans | MLST
(8) pubmlst_aphagocytophilum_seqdef_1 | pubmlst_aphagocytophilum_seqdef:1 | aphagocytophilum | MLST
(9) pubmlst_aphagocytophilum_seqdef_2 | pubmlst_aphagocytophilum_seqdef:2 | aphagocytophilum | ankA
(10) pubmlst_aphagocytophilum_seqdef_3 | pubmlst_aphagocytophilum_seqdef:3 | aphagocytophilum | groELYou can download any listed scheme with --update-mlst. For example:
fastmlst --update-mlst "pubmlst_cdifficile_seqdef_1"After completing these steps, you will be able to:
- authenticate FastMLST with PubMLST,
- list available schemes,
- download the schemes you want to use locally.