HMMs
Find
Find HMM annotations.
The response data also includes information about the installation state of the HMM collection. The installed
field describes the installed HMM release. The release
field describes the latest available release from the linked GitHub repository.
Parameters
Name | Type | Default | Description |
---|---|---|---|
find | string | term to search by | |
page | integer | 1 | page number of results to return |
per_page | integer | 15 | number of documents to return per page |
Example
GET /api/hmms?per_page=2
Response
Status: 200 OK
{ "documents": [ { "names": ["P3 protein", "coat protein", "P1 protein"], "families": { "Asfarviridae": 1, "Potyviridae": 179 }, "cluster": 1, "count": 185, "id": "7sisu7e2" }, { "names": [ "replication-associated protein", "replication associated protein", "Rep" ], "families": { "Geminiviridae": 235, "None": 2 }, "cluster": 2, "count": 253, "id": "ladu789k" } ], "total_count": 5585, "found_count": 5585, "page_count": 2793, "per_page": 2, "page": 1, "status": { "installed": { "id": 8460302, "name": "v0.2.0", "body": "- the first release using TravisCI for building and testing\r\n- merge annotations and profiles into one archive", "filename": "vthmm.tar.gz", "size": 86059385, "html_url": "https://github.com/virtool/virtool-hmm/releases/tag/v0.2.0", "published_at": "2017-11-10T00:27:20Z", "ready": true, "user": { "id": "igboyes" } }, "process": { "id": "bzfk2t76" }, "release": { "id": 8472569, "name": "v0.2.1", "body": "- remove some annotations that didn't have corresponding profiles", "etag": "W/\"81fc9c9b3e02ff03c8cc1163e8031ee3\"", "filename": "vthmm.tar.gz", "size": 85904451, "html_url": "https://github.com/virtool/virtool-hmm/releases/tag/v0.2.1", "download_url": "https://github.com/virtool/virtool-hmm/releases/download/v0.2.1/vthmm.tar.gz", "published_at": "2017-11-10T19:12:43Z", "content_type": "application/gzip", "newer": true }, "id": "hmm", "updating": false } }
Get
Get the complete representation of a single HMM annotation.
Example
GET /api/hmms/zltnktou
Response
Status: 200 OK
{ "families": { "None": 1, "Geminiviridae": 203 }, "total_entropy": 72.08, "length": 136, "cluster": 3, "entries": [ { "accession": "NP_040323.1", "gi": "9626084", "organism": "Pepper huasteco yellow vein virus", "name": "AL2 protein" }, { "accession": "NP_044924.1", "gi": "9629639", "organism": "Tomato mottle Taino virus", "name": "transactivator protein" } ], "genera": { "Begomovirus": 197, "Topocuvirus": 1, "None": 2, "Curtovirus": 4 }, "mean_entropy": 0.53, "count": 216, "names": ["AC2 protein", "C2 protein", "AC2"], "hidden": false, "id": "zltnktou" }
Errors
Status | Message | Reason |
---|---|---|
404 | Not found | HMM annotation does not exist |
Get Status
Get the status information for the HMM collection.
The HMM status describes the latest available release of the Virtool HMM data and the currently installed release.
When the release.newer
is true
the release can be used to update the HMM install installation.
When updating
is true
there is already an update proces in progress.
The process.id
describes the process document that describes the HMM installation process.
Example
GET /api/hmms/status
Response
Status: 200 OK
{ "installed": { "id": 8460302, "name": "v0.2.0", "body": "- the first release using TravisCI for building and testing\r\n- merge annotations and profiles into one archive", "filename": "vthmm.tar.gz", "size": 86059385, "html_url": "https://github.com/virtool/virtool-hmm/releases/tag/v0.2.0", "published_at": "2017-11-10T00:27:20Z", "ready": true, "user": { "id": "igboyes" } }, "process": { "id": "bzfk2t76" }, "release": { "id": 8472569, "name": "v0.2.1", "body": "- remove some annotations that didn't have corresponding profiles", "etag": "W/\"81fc9c9b3e02ff03c8cc1163e8031ee3\"", "filename": "vthmm.tar.gz", "size": 85904451, "html_url": "https://github.com/virtool/virtool-hmm/releases/tag/v0.2.1", "download_url": "https://github.com/virtool/virtool-hmm/releases/download/v0.2.1/vthmm.tar.gz", "published_at": "2017-11-10T19:12:43Z", "content_type": "application/gzip", "newer": true }, "id": "hmm", "updating": false }
Get Release
Check GitHub for the latest release of the Virtool HMM data set.
This is the only method for updating the available release information. When the newer
is true
the release can be used to update the HMM install installation.
Example
GET /api/hmms/status/release
Response
Status: 200 OK
{ "id": 8472569, "name": "v0.2.1", "body": "- remove some annotations that didn't have corresponding profiles", "etag": "W/\"81fc9c9b3e02ff03c8cc1163e8031ee3\"", "filename": "vthmm.tar.gz", "size": 85904451, "html_url": "https://github.com/virtool/virtool-hmm/releases/tag/v0.2.1", "download_url": "https://github.com/virtool/virtool-hmm/releases/download/v0.2.1/vthmm.tar.gz", "published_at": "2017-11-10T19:12:43Z", "content_type": "application/gzip", "newer": true }
Errors
Status | Message | Reason |
---|---|---|
502 | Repository does not exist | the GitHub repository set in the hmm_slug setting does not exist |
502 | Could not reach GitHub | the server could not connect to GitHub |
List Updates
List the update history for the.
Most recently applied updates are first in returned the array. Updates that are in the process of being installed are included in the response. The ready
field is true
when the update has been successfully installed.
Example
GET /api/hmms/status/updates
Response
Status: 200 OK
[ { "id": 8460302, "name": "v0.2.0", "body": "- the first release using TravisCI for building and testing\r\n- merge annotations and profiles into one archive", "filename": "vthmm.tar.gz", "size": 86059385, "html_url": "https://github.com/virtool/virtool-hmm/releases/tag/v0.2.0", "published_at": "2017-11-10T00:27:20Z", "ready": true, "user": { "id": "igboyes" } } ]
Install
Install the locally cached release as the official virus HMM reference.
Installing when a previous release has already been installed will remove all HMMs not referenced in existing analyses and install the new release.
Example
POST /api/hmms/updates
Response
Status: 201 Created
{ "id": 8460302, "name": "v0.2.0", "body": "- the first release using TravisCI for building and testing\r\n- merge annotations and profiles into one archive", "filename": "vthmm.tar.gz", "size": 86059385, "html_url": "https://github.com/virtool/virtool-hmm/releases/tag/v0.2.0", "published_at": "2017-11-10T00:27:20Z", "created_at": "2018-06-15T18:26:30.787000Z", "ready": false, "user": { "id": "igboyes" } }
Errors
Status | Message | Reason |
---|---|---|
400 | Target release does not exist | no release information has been fetched and cached from GitHub |
403 | Not permitted | user does not have modify_hmm permission |
Purge
Permanently remove all HMMs that are not referenced by NuVs analysis records.
HMMs that are referenced in NuVs analysis records will be soft-deleted. They will not be returned in search results, but the data is still available for constructing annotated NuVs results.
Example
DELETE /api/hmms
Response
Status: 204 No content
Errors
Status | Message | Reason |
---|---|---|
403 | Not permitted | user does not have modify_hmm permission |