Client-server to handle Reindeer in query mode.
Project description
RDEER-SERVICE
rdeer-service is a tool to facilitate the use of Reindeer as a socket mode. It allows multiple Reindeer indexes to be loaded into memory, spread over several servers, enabling queries to be made quickly and easily.
It consists of a server part: rdeer-server, one instance of which will be started per index server, and a client part: rdeer, which allows index manipulation (stopping, starting, etc.) and queries.
It is a companion to Transipedia, a web application for querying Reindeer but it may be useful to use it independently.
Prerequisite
- Reindeer must be installed on indexes servers an the reindeer_socket binary in your $PATH
- You need some Reindeer indexes (Stored on SSD disks to better performances).
Installation
Recommanded (pip)
python3 -m pip install rdeer-service
Other (git)
git clone https://github.com/Bio2M/rdeer-service.git
How to use?
Start the server
the server must be in the same physical server than Reindeer, You can have multiple servers with Reindeer. Each of them must have the server.
rdeer-server /path/to/indexes
- rdeer-server listen on port 12800, you can change this with
--port
option. - The server will only be able to handle indexes in the specified directory. If your indexes are spread over several directories, you may create symlinks in
/path/to/indexes
. - You can add, remove or change the name of the indexes, rdeer-server takes the changes on the fly.
- It is recommended to start rdeer-server as a daemon, using systemd, supervisord or similar.
Use the client
The client could requests remote rdeer-server servers. You can enterely manage yours Reindeer indexes with subcommand:
rdeer list -a
to show all indexes with their statusrdeer start <index-name>
to start a index (the index name is the directory hosting the index files)rdeer stop <index-name>
to stop a indexrdeer check <index-name>
to verify if index respondingrdeer status <index-name>
to get the index status (available, loading, running, error)rdeer query <index-name> -q <query.fa>
to request an index
show running indexes:
rdeer-client list
Show all indexes handled by rdeer-server
rdeer-client list -a
list all accessible indexes by rdeer-server, with status. Status are :
available
the index is not runningloading
the index is in a transitional mode until the running moderunning
the index is started, and can be resquested.error
a error occured on the index.
Start an index:
rdeer-client start my-index
Will starts the my-index Reindeer index. When status is running
, the index is ready to respond to requests.
Query an index
rdeer-client query my-index -q fasta-query
Requests the specified index, the query file is required and must be in a fasta format.
Options of query subcommand (rdeer-client query --help
):
-q/--query
to send a query file at the fasta format (required)-f/--format {raw,sum,average,mean,normalize}
whereraw
to get resultssum
to get sum of kmer countsaverage
to get sum of kmer counts / number of kmersnormalize
to get normalized counts as billion of kmers
-s/--server
to request rdeer-server on remote host-p/--port
to request rdeer-server on a specified port (default: 12800)-o/--outfile
output is stdout by default, you can specified a file
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file rdeer-service-2.0.2.tar.gz
.
File metadata
- Download URL: rdeer-service-2.0.2.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 601d1e257215b25a1bc4e39ee8265ee58c9adedcfebf2eb543271f29b612bf9e |
|
MD5 | 006a4387416bd60746f1d0fd68efdc17 |
|
BLAKE2b-256 | 018f1bcb4104936c939f50dae8aad88048e51fc174da99254f1afbb9a7a1f183 |
Provenance
File details
Details for the file rdeer_service-2.0.2-py3-none-any.whl
.
File metadata
- Download URL: rdeer_service-2.0.2-py3-none-any.whl
- Upload date:
- Size: 25.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4c8336af9a2b4e5b35062517e3f40d4ace9b1935830ecf3477eae7de95773ed |
|
MD5 | cd62c6a5745a5f2fbcccefcf87660503 |
|
BLAKE2b-256 | d0f9b1eb04c6eb9aba587c2f7222efaf1294403872f20233dc57eb426769791e |