Package: tunacell
tunacellis a Python package that provides tools to analyze data from time-lapse
movies of dividing micro-organisms.Main featuresAnalysis of time-series defined over many cell-cyclesComputation 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 timePlotting functions of the computed statisticsFiltering-out cellsConditional analysis: computation of statistics for subgroups of cells,
lineages, colonies, or containers (akafields of view) where the subgroups are defined
respective to conditions (the termgatingis employed elsewhere)Data visualization of small samplesExport of computed data as text files in a comprehensive folder structureNumerical simulationsInput type includes text files (comma- or tab-separated values) and output from
segmentation software (only Supersegger’s output is supported)InstallInstall the package from PyPI:$ pip install tunacellIt is adviced to run this command in a virtual environment.Testing the installUnit teststunacell comes with unit tests that can be run with pytest. Run:make testto execute those tests. Unit test coverage is getting better but is far from
exhaustive.End-to-end testsTo check whether most features works appropriately, clone the
repo and run:make full-demoIt should not raise any Python error (though some warnings may show up).(note that these scripts writes files and folders in a newtmptunacellfolder in your home directory–taking roughly 13 MB when all scripts have been
launched)Quick startThis 10 minute tutorial gives an overview of tunacell and its API.For a deeper, tutorial-like exploration of tunacell API,
consider runningsequentiallythe scripts in
thescriptsfolder as it is done in the full-demo recipe in Makefile.
Just change the--time.5option 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 newtmptunacellfolder 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!DocumentationThere is an extensivedocumentation. Start with theintroduction to tunacell.DependenciesNumpy,Scipy,matplotlibare classic libraries,
as well aspandasthat 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 thetreeliblibrary.We usepyYAMLto parse yaml files such as metadata or other library-created
files, andtqdmpackage for progress bars.ContributingAs 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!