aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBonfaceKilz2021-03-06 17:45:34 +0300
committerBonfaceKilz2021-03-08 21:09:58 +0300
commit13428f9d9496dc2af44065f03fc7fc747a5a0ea9 (patch)
tree9f3ef84393aef25738c87862b5c9d18342978338 /docs
parent529e72eb1aed89e018428cabdf63e98983c508ed (diff)
downloadgenenetwork3-13428f9d9496dc2af44065f03fc7fc747a5a0ea9.tar.gz
Update jupyter notebook with more endpoints
Diffstat (limited to 'docs')
-rw-r--r--docs/gemma.ipynb63
1 files changed, 58 insertions, 5 deletions
diff --git a/docs/gemma.ipynb b/docs/gemma.ipynb
index b7796e3..4c5f9a6 100644
--- a/docs/gemma.ipynb
+++ b/docs/gemma.ipynb
@@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "#### Running GEMMA from GN3\n",
+ "# Running GEMMA from GN3\n",
"\n",
"This document outlines how to use gemma from Genenetwork3."
]
@@ -25,7 +25,9 @@
{
"cell_type": "code",
"execution_count": 2,
- "metadata": {},
+ "metadata": {
+ "scrolled": true
+ },
"outputs": [
{
"name": "stdout",
@@ -37,21 +39,72 @@
],
"source": [
"import requests\n",
- "r = requests.get(\"http://127.0.0.1:8080/gemma/version\")\n",
+ "r = requests.get(\"http://127.0.0.1:8080/api/gemma/version\")\n",
"print(r.json())"
]
},
{
"cell_type": "markdown",
"metadata": {},
- "source": []
+ "source": [
+ "## Uploading data\n",
+ "\n",
+ "Before you perform any computation, you need to ensure you have your data uploaded\n",
+ "\n",
+ "TODO"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## K-Computation\n",
+ "\n",
+ "Make sure that your metadata file is up to date!\n",
+ "You need the genofile, traitfile, and snpsfile. You also need a token provided when you first uploaded your metadata file."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#### Computing K-Values (no loco, no cavariates): \n",
+ "##### POST /gemma/k-compute/:token\n",
+ "The end command will look something like:\n",
+ "\n",
+ "```\n",
+ "gemma-wrapper --json -- -debug \\\n",
+ " -g genotype-file -p traitfile \\\n",
+ " -a genotypte-snps -gk > input-hash-k-output-filename\"\n",
+ "```"
+ ]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
- "source": []
+ "source": [
+ "# Demo\n",
+ "import requests\n",
+ "r = requests.post(\"localhost:8080/api/gemma/k-compute/abcde-abcde\")\n",
+ "print(r.json())"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#### POST /gemma/k-compute/:chromosomes/:token\n",
+ "\n",
+ "Cqmpute K values with chromosomes. The end command will look similar to:\n",
+ "\n",
+ "```\n",
+ " gemma-wrapper --json --loco 1,2,3,4 \\\n",
+ " -debug -g genotypefile -p traitfile \\\n",
+ " -a genotype-snps -gk > k_output_filename.json\n",
+ "```"
+ ]
}
],
"metadata": {