{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/markdown": [ "This notebook has been executed using the docker image `colomoto/colomoto-docker:2020-07-01`" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import actonet\n", "import biolqm" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/markdown": [ "Downloading https://raw.githubusercontent.com/jgtz/StableMotifs/master/TLGLNetwork.txt" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "model = biolqm.load(\"https://raw.githubusercontent.com/jgtz/StableMotifs/master/TLGLNetwork.txt\", \"booleannet\")" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'CD45': False,\n", " 'IL15': True,\n", " 'PDGF': False,\n", " 'Stimuli': True,\n", " 'Stimuli2': False,\n", " 'TAX': False}" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "bn = biolqm.to_minibn(model, ensure_boolean=True)\n", "inputs = bn.constants()\n", "inputs" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "for n in inputs:\n", " bn[n] = n" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "act = actonet.ActoNet(bn, inputs)" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "scrolled": false }, "outputs": [ { "data": { "text/plain": [ "[FromCondition('input', PermanentPerturbation(Apoptosis=1, TCR=0)),\n", " FromCondition('input', PermanentPerturbation(CTLA4=0, Caspase=1)),\n", " FromCondition('input', PermanentPerturbation(Caspase=1, TCR=0)),\n", " FromCondition('input', PermanentPerturbation(CTLA4=0, DISC=1)),\n", " FromCondition('input', PermanentPerturbation(Apoptosis=1, CTLA4=0)),\n", " FromCondition('input', PermanentPerturbation(DISC=1, TCR=0)),\n", " FromCondition('input', PermanentPerturbation(CTLA4=1, Caspase=1)),\n", " FromCondition('input', PermanentPerturbation(CTLA4=1, DISC=1)),\n", " FromCondition('input', PermanentPerturbation(Apoptosis=1, CTLA4=1)),\n", " FromCondition('input', PermanentPerturbation(Caspase=1, TCR=1)),\n", " FromCondition('input', PermanentPerturbation(DISC=1, TCR=1)),\n", " FromCondition('input', PermanentPerturbation(Apoptosis=1, TCR=1))]" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "r = act.reprogramming_fixpoints(Apoptosis=1, maxsize=2)\n", "r" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Apoptosis CTLA4 Caspase DISC TCR
010
111
210
311
401
501
611
711
810
911
1010
1111
" ], "text/plain": [ "" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "r.as_table()" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[FromCondition('input', PermanentPerturbation(Apoptosis=0, CTLA4=0)),\n", " FromCondition('input', PermanentPerturbation(Apoptosis=0, TCR=0)),\n", " FromCondition('input', PermanentPerturbation(CTLA4=0, Caspase=0)),\n", " FromCondition('input', PermanentPerturbation(CTLA4=0, TBET=0)),\n", " FromCondition('input', PermanentPerturbation(Caspase=0, TCR=0)),\n", " FromCondition('input', PermanentPerturbation(TBET=0, TCR=0)),\n", " FromCondition('input', PermanentPerturbation(S1P=1, TCR=0)),\n", " FromCondition('input', PermanentPerturbation(CTLA4=0, S1P=1)),\n", " FromCondition('input', PermanentPerturbation(Apoptosis=0, CTLA4=1)),\n", " FromCondition('input', PermanentPerturbation(CTLA4=1, Caspase=0)),\n", " FromCondition('input', PermanentPerturbation(CTLA4=1, TBET=0)),\n", " FromCondition('input', PermanentPerturbation(CTLA4=1, S1P=1)),\n", " FromCondition('input', PermanentPerturbation(Apoptosis=0, TCR=1)),\n", " FromCondition('input', PermanentPerturbation(Caspase=0, TCR=1)),\n", " FromCondition('input', PermanentPerturbation(TBET=0, TCR=1)),\n", " FromCondition('input', PermanentPerturbation(S1P=1, TCR=1))]" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "r = act.reprogramming_fixpoints(Apoptosis=0, maxsize=2)\n", "r" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Apoptosis CTLA4 Caspase S1P TBET TCR
000
101
210
311
400
501
600
701
800
910
1011
1110
1200
1301
1400
1501
" ], "text/plain": [ "" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "r.as_table()" ] }, { "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.6" } }, "nbformat": 4, "nbformat_minor": 2 }