An exchange server (gateway) built on top of the MME Reference Server that proxies requests from one MME service to one or more other MME services over the Matchmaker Exchange API.
- Python 2.7 or 3.3+
- ElasticSearch 2.x
-
Set up your Python environment and elasticsearch database, according to the instructions for the reference-server.
-
Clone the repository:
git clone https://github.com/MatchmakerExchange/exchange-server.git cd exchange-server
-
Install the Python package dependencies:
pip install -r requirements.txt
-
Authenticate a server to receive requests from the gateway:
mme-server servers add myserver --label "My Server" \ --base-url "https://my-matchmaker-service.org/api/v1" --key <PC_AUTH_TOKEN>
Pro-tip: If you don't specify a
--key
, a random one will be generated -
Authenticate a client to send requests to the gateway:
mme-server clients add myclient --label "My Client" --key "<CLIENT_AUTH_TOKEN>"
Pro-tip: If you don't specify a
--key
, a random one will be generated -
Start up the exchange server:
python manage.py
-
Try it out:
curl -XPOST \ -H 'X-Auth-Token: <CLIENT_AUTH_TOKEN>' \ -H 'Content-Type: application/vnd.ga4gh.matchmaker.v1.0+json' \ -H 'Accept: application/vnd.ga4gh.matchmaker.v1.0+json' \ -d '{"patient":{ "id":"1", "contact": {"name":"Jane Doe", "href":"mailto:[email protected]"}, "features":[{"id":"HP:0000522"}], "genomicFeatures":[{"gene":{"id":"NGLY1"}}], "test": true }}' localhost:8000/v1/servers/myserver/match
If you have any questions, feel free to post an issue on GitHub.
This repository is managed by the Matchmaker Exchange technical team. You can reach us via GitHub or by email.
Contributions are most welcome! Post an issue, submit a bugfix, or just try it out. We hope you find it useful.