diff options
author | BonfaceKilz | 2021-03-10 19:22:32 +0300 |
---|---|---|
committer | BonfaceKilz | 2021-03-10 19:22:32 +0300 |
commit | 7f9a293929be021eb73aec35defe254351557dcb (patch) | |
tree | bb2b2013c3ba3239c1edff553d5d22e0d2a6fe43 | |
parent | 3eae93bf7a6cdb014aaf4aded2087c6840155126 (diff) | |
download | genenetwork3-7f9a293929be021eb73aec35defe254351557dcb.tar.gz |
Update docs with k-gwa endpoints demo
-rw-r--r-- | docs/gemma.ipynb | 85 |
1 files changed, 81 insertions, 4 deletions
diff --git a/docs/gemma.ipynb b/docs/gemma.ipynb index 4fbaab2..a66df47 100644 --- a/docs/gemma.ipynb +++ b/docs/gemma.ipynb @@ -8,7 +8,7 @@ "\n", "This document outlines how to use gemma from Genenetwork3.\n", "\n", - "The current mechanism for how Gemma runs is that when you run one of the endpoints that runs the actual gemma, it constructs the command and queues it in to a REDIS queue; thereby bypassing any time-out issues with the endpoind for long running process. A worker(sheepdog) processes the endpoints.\n", + "The current mechanism for how Gemma runs is that when you run one of the endpoints that runs the actual gemma, it constructs the command and queues it in to a REDIS queue; thereby bypassing any time-out issues with the endpoint for a long running process. A worker(sheepdog) processes the endpoints.\n", "\n", "If you are running gn3 through a development environment, ensure that it is up and running by running the command:\n", "\n", @@ -374,11 +374,88 @@ ] }, { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## K-GWA computation\n", + "\n", + "Computing k and gwa in one full swoop. This is important since in GN2, gemma does this in one full swoop." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##### POST /api/gemma/k-gwa-compute/covars/maf/:maf/:token\n" + ] + }, + { "cell_type": "code", - "execution_count": null, + "execution_count": 89, "metadata": {}, - "outputs": [], - "source": [] + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'output_file': 'c718773b04935405258315b9588d13e6-output.json', 'status': 'queued', 'unique_id': 'cmd::2021-03-1010-1138-1138-558d7849-793f-4625-aac9-73d6bbc6dfdb'}\n" + ] + } + ], + "source": [ + "r = requests.post(\"http://gn3-test.genenetwork.org/api/gemma/k-gwa-compute/covars/VROD4N-XVW1L0\")\n", + "print(r.json())" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##### POST /api/gemma/k-gwa-compute/loco/:chromosomes/maf/:maf/:token" + ] + }, + { + "cell_type": "code", + "execution_count": 92, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'output_file': '8f4906862459e59dcb452fd8162d2cc1-output.json', 'status': 'queued', 'unique_id': 'cmd::2021-03-1010-1402-1402-1fe13423-e4f6-4f4f-9c1d-c855e3ab55b5'}\n" + ] + } + ], + "source": [ + "r = requests.post(\"http://gn3-test.genenetwork.org/api/gemma/k-gwa-compute/loco/1%2C2%2C3/maf/9/VROD4N-XVW1L0\")\n", + "print(r.json())" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##### POST /api/k-gwa-compute/covars/loco/:chromosomes/maf/:maf/:token" + ] + }, + { + "cell_type": "code", + "execution_count": 93, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'output_file': 'c718773b04935405258315b9588d13e6-output.json', 'status': 'queued', 'unique_id': 'cmd::2021-03-1010-1947-1947-c07c85e7-1355-4fab-bf9c-6c5e68f91a36'}\n" + ] + } + ], + "source": [ + "r = requests.post(\"http://gn3-test.genenetwork.org/api/gemma//k-gwa-compute/covars/loco/1%2C2%2C3/maf/9/VROD4N-XVW1L0\")\n", + "print(r.json())" + ] } ], "metadata": { |