cellsystem


Namecellsystem JSON
Version 0.3.0 PyPI version JSON
download
home_pagehttps://github.com/Ad115/Cell-System
SummaryAn agent-based framework for the simulation of biological cell systems and more.
upload_time2018-04-08 06:44:05
maintainer
docs_urlNone
authorAd115
requires_python
license
keywords simulation cell agents
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ==========
CellSystem
==========

.. image:: https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg
   :target: https://saythanks.io/inbox

An agent-based framework for the simulation of biological cell systems.

This was created to simulate cancer growth, taking into account nutrients and cell migration while allowing to track mutations, cell division and cell position history to study tumour phylogeny reconstruction algorithms.

.. image:: https://raw.githubusercontent.com/Ad115/Cell-System/master/assets/sidebyside.png
.. image:: https://raw.githubusercontent.com/Ad115/Cell-System/master/assets/spacetime.png


------------
Installation
------------

You can install it from PyPI::

    $ pip install cellsystem
    

-------
Example
-------

A use case integrated in the repository:

.. code-block:: python

    >>> from cellsystem import *

    # The cell system will simulate cell growth
    # while tracking the steps in that process.
    >>> system = CellSystem(grid_shape=(100, 100))

    # Initialize the first cell
    # in the middle of the grid
    >>> system.seed()
    
    
    New cell 0 added @ (50, 50)


    # Take 35 steps forward in time
    >>> system.run(steps=30)


    Cell no. 0 mutating @ site (50, 50) (father None)
             Initial mutations: []
                         Initial genome: AAAAAAAAAA
             Final mutations: [(4, 'G')]
                         Final genome: AAAAGAAAAA
    Cell no. 0 dividing @ (50, 50)
        New cells: 1 @ (49, 50) and 2 @ (50, 51)
    Cell no. 2 dividing @ (50, 51)
        New cells: 3 @ (51, 52) and 4 @ (51, 52)
    Cell no. 4 mutating @ site (51, 52) (father 2)
             Initial mutations: [(4, 'G')]
                         Initial genome: AAAAGAAAAA
             Final mutations: [(4, 'G'), (7, 'A')]
                         Final genome: AAAAGAAAAA
    Cell no. 1 death @ site (49, 50) (father None)
    Cell no. 3 death @ site (51, 52) (father 2)
    Cell no. 4 mutating @ site (51, 52) (father 2)
             Initial mutations: [(4, 'G'), (7, 'A')]
                         Initial genome: AAAAGAAAAA
             Final mutations: [(4, 'G'), (7, 'A'), (2, 'T')]
                         Final genome: AATAGAAAAA
    Cell no. 4 migrating from site (51, 52) (father 2)
         New site: (50, 52)
    ...
    ...
    ...


    # Prepare to explore the simulation logs
    >>> history = system['log']


    # First, let's see the cells' evolution in time and space!
    >>> history.worldlines().show()

    # Remove the cells that died somewhere along the way
    >>> history.worldlines(prune_death=True).show()
    

.. image:: https://raw.githubusercontent.com/Ad115/Cell-System/master/assets/geometry.png

.. image:: https://raw.githubusercontent.com/Ad115/Cell-System/master/assets/geometry_no_death.png


.. code-block:: python

    >>> tree_style = {'show_leaf_name' : True,
    ...               'mode' : 'c',        # Circular
    ...               'arc_start' : -135,  # Degrees
    ...               'arc_span' : 270 }   # Degrees also


    # Lookup the tree formed by cellular division
    >>> history.ancestry().show(styling=tree_style)

    # Now, remove cells that are no longer alive
    >>> history.ancestry(prune_death=True).show(styling=tree_style)


.. image:: https://raw.githubusercontent.com/Ad115/Cell-System/master/assets/ancestry.png

.. image:: https://raw.githubusercontent.com/Ad115/Cell-System/master/assets/ancestry_no_death.png


.. code-block:: python

    # Now, check out the tree formed by the mutations 
    >>> history.mutations().show(styling=tree_style)

    # Remove genomes with no living representatives.
    >>> history.mutations(prune_death=True).show(styling=tree_style)


.. image:: https://raw.githubusercontent.com/Ad115/Cell-System/master/assets/mutations.png

.. image:: https://raw.githubusercontent.com/Ad115/Cell-System/master/assets/mutations_no_death.png



*For more examples and usage, please refer to the [Wiki](wikigoeshere.com).*

----
Meta
----

**Author**: `Ad115 <https://agargar.wordpress.com/>`_ - `Github <https://github.com/Ad115/>`_ – a.garcia230395@gmail.com

Distributed under the MIT license. See `LICENSE <https://github.com/Ad115/Cell-System/blob/master/LICENSE>`_ for more information.

Warning: The project is still in alpha stage, so the API is just stabilizing and may change in the near future. This also means
that if you want to contribute, now is the right moment to make important change suggestions ;D

------------
Contributing
------------

1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
2. Fork `the repository <https://github.com/Ad115/Cell-System/>`_ on GitHub to start making your changes to a feature branch, derived from the **master** branch.
3. Write a test which shows that the bug was fixed or that the feature works as expected.
4. Send a pull request and bug the maintainer until it gets merged and published. 

            

Raw data

            {
    "_id": null,
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "cheesecake_code_kwalitee_id": null,
    "keywords": "simulation cell agents",
    "upload_time": "2018-04-08 06:44:05",
    "author": "Ad115",
    "home_page": "https://github.com/Ad115/Cell-System",
    "github_user": "Ad115",
    "download_url": "https://pypi.python.org/packages/54/2f/78131120fe477aa61718efd85b160c02eee7bd84b1974d449301f96ad4fc/cellsystem-0.3.0.tar.gz",
    "platform": "",
    "version": "0.3.0",
    "cheesecake_documentation_id": null,
    "description": "==========\nCellSystem\n==========\n\n.. image:: https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg\n   :target: https://saythanks.io/inbox\n\nAn agent-based framework for the simulation of biological cell systems.\n\nThis was created to simulate cancer growth, taking into account nutrients and cell migration while allowing to track mutations, cell division and cell position history to study tumour phylogeny reconstruction algorithms.\n\n.. image:: https://raw.githubusercontent.com/Ad115/Cell-System/master/assets/sidebyside.png\n.. image:: https://raw.githubusercontent.com/Ad115/Cell-System/master/assets/spacetime.png\n\n\n------------\nInstallation\n------------\n\nYou can install it from PyPI::\n\n    $ pip install cellsystem\n    \n\n-------\nExample\n-------\n\nA use case integrated in the repository:\n\n.. code-block:: python\n\n    >>> from cellsystem import *\n\n    # The cell system will simulate cell growth\n    # while tracking the steps in that process.\n    >>> system = CellSystem(grid_shape=(100, 100))\n\n    # Initialize the first cell\n    # in the middle of the grid\n    >>> system.seed()\n    \n    \n    New cell 0 added @ (50, 50)\n\n\n    # Take 35 steps forward in time\n    >>> system.run(steps=30)\n\n\n    Cell no. 0 mutating @ site (50, 50) (father None)\n             Initial mutations: []\n                         Initial genome: AAAAAAAAAA\n             Final mutations: [(4, 'G')]\n                         Final genome: AAAAGAAAAA\n    Cell no. 0 dividing @ (50, 50)\n        New cells: 1 @ (49, 50) and 2 @ (50, 51)\n    Cell no. 2 dividing @ (50, 51)\n        New cells: 3 @ (51, 52) and 4 @ (51, 52)\n    Cell no. 4 mutating @ site (51, 52) (father 2)\n             Initial mutations: [(4, 'G')]\n                         Initial genome: AAAAGAAAAA\n             Final mutations: [(4, 'G'), (7, 'A')]\n                         Final genome: AAAAGAAAAA\n    Cell no. 1 death @ site (49, 50) (father None)\n    Cell no. 3 death @ site (51, 52) (father 2)\n    Cell no. 4 mutating @ site (51, 52) (father 2)\n             Initial mutations: [(4, 'G'), (7, 'A')]\n                         Initial genome: AAAAGAAAAA\n             Final mutations: [(4, 'G'), (7, 'A'), (2, 'T')]\n                         Final genome: AATAGAAAAA\n    Cell no. 4 migrating from site (51, 52) (father 2)\n         New site: (50, 52)\n    ...\n    ...\n    ...\n\n\n    # Prepare to explore the simulation logs\n    >>> history = system['log']\n\n\n    # First, let's see the cells' evolution in time and space!\n    >>> history.worldlines().show()\n\n    # Remove the cells that died somewhere along the way\n    >>> history.worldlines(prune_death=True).show()\n    \n\n.. image:: https://raw.githubusercontent.com/Ad115/Cell-System/master/assets/geometry.png\n\n.. image:: https://raw.githubusercontent.com/Ad115/Cell-System/master/assets/geometry_no_death.png\n\n\n.. code-block:: python\n\n    >>> tree_style = {'show_leaf_name' : True,\n    ...               'mode' : 'c',        # Circular\n    ...               'arc_start' : -135,  # Degrees\n    ...               'arc_span' : 270 }   # Degrees also\n\n\n    # Lookup the tree formed by cellular division\n    >>> history.ancestry().show(styling=tree_style)\n\n    # Now, remove cells that are no longer alive\n    >>> history.ancestry(prune_death=True).show(styling=tree_style)\n\n\n.. image:: https://raw.githubusercontent.com/Ad115/Cell-System/master/assets/ancestry.png\n\n.. image:: https://raw.githubusercontent.com/Ad115/Cell-System/master/assets/ancestry_no_death.png\n\n\n.. code-block:: python\n\n    # Now, check out the tree formed by the mutations \n    >>> history.mutations().show(styling=tree_style)\n\n    # Remove genomes with no living representatives.\n    >>> history.mutations(prune_death=True).show(styling=tree_style)\n\n\n.. image:: https://raw.githubusercontent.com/Ad115/Cell-System/master/assets/mutations.png\n\n.. image:: https://raw.githubusercontent.com/Ad115/Cell-System/master/assets/mutations_no_death.png\n\n\n\n*For more examples and usage, please refer to the [Wiki](wikigoeshere.com).*\n\n----\nMeta\n----\n\n**Author**: `Ad115 <https://agargar.wordpress.com/>`_ - `Github <https://github.com/Ad115/>`_ \u2013 a.garcia230395@gmail.com\n\nDistributed under the MIT license. See `LICENSE <https://github.com/Ad115/Cell-System/blob/master/LICENSE>`_ for more information.\n\nWarning: The project is still in alpha stage, so the API is just stabilizing and may change in the near future. This also means\nthat if you want to contribute, now is the right moment to make important change suggestions ;D\n\n------------\nContributing\n------------\n\n1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.\n2. Fork `the repository <https://github.com/Ad115/Cell-System/>`_ on GitHub to start making your changes to a feature branch, derived from the **master** branch.\n3. Write a test which shows that the bug was fixed or that the feature works as expected.\n4. Send a pull request and bug the maintainer until it gets merged and published. \n",
    "lcname": "cellsystem",
    "name": "cellsystem",
    "github": true,
    "coveralls": false,
    "bugtrack_url": null,
    "license": "",
    "travis_ci": false,
    "github_project": "Cell-System",
    "summary": "An agent-based framework for the simulation of biological cell systems and more.",
    "split_keywords": [
        "simulation",
        "cell",
        "agents"
    ],
    "author_email": "a.garcia230395@gmail.com",
    "urls": [
        {
            "has_sig": false,
            "upload_time": "2018-04-08T06:44:05",
            "comment_text": "",
            "python_version": "source",
            "url": "https://pypi.python.org/packages/54/2f/78131120fe477aa61718efd85b160c02eee7bd84b1974d449301f96ad4fc/cellsystem-0.3.0.tar.gz",
            "md5_digest": "cfdf821c9782ed652d3025fb1b7be6c1",
            "downloads": 0,
            "filename": "cellsystem-0.3.0.tar.gz",
            "packagetype": "sdist",
            "path": "54/2f/78131120fe477aa61718efd85b160c02eee7bd84b1974d449301f96ad4fc/cellsystem-0.3.0.tar.gz",
            "digests": {
                "sha256": "b0540020eab38bd708df3013c03bead701dc5b59f0dbb6a61e24bcad85b1740c",
                "md5": "cfdf821c9782ed652d3025fb1b7be6c1"
            },
            "sha256_digest": "b0540020eab38bd708df3013c03bead701dc5b59f0dbb6a61e24bcad85b1740c",
            "size": 18921
        }
    ],
    "cheesecake_installability_id": null
}
        
Elapsed time: 0.09714s