{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Using Knetminer SPARQL with Jupyter, a Demo\n",
"\n",
"With Knetminer available as SPARQL, we can do our own data analyses, in addition to using the \n",
"intuitive functionality of the [Knetminer web application][10].\n",
"\n",
"Here it is a simple exmple. Let's do some investigation on the question: which biological \n",
"processes are involved in yellow rust? \n",
"\n",
"One way to figure out an answer is to start from genes mentioned in publications, then follow the \n",
"proteins encoded by such genes, and see the GO biological processes those proteins are annotated\n",
"with. \n",
"\n",
"If we look ad the [knowledge graph that Knetminer has for wheat][20], we soon discover that \n",
"actually we also have to consider proteins related to gene-encoded proteins, since proteins with \n",
"similar sequences or other public cross references are often relevant. \n",
"\n",
"In SPARQL and using our [BioKNO Ontology][30], this translates to the following query:\n",
"\n",
"[10]: https://knetminer.com\n",
"[20]: http://knetminer-data.cyverseuk.org/lodestar/sparql\n",
"[30]: https://github.com/Rothamsted/bioknet-onto"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"query = \"\"\"\n",
"PREFIX bk:
\n", " | GO Bio Proc | \n", "# Genes | \n", "
---|---|---|
0 | \n", "Brassinosteroid Mediated Signaling Pathway | \n", "60 | \n", "
1 | \n", "Protein Phosphorylation | \n", "53 | \n", "
2 | \n", "Nodulation | \n", "36 | \n", "
3 | \n", "Innate Immune Response | \n", "33 | \n", "
4 | \n", "Detection Of Brassinosteroid Stimulus | \n", "26 | \n", "
5 | \n", "Regulation Of Seedling Development | \n", "24 | \n", "
6 | \n", "Brassinosteroid Homeostasis | \n", "24 | \n", "
7 | \n", "Positive Regulation Of Flower Development | \n", "24 | \n", "
8 | \n", "Pollen Exine Formation | \n", "24 | \n", "
9 | \n", "Microtubule Bundle Formation | \n", "24 | \n", "
10 | \n", "Anther Wall Tapetum Cell Differentiation | \n", "24 | \n", "
11 | \n", "Response To UV-B | \n", "24 | \n", "
12 | \n", "Leaf Development | \n", "24 | \n", "
13 | \n", "Negative Regulation Of Cell Death | \n", "24 | \n", "
14 | \n", "Skotomorphogenesis | \n", "24 | \n", "
15 | \n", "Defense Response | \n", "19 | \n", "
16 | \n", "Plant-type Hypersensitive Response | \n", "18 | \n", "
17 | \n", "Protein Autophosphorylation | \n", "18 | \n", "
18 | \n", "Microsporogenesis | \n", "6 | \n", "
19 | \n", "Megasporogenesis | \n", "6 | \n", "
20 | \n", "Anther Wall Tapetum Development | \n", "6 | \n", "
21 | \n", "Regulation Of Growth | \n", "5 | \n", "
22 | \n", "Positive Regulation Of Innate Immune Response | \n", "5 | \n", "
23 | \n", "Regulation Of Defense Response To Fungus | \n", "5 | \n", "
24 | \n", "Cell Differentiation | \n", "5 | \n", "
25 | \n", "Somatic Embryogenesis | \n", "5 | \n", "