A genome "sketch" is a set of preprocessed data that makes it fast to compare genomes and get a similarity score. This is useful for doing genome searches, where you can find a list of similar genomes from a query genome.
This is a KBase dynamic (persistent) service that takes workspace IDs pointing to Assemblies, Genomes, or Reads and returns a list of similar genomes.
From the terminal, you can use the curl command to access the sketch service. Since the sketch serivce is a KBase dynamic service, you will have to find its active URL by searching for it here: "https://ci.kbase.us/#catalog/services".
The service accepts POST requests with a JSON payload with the following parameters:
{
"params": {
"ws_ref": <workspace reference>
"n_max_results": <integer between 1 and 100 (optional)>
"bypass_caching": <boolean (optional)>
}
}
You can use the following env vars:
KBASE_ENDPOINT- required - eg "https://ci.kbase.us/services/"KBASE_SECURE_CONFIG_PARAM_service_token- required - a KBase auth token that represents this service, used for making requests to the caching serviceKBASE_SECURE_CONFIG_PARAM_CACHING_SERVICE_URL- optionalKBASE_SECURE_CONFIG_PARAM_HOMOLOGY_URL- optional - defaults tohttps://homology.kbase.usKBASE_SECURE_CONFIG_PARAM_ID_MAPPER_URL- optional - defaults to useKBASE_ENDPOINTwith/idmapper/api/v1KBASE_SECURE_CONFIG_PARAM_HOMOLOGY_NAMESPACE- optional - defaults toNCBI_Refseq
Build and run locally with:
$ docker-compose upRun tests with docker-compose run web test in a separate terminal window
Important files:
kbase.ymlandcompile_report.jsonare the main configuration required by KBaseentrypoint.shis the docker container's entrypoint script. The option with no arguments runs the python server.Dockerfiledefines our container andrequirements.txtdefines our pip dependencies.- The actual server code lives in
src/server.py