{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "### Reading and Writing Boolean-Based Models" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "[Cell Collective](https://cellcollective.org) supports reading models in [SBML qual](http://www.colomoto.org/formats/sbml-qual.html) file format and exporting them into SBML qual, Boolean Expressions, Truth Tables, Interaction Matrix and GML Expressions.\n", "\n", "**ccapi** also ships with some test models.\n", "\n", "Let's try importing the [Signal Transduction in Fibroblasts](https://research.cellcollective.org/?dashboard=true#1557:1/signal-transduction-in-fibroblasts/1) model.\n", "\n", "![](../data/images/signal-transduction-in-fibroblasts.png)\n", "\n", "Begin by importing the ccapi module into your workspace." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import ccapi" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now, let’s try creating a client object in order to interact with services provided by [Cell Collective](https://cellcollective.org)." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "client = ccapi.Client()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Authenticate your client using a ***password flow type authentication*** scheme.\n", "\n", "**NOTE**: *Before you can authenticate using ccapi, you must first register an application of the appropriate type on [Cell Collective](https://cellcollective.org). If you do not require a user context, it is read only.*" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "client.auth(email = \"test@cellcollective.org\", password = \"test\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You can also view user details of your authenticated client as follows:" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " \n", " ID\n", " \n", " | \n", "\n", " 10887\n", " | \n", "
\n", " \n", " Name\n", " \n", " | \n", "\n", " Achilles Test\n", " | \n", "
\n", " \n", " Memory Address\n", " \n", " | \n", "\n", " 0x07f08117ef588\n", " | \n", "
\n", " \n", " First Name\n", " \n", " | \n", "\n", " Achilles\n", " | \n", "
\n", " \n", " Last Name\n", " \n", " | \n", "\n", " Test\n", " | \n", "
\n", " \n", " Email Address\n", " \n", " | \n", "\n", " test@cellcollective.org\n", " | \n", "
\n", " \n", " Institution\n", " \n", " | \n", "\n", " University of Nebraska-Lincoln\n", " | \n", "
\n", " \n", " ID\n", " \n", " | \n", "\n", " 90999\n", " | \n", "
\n", " \n", " Name\n", " \n", " | \n", "\n", " Unnamed Model\n", " | \n", "
\n", " \n", " Memory Address\n", " \n", " | \n", "\n", " 0x07f08117ef128\n", " | \n", "
\n", " \n", " Number of Versions\n", " \n", " | \n", "\n", " 1\n", " | \n", "
\n", " \n", " Versions\n", " \n", " | \n", "\n", " [<BooleanModel 90999 at 0x07f08101a8898>]\n", " | \n", "
\n", " \n", " ID\n", " \n", " | \n", "\n", " 90999\n", " | \n", "
\n", " \n", " Version\n", " \n", " | \n", "\n", " 1\n", " | \n", "
\n", " \n", " Name\n", " \n", " | \n", "\n", " \n", " | \n", "
\n", " \n", " Memory Address\n", " \n", " | \n", "\n", " 0x07f08101a8898\n", " | \n", "
\n", " \n", " Number of Components\n", " \n", " | \n", "\n", " 139\n", " | \n", "
\n", " \n", " Components\n", " \n", " | \n", "\n", " ExtPump, alpha_1213L, alpha_iL, alpha_sL, alpha_qL, IL1_TNF, ECM, Stress, EGF, Palpha_iR, Cbp, EGFR, PIP2_45, TAK1, Ga_1213, Ras, alpha_qR, ARF, PTPPEST, Talin, p38, Raf, Akt, PLC_g, Mekk4, PLD, p115RhoGEF, Graf, AC, TAO_12, PKC_primed, ASK1, PAK, IP3, DAG, Raf_Loc, Erk, Tiam, PIP2_34, RhoK, Cas, PTPa, Crk, MKK3, Shc, SHP2, Mekk2, cAMP, Sos, Gbg_1213, Raf_Rest, PI4K, PKC, alpha_sR, Csk, Sek1, MLK1, PDE4, PLA2, Ral, RasGRF_GRP, AND_34, PTP1b, DOCK180, NIK, Pix_Cool, B_Parvin, RKIP, WASP, MKK6, Cdc42, MKK7, PIP3_345, GRK, MLK3, Actin, Fak, Ca, B_Arrestin, Gbg_q, alpha_1213R, CaM, Arp_23, Gas, Gbg_i, Palpha_qR, RGS, p120RasGAP, Mekk1, PDK1, PA, Trafs, PKA, RalGDS, SAPK, Gab1, IP3R1, AA, PI3K, p90RSK, PLC_B, p190RhoGAP, Grb2, MLCP, RalBP1, Mekk3, PTEN, PIP_4, Myosin, Gai, Palpha_sR, ILK, Integrins, Mek, CaMKK, Vinc, Nck, IL1_TNFR, RhoGDI, MKPs, MLK2, Rac, DGK, PI5K, alpha_iR, Src, Palpha_1213R, Tab_12, Tpl2, Gaq, Rho, MLCK, PP2A, CaMK, Rap1, Raf_DeP, GCK, Trx, Gbg_s\n", " | \n", "