Skip to content

Commit

Permalink
Update nb
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Reese committed Sep 29, 2020
1 parent a3f5d0c commit b2c55a1
Showing 1 changed file with 70 additions and 6 deletions.
76 changes: 70 additions & 6 deletions Run-KG-COVID-19-pipeline.ipynb → example-KG-COVID-19-usage.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,36 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"{'nodes_number': '377577',\n",
" 'is_directed': 'false',\n",
" 'density': '0.00021710748243868716',\n",
" 'degrees_min': '0',\n",
" 'traps_rate': '0.022019349695558788',\n",
" 'bidirectional_rate': '1',\n",
" 'degrees_mean': '81.97479189675218',\n",
" 'selfloops_rate': '0.00001554029368764255',\n",
" 'connected_components_number': '9068',\n",
" 'degrees_mode': '1',\n",
" 'singleton_nodes': '8314',\n",
" 'degrees_max': '90378',\n",
" 'edges_number': '30951796',\n",
" 'unique_node_types_number': '37',\n",
" 'unique_edge_types_number': '33',\n",
" 'strongly_connected_components_number': '9068',\n",
" 'degrees_median': '6'}"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"graph = EnsmallenGraph.from_csv(\n",
" edge_path=\"merged-kg_edges.tsv\",\n",
Expand Down Expand Up @@ -466,18 +493,55 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 8,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"/home/reeseju/kg-covid-19/kg_covid_19/query.py:17: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.\r\n",
" return yaml.load(open(yaml_file))\r\n"
]
}
],
"source": [
"!python run.py query -y queries/sparql/query-01-bl-cat-counts.yaml # or make a new YAML file and write your own query"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 9,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['v1', 'v0']\n",
"['199', 'organism taxon']\n",
"['19131', 'https://w3id.org/biolink/vocab/Gene']\n",
"['3908', 'https://w3id.org/biolink/vocab/NamedThing']\n",
"['20167', 'https://w3id.org/biolink/vocab/Protein']\n",
"['30534', 'https://w3id.org/biolink/vocab/BiologicalProcess']\n",
"['4468', 'https://w3id.org/biolink/vocab/CellularComponent']\n",
"['30018', 'https://w3id.org/biolink/vocab/ChemicalSubstance']\n",
"['32228', 'https://w3id.org/biolink/vocab/Drug']\n",
"['12241', 'https://w3id.org/biolink/vocab/MolecularActivity']\n",
"['62446', 'https://w3id.org/biolink/vocab/OntologyClass']\n",
"['6', 'https://w3id.org/biolink/vocab/OrganismalEntity']\n",
"['15530', 'https://w3id.org/biolink/vocab/PhenotypicFeature']\n",
"['129930', 'https://w3id.org/biolink/vocab/Publication']\n",
"['4687', 'https://w3id.org/biolink/vocab/AnatomicalEntity']\n",
"['48', 'https://w3id.org/biolink/vocab/Assay']\n",
"['703', 'https://w3id.org/biolink/vocab/Cell']\n",
"['24229', 'https://w3id.org/biolink/vocab/Disease']\n",
"['1', 'https://w3id.org/biolink/vocab/MolecularEntity']\n",
"['17', 'https://w3id.org/biolink/vocab/RNA']\n",
"['47', 'https://w3id.org/biolink/vocab/SequenceFeature']\n"
]
}
],
"source": [
"# have a look at biolink category counts currently in KG-COVID-19 loaded on Blazegraph endpoint\n",
"import csv\n",
Expand Down

0 comments on commit b2c55a1

Please sign in to comment.