GithubHelp home page GithubHelp logo

cdw / c6 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from allencellmodeling/c6

0.0 1.0 0.0 6.27 MB

Circular center-based cell colony creation and clustering

License: Other

Makefile 5.29% Python 94.71%

c6's Introduction

c6 (Circular Center-based Cell Colony Creation and Clustering) c6

Build Status Documentation Code Coverage

C6 is a toy center-based model of the initial clustering that occurs as a cells aggregate after replating.


Features

  • Represents cells as non-overlapping circles
  • Cells exclude each other
  • Cells sense each other with tunable strength and distances
  • Cells grow at tunable rates
  • Cells divide at tunable sizes
  • Cells' growth is contact inhibited
  • Runs are launched from stored initial conditions
  • Runs are selectable as deterministic or stochastic
  • Runs are logged to tidy data file
  • Run state is visualized
  • You can save run states out to pretty MP4s
  • Summary statistics are available for probing run logs
  • Easy run profiling

Quick Start

import c6
import numpy as np
import matplotlib.pyplot as plt


space = c6.Space()
cell_locs = 20*np.random.random((10,2))
cells = [c6.Cell(space, loc) for loc in cell_locs]

fig, ax = plt.subplots(1,1, figsize=(10,10))
ax.set(xlim=(-10, 20), ylim=(-10, 20))
animation = c6.plot.animate(fig, ax, space, 500)
animation.save('example.mp4', fps=20)

Installation

Clone and install or pip install git+https://github.com/AllenCellModeling/c6.git

Creating initial conditions and logging runs

Both initial conditions and run logs are stored as JSON in this form:

{
    "seed": 123,
    "universal": {"sensing": 12.3,
                  "influence_max": 12,
                  "influence_decay": 0.3,
                  "adhesion": 0.5
                 },
    "cells": [{"time": 0,
               "id": [0, 1, ..., 100],
               "loc": [[1, 2], [3, 4], ..., [0.5, 2]],
               "radius": [0.3, 0.5, ..., 2.0]
             }]
}

Any property that can be passed to c6.Cell as a parameter can be serialized either as a key/value pair in 'universal', in which case it applies to all cells at all time points, or to "cells", in which case it is parsed on a per cell per time point basis. Starting conditions are this file, but with only the first entry in "cells" specified. The first entry in "cells" is always applied before later entries and so per-cell values that do not change (e.g. ids) can be set there.

Documentation

For full package documentation please visit AllenCellModeling.github.io/c6.

Available under the Allen Institute Software License

c6's People

Contributors

cdw avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.