Skip to main content

Analysis of videos of cells with respect to their change in brightness over time.

Project description

bcells

A Python package to analyze video/image sequence microscopy data regarding the changes in brightness of the visible cells.

Documentation

Installation

The package is installable via the Python packet manager pip. Thus, a sufficiently new version of Python and the packet manager must be available.

Installing Python and pip

If Python and pip3 (Python's packet manager) are already installed on your computer you can skip this sectio and go to the section "Installing bcells".

Windows

Visit https://www.python.org/downloads/windows/ and go to "Stable releases". Then select one of the following installers: Download Windows installer (32-bit), Download Windows installer (64-bit) or Download Windows installer (ARM64) according to your computer (Often, this will the 64-bit version). Follow the instructions of the installer. Python and pip should be installed afterwards. You can check this by opening a terminal and typing the command python3 --version. Then, the version of Python should be printed. Similarly, pip3 --version should print the version of pip.

macOS

Visit https://www.python.org/downloads/macos/ and go to "Stable releases". Then select and download the macOS installer. Follow the instructions of the installer. Python and pip should be installed afterwards. You can check this by opening a terminal and typing the command python3 --version. Then, the version of Python should be printed. Similarly, pip3 --version should print the version of pip.

Linux (Debian or Ubuntu)

Run the following command in a terminal:

sudo apt install python3 python3-pip

Check the installation by typing the following commands in a terminal:

python3 --version
pip3 --version

Installing bcells

To install bcells, open a terminal and type the following command:

pip3 install bcells

Furthermore, we recommend installing Jupyter so that the package can be easily be used in a Jupyter notebook. Our examples are also written in Jupyter notebooks meaning you can only view those if you have . This can be done as follows:

pip3 install notebook

Jupyter notebooks are used as follows: Open a terminal and type the following command:

jupyter notebook

Then, a browser window should open and you can navigate through your computer's file structure. Now, you can either create a new notebook in a desired location or open an existing one.

Examples

We provide three example files with this package. These are either available in the examples folder of your local installation of the bcells package or can be downloaded from the gitlab repository of the package.

Get example files

The simplest way is probably to download these files from the gitlab repository. The example Jupyter notebook files are stored at (https://gitlab.gwdg.de/torben.maass/bcells/-/tree/main/examples)[https://gitlab.gwdg.de/torben.maass/bcells/-/tree/main/examples] and can e.g. be downloaded by clicking the blue "Code" button and then "Download this directory". Now unpack these at your desired location.

Alternatively, open a terminal and start an interactive Python session by typing python3. Then, type the following commands:

>>> import bcells
>>> print(bcells.__file__)

This should show the location of the bcells package on your computer. Now, navigate to the examples folder of the package and copy the files to your desired location.

Run examples

For two of the examples, we need .nd2 image sequence files. These are not provided with the package so you need to make sure that you have some available on your.

The simplest way to run the examples now, is to first copy the desired example jupyter notebook file (which have ending .ipynb) to the location of the .nd2 file(s). Then, open a terminal a start a Jupyter notebook by typing jupyter notebook. Then, a jupyter notebook should start in your browser. Navigate to the location where the .nd2 and .ipynb file(s) are stored. Click on the .ipynb file to open this file. There should be explanations in the notebook on how to run the example. To run the actual code cells either click the "Run" button in the toolbar or press "Shift + Enter" on your keyboard.

Usage

The (easiest/intended) usage of this package is described in the following.

We assume that the user has multiple .nd2 image sequence files with different drug concentrations. The file names should contain the drug concentration of the experiment corresponding to that file in the following format: ..._(number)(unit)_....nd2 In other words, somewhere in the file there should be a section starting and ending with an underscore "_" and in between there should be a number specifying the concentration and the unit which can be either "muM" or "mM" (or µM). There can be whitespace between the number and the unit. For example, a file could be named "ex_10 muM_000.nd2" which would get recognised as 10 $\mu$M.

For simple usage, the user can basically copy the example_usage.ipynb file from the examples folder of this package inside of the directory where the .nd2 files are stored. Then, the path to this directory is "." (which needs to set in the jupyter notebook). Now, all the code in the jupyter notebook file should be runnable and the package does its job. The resulting data, segmentations and plots should now be viewable in a subfolder which has been created in that directory.

License

See LICENSE.txt

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bcells-1.0.0.tar.gz (704.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bcells-1.0.0-py3-none-any.whl (141.9 kB view details)

Uploaded Python 3

File details

Details for the file bcells-1.0.0.tar.gz.

File metadata

  • Download URL: bcells-1.0.0.tar.gz
  • Upload date:
  • Size: 704.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for bcells-1.0.0.tar.gz
Algorithm Hash digest
SHA256 87b422ff65f9dc15fdc30293d525a8cec6663e9cf00cbfd540d8b2e2b01c929f
MD5 7add4fcd2ce8018632a58d4970ad02e3
BLAKE2b-256 209de0c35f5a8b59b1911aa38d420e5d80a25217d078f6f22bc03507ce335cc1

See more details on using hashes here.

File details

Details for the file bcells-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: bcells-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 141.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for bcells-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 27bffedf4764d0f7685e136252f93221cc13eef09de13a9739258eb0c66a9570
MD5 103f7f29ee9e9474c703dd97b72bc446
BLAKE2b-256 97d460907d3602da28c7820a424ce564ebf1f5ada61aec39d3973ddbfde04157

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page