README.md 4.03 KB
Newer Older
1
2
# DEPRECATED AS OF 2023-02-02! -- PROJECT MIGRATED TO https://gitlab.com/aliby/aliby

Alán Muñoz's avatar
Alán Muñoz committed
3
4
# ALIBY (Analyser of Live-cell Imaging for Budding Yeast)

Alán Muñoz's avatar
Alán Muñoz committed
5
[![docs](https://readthedocs.org/projects/aliby/badge/?version=master)](https://aliby.readthedocs.io/en/latest)
Alán Muñoz's avatar
Alán Muñoz committed
6
[![PyPI version](https://badge.fury.io/py/aliby.svg)](https://badge.fury.io/py/aliby)
7
8
[![pipeline](https://git.ecdf.ed.ac.uk/swain-lab/aliby/aliby/badges/master/pipeline.svg?key_text=master)](https://git.ecdf.ed.ac.uk/swain-lab/aliby/aliby/-/pipelines)
[![dev pipeline](https://git.ecdf.ed.ac.uk/swain-lab/aliby/aliby/badges/dev/pipeline.svg?key_text=dev)](https://git.ecdf.ed.ac.uk/swain-lab/aliby/aliby/-/commits/dev)
9
[![coverage](https://git.ecdf.ed.ac.uk/swain-lab/aliby/aliby/badges/dev/coverage.svg)](https://git.ecdf.ed.ac.uk/swain-lab/aliby/aliby/-/commits/dev)
Alán Muñoz's avatar
Alán Muñoz committed
10

11
End-to-end processing of cell microscopy time-lapses. ALIBY automates segmentation, tracking, lineage predictions, post-processing and report production. It leverages the existing Python ecosystem and open-source scientific software available to produce seamless and standardised pipelines.
Alán Muñoz's avatar
Alán Muñoz committed
12

13
## Quickstart Documentation
Alán Muñoz's avatar
Alán Muñoz committed
14
Installation of [VS Studio](https://visualstudio.microsoft.com/downloads/#microsoft-visual-c-redistributable-for-visual-studio-2022) Native MacOS support for is under work, but you can use containers (e.g., Docker, Podman) in the meantime.
15

Alán Muñoz's avatar
Alán Muñoz committed
16
For analysing local data
17
18
 ```bash
pip install aliby # aliby[network] if you want to access an OMERO server
Alán Muñoz's avatar
Alán Muñoz committed
19
 ```
Alán Muñoz's avatar
Alán Muñoz committed
20

Alán Muñoz's avatar
Alán Muñoz committed
21
See our [installation instructions]( https://aliby.readthedocs.io/en/latest/INSTALL.html ) for more details.
22

Alán Muñoz's avatar
Alán Muñoz committed
23
### CLI
24

Alán Muñoz's avatar
Alán Muñoz committed
25
26
27
 ```bash
aliby-run --expt_id EXPT_PATH --distributed 4 --tps None
 ```
28

Alán Muñoz's avatar
Alán Muñoz committed
29
30
31
32
And to run Omero servers, the basic arguments are shown:
 ```bash
 aliby-run --expt_id XXX --host SERVER.ADDRESS --user USER --password PASSWORD 
 ```
33

34
35
36
37
38
The output is a folder with the original logfiles and a set of hdf5 files, one with the results of each multidimensional inside.

## Using specific components

### Access raw data
39

40
ALIBY's tooling can also be used as an interface to OMERO servers, taking care of fetching data when needed.
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
 ```python
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
```
61

62
63
### Tiling the raw data

Alán Muñoz's avatar
Alán Muñoz committed
64
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.
65
66
67
68
69

```python
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())
Alán Muñoz's avatar
Alán Muñoz committed
70
    tiler.run_tp(0)
71
72
73
```

The initialisation should take a few seconds, as it needs to align the images
74
in time.
75
76
77
78
79

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
```python
Alán Muñoz's avatar
Alán Muñoz committed
80
81
82
83
84
85
86
87
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)
88
89
90
91
92
93
94
95
96
97
```

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

#### Get the traps for a given time point
Alternatively, if you want to get all the traps at a given timepoint:

```python
timepoint = 0
98
seg_expt.get_tiles_timepoints(timepoint, tile_size=96, channels=None,
99
100
101
102
103
                                z=[0,1,2,3,4])
```


### Contributing
104
See [CONTRIBUTING](https://aliby.readthedocs.io/en/latest/INSTALL.html) on how to help out or get involved.