{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pygor3 as p3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Parms filename:  /home/alfaceor/.local/share/igor/models/mouse/tcr_beta/models/model_parms.txt\n",
      "Margs filename:  /home/alfaceor/.local/share/igor/models/mouse/tcr_beta/models/model_marginals.txt\n",
      "--------------------------------------------------\n"
     ]
    },
    {
     "data": {
      "application/vnd.holoviews_exec.v0+json": "",
      "text/html": [
       "<div id='1767' style='display: table; margin: 0 auto;'>\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"6c93125a-0e12-4e35-9bde-c82304d9b081\" data-root-id=\"1767\"></div>\n",
       "</div>\n",
       "<script type=\"application/javascript\">(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  var docs_json = {\"c2310dd3-a9a1-4eba-9ccf-8120743db468\":{\"roots\":{\"references\":[{\"attributes\":{\"align\":null,\"below\":[{\"id\":\"1776\",\"type\":\"LinearAxis\"}],\"center\":[{\"id\":\"1780\",\"type\":\"Grid\"},{\"id\":\"1785\",\"type\":\"Grid\"}],\"left\":[{\"id\":\"1781\",\"type\":\"LinearAxis\"}],\"margin\":null,\"min_border_bottom\":10,\"min_border_left\":10,\"min_border_right\":10,\"min_border_top\":10,\"outline_line_alpha\":{\"value\":0},\"renderers\":[{\"id\":\"1817\",\"type\":\"GraphRenderer\"},{\"id\":\"1835\",\"type\":\"GlyphRenderer\"}],\"sizing_mode\":\"fixed\",\"title\":{\"id\":\"1768\",\"type\":\"Title\"},\"toolbar\":{\"id\":\"1792\",\"type\":\"Toolbar\"},\"x_range\":{\"id\":\"1764\",\"type\":\"Range1d\"},\"x_scale\":{\"id\":\"1772\",\"type\":\"LinearScale\"},\"y_range\":{\"id\":\"1765\",\"type\":\"Range1d\"},\"y_scale\":{\"id\":\"1774\",\"type\":\"LinearScale\"}},\"id\":\"1767\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"data_source\":{\"id\":\"1830\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"1833\",\"type\":\"Text\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1834\",\"type\":\"Text\"},\"selection_glyph\":null,\"view\":{\"id\":\"1836\",\"type\":\"CDSView\"}},\"id\":\"1835\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"text\":{\"field\":\"index\"},\"text_align\":\"center\",\"text_baseline\":\"middle\",\"text_color\":{\"value\":\"black\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1833\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1774\",\"type\":\"LinearScale\"},{\"attributes\":{\"graph_layout\":{\"0\":[0.0,280.0],\"1\":[120.0,240.0],\"10\":[120.0,40.0],\"2\":[240.0,280.0],\"3\":[0.0,200.0],\"4\":[80.0,200.0],\"5\":[160.0,200.0],\"6\":[240.0,200.0],\"7\":[120.0,160.0],\"8\":[120.0,80.0],\"9\":[120.0,120.0]}},\"id\":\"1806\",\"type\":\"StaticLayoutProvider\"},{\"attributes\":{\"callback\":null,\"end\":304.0,\"reset_end\":304.0,\"reset_start\":16.0,\"start\":16.0,\"tags\":[[[\"y\",\"y\",null]]]},\"id\":\"1765\",\"type\":\"Range1d\"},{\"attributes\":{},\"id\":\"1826\",\"type\":\"NodesAndLinkedEdges\"},{\"attributes\":{\"callback\":null,\"data\":{\"end\":{\"__ndarray__\":\"AwAAAAQAAAAFAAAABgAAAAEAAAAEAAAA\",\"dtype\":\"int32\",\"shape\":[6]},\"start\":{\"__ndarray__\":\"AAAAAAEAAAABAAAAAgAAAAIAAAAFAAAA\",\"dtype\":\"int32\",\"shape\":[6]},\"xs\":[{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAPh/4dTIuTf6CcAAAAAAAAAAAN/UyLk3+glA\",\"dtype\":\"float64\",\"shape\":[6]},{\"__ndarray__\":\"AAAAAAAAXkAAAAAAAABUQAAAAAAAAPh/p0bOvdHPVEAAAAAAAABUQJh2nl249VVA\",\"dtype\":\"float64\",\"shape\":[6]},{\"__ndarray__\":\"AAAAAAAAXkAAAAAAAABkQAAAAAAAAPh/tMQw0SMFY0AAAAAAAABkQKzcGCEXmGNA\",\"dtype\":\"float64\",\"shape\":[6]},{\"__ndarray__\":\"AAAAAAAAbkAAAAAAAABuQAAAAAAAAPh/rNwYIReYbUAAAAAAAABuQFMj597oZ25A\",\"dtype\":\"float64\",\"shape\":[6]},{\"__ndarray__\":\"AAAAAAAAbkAAAAAAAABeQAAAAAAAAPh/sBelXEGaX0AAAAAAAABeQMVSfYzYDmBA\",\"dtype\":\"float64\",\"shape\":[6]},{\"__ndarray__\":\"AAAAAAAAZEAAAAAAAABUQAAAAAAAAPh/mHaeXbj1VUAAAAAAAABUQJh2nl249VVA\",\"dtype\":\"float64\",\"shape\":[6]}],\"ys\":[{\"__ndarray__\":\"AAAAAACAcUAAAAAAAABpQAAAAAAAAPh/TDvPLtz6aUAAAAAAAABpQEw7zy7c+mlA\",\"dtype\":\"float64\",\"shape\":[6]},{\"__ndarray__\":\"AAAAAAAAbkAAAAAAAABpQAAAAAAAAPh/TDvPLtz6aUAAAAAAAABpQFQj597oZ2lA\",\"dtype\":\"float64\",\"shape\":[6]},{\"__ndarray__\":\"AAAAAAAAbkAAAAAAAABpQAAAAAAAAPh/VCPn3uhnaUAAAAAAAABpQEw7zy7c+mlA\",\"dtype\":\"float64\",\"shape\":[6]},{\"__ndarray__\":\"AAAAAACAcUAAAAAAAABpQAAAAAAAAPh/TDvPLtz6aUAAAAAAAABpQEw7zy7c+mlA\",\"dtype\":\"float64\",\"shape\":[6]},{\"__ndarray__\":\"AAAAAACAcUAAAAAAAABuQAAAAAAAAPh/0iS4AeixbkAAAAAAAABuQA3QN2fA7G1A\",\"dtype\":\"float64\",\"shape\":[6]},{\"__ndarray__\":\"AAAAAAAAaUAAAAAAAABpQAAAAAAAAPh/UyPn3uhnaUAAAAAAAABpQKzcGCEXmGhA\",\"dtype\":\"float64\",\"shape\":[6]}]},\"selected\":{\"id\":\"1848\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"1847\",\"type\":\"UnionRenderers\"}},\"id\":\"1805\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":{\"value\":0.5},\"line_width\":{\"value\":2}},\"id\":\"1812\",\"type\":\"MultiLine\"},{\"attributes\":{\"edge_renderer\":{\"id\":\"1815\",\"type\":\"GlyphRenderer\"},\"inspection_policy\":{\"id\":\"1828\",\"type\":\"NodesAndLinkedEdges\"},\"layout_provider\":{\"id\":\"1806\",\"type\":\"StaticLayoutProvider\"},\"node_renderer\":{\"id\":\"1810\",\"type\":\"GlyphRenderer\"},\"selection_policy\":{\"id\":\"1826\",\"type\":\"NodesAndLinkedEdges\"}},\"id\":\"1817\",\"type\":\"GraphRenderer\"},{\"attributes\":{\"text\":{\"field\":\"index\"},\"text_align\":\"center\",\"text_alpha\":{\"value\":0.1},\"text_baseline\":\"middle\",\"text_color\":{\"value\":\"black\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1834\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1788\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"callback\":null,\"data\":{\"index\":[\"v_choice\",\"d_gene\",\"j_choice\",\"v_3_del\",\"d_3_del\",\"d_5_del\",\"j_5_del\",\"vd_ins\",\"dj_ins\",\"vd_dinucl\",\"dj_dinucl\"],\"x\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAABeQAAAAAAAAG5AAAAAAAAAAAAAAAAAAABUQAAAAAAAAGRAAAAAAAAAbkAAAAAAAABeQAAAAAAAAF5AAAAAAAAAXkAAAAAAAABeQA==\",\"dtype\":\"float64\",\"shape\":[11]},\"y\":{\"__ndarray__\":\"AAAAAACAcUAAAAAAAABuQAAAAAAAgHFAAAAAAAAAaUAAAAAAAABpQAAAAAAAAGlAAAAAAAAAaUAAAAAAAABkQAAAAAAAAFRAAAAAAAAAXkAAAAAAAABEQA==\",\"dtype\":\"float64\",\"shape\":[11]}},\"selected\":{\"id\":\"1831\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"1843\",\"type\":\"UnionRenderers\"}},\"id\":\"1830\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1848\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1790\",\"type\":\"ResetTool\"},{\"attributes\":{\"source\":{\"id\":\"1830\",\"type\":\"ColumnDataSource\"}},\"id\":\"1836\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1843\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1786\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1846\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1847\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1845\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"callback\":null,\"end\":264.0,\"reset_end\":264.0,\"reset_start\":-24.0,\"start\":-24.0,\"tags\":[[[\"x\",\"x\",null]]]},\"id\":\"1764\",\"type\":\"Range1d\"},{\"attributes\":{},\"id\":\"1800\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"text\":\"\",\"text_color\":{\"value\":\"black\"},\"text_font_size\":{\"value\":\"12pt\"}},\"id\":\"1768\",\"type\":\"Title\"},{\"attributes\":{\"callback\":null,\"renderers\":[{\"id\":\"1817\",\"type\":\"GraphRenderer\"}],\"tooltips\":[[\"index\",\"@{index}\"]]},\"id\":\"1766\",\"type\":\"HoverTool\"},{\"attributes\":{\"data_source\":{\"id\":\"1804\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"1807\",\"type\":\"Circle\"},\"hover_glyph\":{\"id\":\"1809\",\"type\":\"Circle\"},\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1808\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"1811\",\"type\":\"CDSView\"}},\"id\":\"1810\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"callback\":null},\"id\":\"1791\",\"type\":\"TapTool\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"1766\",\"type\":\"HoverTool\"},{\"id\":\"1786\",\"type\":\"SaveTool\"},{\"id\":\"1787\",\"type\":\"PanTool\"},{\"id\":\"1788\",\"type\":\"WheelZoomTool\"},{\"id\":\"1789\",\"type\":\"BoxZoomTool\"},{\"id\":\"1790\",\"type\":\"ResetTool\"},{\"id\":\"1791\",\"type\":\"TapTool\"}]},\"id\":\"1792\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1831\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":{\"value\":0.2},\"line_width\":{\"value\":2}},\"id\":\"1813\",\"type\":\"MultiLine\"},{\"attributes\":{\"fill_color\":{\"value\":\"limegreen\"},\"size\":{\"units\":\"screen\",\"value\":31.622776601683793}},\"id\":\"1809\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1787\",\"type\":\"PanTool\"},{\"attributes\":{\"grid_line_color\":null,\"ticker\":{\"id\":\"1777\",\"type\":\"BasicTicker\"}},\"id\":\"1780\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1782\",\"type\":\"BasicTicker\"},{\"attributes\":{\"callback\":null,\"data\":{\"index\":{\"__ndarray__\":\"AAAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAA=\",\"dtype\":\"int32\",\"shape\":[11]},\"index_hover\":[\"v_choice\",\"d_gene\",\"j_choice\",\"v_3_del\",\"d_3_del\",\"d_5_del\",\"j_5_del\",\"vd_ins\",\"dj_ins\",\"vd_dinucl\",\"dj_dinucl\"]},\"selected\":{\"id\":\"1846\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"1845\",\"type\":\"UnionRenderers\"}},\"id\":\"1804\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_color\":{\"value\":\"limegreen\"},\"line_width\":{\"value\":2}},\"id\":\"1814\",\"type\":\"MultiLine\"},{\"attributes\":{\"data_source\":{\"id\":\"1805\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"1812\",\"type\":\"MultiLine\"},\"hover_glyph\":{\"id\":\"1814\",\"type\":\"MultiLine\"},\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1813\",\"type\":\"MultiLine\"},\"selection_glyph\":null,\"view\":{\"id\":\"1816\",\"type\":\"CDSView\"}},\"id\":\"1815\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"1842\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#30a2da\"},\"line_alpha\":{\"value\":0.2},\"size\":{\"units\":\"screen\",\"value\":31.622776601683793}},\"id\":\"1808\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1777\",\"type\":\"BasicTicker\"},{\"attributes\":{\"overlay\":{\"id\":\"1842\",\"type\":\"BoxAnnotation\"}},\"id\":\"1789\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1828\",\"type\":\"NodesAndLinkedEdges\"},{\"attributes\":{\"source\":{\"id\":\"1805\",\"type\":\"ColumnDataSource\"}},\"id\":\"1816\",\"type\":\"CDSView\"},{\"attributes\":{\"dimension\":1,\"grid_line_color\":null,\"ticker\":{\"id\":\"1782\",\"type\":\"BasicTicker\"}},\"id\":\"1785\",\"type\":\"Grid\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"red\"},\"line_alpha\":{\"value\":0.5},\"size\":{\"units\":\"screen\",\"value\":31.622776601683793}},\"id\":\"1807\",\"type\":\"Circle\"},{\"attributes\":{\"axis_label\":\"x\",\"bounds\":\"auto\",\"formatter\":{\"id\":\"1800\",\"type\":\"BasicTickFormatter\"},\"major_label_orientation\":\"horizontal\",\"ticker\":{\"id\":\"1777\",\"type\":\"BasicTicker\"},\"visible\":false},\"id\":\"1776\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1772\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1802\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"axis_label\":\"y\",\"bounds\":\"auto\",\"formatter\":{\"id\":\"1802\",\"type\":\"BasicTickFormatter\"},\"major_label_orientation\":\"horizontal\",\"ticker\":{\"id\":\"1782\",\"type\":\"BasicTicker\"},\"visible\":false},\"id\":\"1781\",\"type\":\"LinearAxis\"},{\"attributes\":{\"source\":{\"id\":\"1804\",\"type\":\"ColumnDataSource\"}},\"id\":\"1811\",\"type\":\"CDSView\"}],\"root_ids\":[\"1767\"]},\"title\":\"Bokeh Application\",\"version\":\"1.4.0\"}};\n",
       "  var render_items = [{\"docid\":\"c2310dd3-a9a1-4eba-9ccf-8120743db468\",\"roots\":{\"1767\":\"6c93125a-0e12-4e35-9bde-c82304d9b081\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    var attempts = 0;\n",
       "    var timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);</script>"
      ],
      "text/plain": [
       ":Overlay\n",
       "   .Graph.I  :Graph   [start,end]\n",
       "   .Labels.I :Labels   [x,y]   (index)"
      ]
     },
     "execution_count": 8,
     "metadata": {
      "application/vnd.holoviews_exec.v0+json": {
       "id": "1767"
      }
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mdl = p3.IgorModel.load_default(\"mouse\", \"tcr_beta\")\n",
    "mdl.parms.plot_Graph()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'flnModelParms' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-11-000ecaa6d2c4>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m     14\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     15\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 16\u001b[0;31m \u001b[0mmdl\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mp3\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mIgorModel\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload_from_networkx\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvj_dict_default\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'lamas'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     17\u001b[0m \u001b[0mmdl\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mparms\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mplot_Graph\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/Dropbox/PosDoc/IGoR/dev/MyGithub/pygor3/pygor3/IgorIO.py\u001b[0m in \u001b[0;36mload_from_networkx\u001b[0;34m(cls, IgorSpecie, IgorChain)\u001b[0m\n\u001b[1;32m    255\u001b[0m         \u001b[0;34m:\u001b[0m\u001b[0;32mreturn\u001b[0m \u001b[0mIgorModel\u001b[0m \u001b[0mloaded\u001b[0m \u001b[0;32mwith\u001b[0m \u001b[0mthe\u001b[0m \u001b[0mdefault\u001b[0m \u001b[0mlocation\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mspecie\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mchain\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    256\u001b[0m         \"\"\"\n\u001b[0;32m--> 257\u001b[0;31m         \u001b[0mcls\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mIgorModel\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodel_parms_file\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mflnModelParms\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmodel_marginals_file\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mflnModelMargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    258\u001b[0m         \u001b[0;32mreturn\u001b[0m \u001b[0mcls\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    259\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mNameError\u001b[0m: name 'flnModelParms' is not defined"
     ]
    }
   ],
   "source": [
    "\n",
    "vj_dict_default = {\n",
    "    'v_choice': {},\n",
    "    'j_choice': {'v_choice'},\n",
    "    'd_gene': {'v_choice', 'j_choice'},\n",
    "    'v_3_del': {'v_choice'},\n",
    "    'd_5_del': {'d_gene'},\n",
    "    'd_3_del': {'d_gene', 'd_5_del'},\n",
    "    'j_5_del': {'j_choice'},\n",
    "    'vd_ins': {},\n",
    "    'vd_dinucl': {},\n",
    "    'dj_ins': {},\n",
    "    'dj_dinucl': {}\n",
    "}\n",
    "\n",
    "\n",
    "mdl = p3.IgorModel.load_from_networkx(vj_dict_default, 'lamas')\n",
    "mdl.parms.plot_Graph()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pygor3 as p3\n",
    "db = p3.IgorSqliteDB()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "__init__() missing 1 required positional argument: 'flnIgorSQL'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-3-b0550da080df>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mdb\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mp3\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mIgorSqliteDB\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;31mTypeError\u001b[0m: __init__() missing 1 required positional argument: 'flnIgorSQL'"
     ]
    }
   ],
   "source": [
    "# So to load a database we need the file, so something like\n",
    "# table key\n",
    "# filename\n",
    "# So given the batchname we can use\n",
    "# First we should define the files\n",
    "db.set_filename_from_batch(\"mybatch\")\n",
    "db.load_db(table_key)\n",
    "# is better to get a complete dict instead of kwargs!.\n",
    "# What should be the "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
