Analysis of Timeseries from dividing UNicellular microorganisms
Project description
tunacell is a Python package that provides tools to analyze data from time-lapse movies of dividing micro-organisms.
Main features
Analysis of time-series defined over many cell-cycles
Computation of average values, variance, number of samples over sampling time or generations (the former is better used for dynamic quantities such as instantaneous growth rate, the latter for cell-cycle observables such as birth size)
Computation of autocovariance for a single observable, and cross-covariance for a couple of observables over time
Plotting functions of the computed statistics
Filtering-out cells
Conditional analysis: computation of statistics for subgroups of cells, lineages, colonies, or containers (aka fields of view) where the subgroups are defined respective to conditions (the term gating is employed elsewhere)
Data visualization of small samples
Export of computed data as text files in a comprehensive folder structure
Numerical simulations
Input type includes text files (comma- or tab-separated values) and output from segmentation software (only Supersegger’s output is supported)
Install
Install the package from PyPI:
$ pip install tunacell
It is adviced to run this command in a virtual environment.
Testing the install
Unit tests
tunacell comes with unit tests that can be run with pytest. Run:
make test
to execute those tests. Unit test coverage is getting better but is far from exhaustive.
End-to-end tests
To check whether most features works appropriately, clone the repo and run:
make full-demo
It should not raise any Python error (though some warnings may show up).
(note that these scripts writes files and folders in a new tmptunacell folder in your home directory–taking roughly 13 MB when all scripts have been launched)
Quick start
This 10 minute tutorial gives an overview of tunacell and its API.
For a deeper, tutorial-like exploration of tunacell API, consider running sequentially the scripts in the scripts folder as it is done in the full-demo recipe in Makefile. Just change the --time .5 option to interactive mode by adding -i:
cd <your-location-for-tunacell-repo>/scripts $ tunasimu -s 42 # makes the simutest numerically simulated experiment $ python tutorial.py -i $ ...
(note that these scripts writes files and folders in a new tmptunacell folder in your home directory–taking roughly 13 MB when all scripts have been launched)
Once you’ve run, read, and understood the bits of code in these files, consider yourself as a tunacell expert.
If you got how it works, plug your data in (look at [how to format input files][tunadocs-data-structure]) and use tunacell API to write your scripts and discover new things about the dynamical properties of your cells!
Documentation
There is an extensive documentation. Start with the introduction to tunacell.
Dependencies
Numpy, Scipy, matplotlib are classic libraries, as well as pandas that is used to provide the user with DataFrame objects for some statistical analyses.
The tree-like structure arising from dividing cells has been implemented using the treelib library.
We use pyYAML to parse yaml files such as metadata or other library-created files, and tqdm package for progress bars.
Contributing
As bugs may come up quickly, we encourage users to report them with an Issue. We further encourage experienced users to propose patches and pull requests :)
We also welcome any suggestion for improvement (though an Issue, or an email–see setup). Thanks for your help!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file tunacell-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: tunacell-0.2.2-py3-none-any.whl
- Upload date:
- Size: 143.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c411279a3cc68d1cdfb4d13d897d8bf7d5430a6de38497d2738b3f59d3f3c36 |
|
MD5 | 9466baf503fd578d59107aa2715a7e74 |
|
BLAKE2b-256 | 32ce81e00f20c06e88e2b52edf72b9c4157ed0874329718746be886d587313ec |