Skip to main content

Process and analyse live-cell imaging data

Project description

ALIBY (Analyser of Live-cell Imaging for Budding Yeast)

PyPI version readthedocs pipeline status

The core classes and methods for the python microfluidics, microscopy, data analysis and reporting.

Installation

See INSTALL.md for installation instructions.

Quickstart Documentation

Setting up a server

For testing and development, the easiest way to set up an OMERO server is by using Docker images. The software carpentry and the Open Microscopy Environment, have provided instructions to do this.

The docker-compose.yml file can be used to create an OMERO server with an accompanying PostgreSQL database, and an OMERO web server. It is described in detail here.

Our version of the docker-compose.yml has been adapted from the above to use version 5.6 of OMERO.

To start these containers (in background):

cd pipeline-core
docker-compose up -d

Omit the -d to run in foreground.

To stop them, in the same directory, run:

docker-compose stop

Raw data access

from aliby.io.dataset import Dataset
from aliby.io.image import Image

server_info= {
           "host": "host_address",
           "username": "user",
           "password": "xxxxxx"}
expt_id = XXXX
tps = [0, 1] # Subset of positions to get.

with Dataset(expt_id, **server_info) as conn:
   image_ids = conn.get_images()

#To get the first position
with Image(list(image_ids.values())[0], **server_info) as image:
   dimg = image.data
   imgs = dimg[tps, image.metadata["channels"].index("Brightfield"), 2, ...].compute()
   # tps timepoints, Brightfield channel, z=2, all x,y

Tiling the raw data

A Tiler object performs trap registration. It may be built in different ways but the simplest one is using an image and a the default parameters set.

from aliby.tile.tiler import Tiler, TilerParameters
with Image(list(image_ids.values())[0], **server_info) as image:
    tiler = Tiler.from_image(image, TilerParameters.default())
    tiler.run_tp(0)

The initialisation should take a few seconds, as it needs to align the images in time.

It fetches the metadata from the Image object, and uses the TilerParameters values (all Processes in aliby depend on an associated Parameters class, which is in essence a dictionary turned into a class.)

Get a timelapse for a given trap

fpath = "h5/location"

trap_id = 9
trange = list(range(0, 30))
ncols = 8

riv = remoteImageViewer(fpath)
trap_tps = riv.get_trap_timepoints(trap_id, trange, ncols)

This can take several seconds at the moment. For a speed-up: take fewer z-positions if you can.

If you're not sure what indices to use:

seg_expt.channels # Get a list of channels
channel = 'Brightfield'
ch_id = seg_expt.get_channel_index(channel)

n_traps = seg_expt.n_traps # Get the number of traps 

Get the traps for a given time point

Alternatively, if you want to get all the traps at a given timepoint:

timepoint = 0
seg_expt.get_traps_timepoints(timepoint, tile_size=96, channels=None, 
                                z=[0,1,2,3,4])

Contributing

See CONTRIBUTING.md for installation instructions.

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

aliby-0.1.34.tar.gz (602.8 kB view hashes)

Uploaded Source

Built Distribution

aliby-0.1.34-py3-none-any.whl (611.1 kB view hashes)

Uploaded Python 3

Supported by

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