-
Notifications
You must be signed in to change notification settings - Fork 7
/
anchor-droplet-chip.json
278 lines (278 loc) · 12.2 KB
/
anchor-droplet-chip.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
{
"name": "anchor_droplet_chip",
"display_name": "anchor_droplet_chip",
"visibility": "public",
"icon": "",
"categories": [],
"schema_version": "0.2.1",
"on_activate": null,
"on_deactivate": null,
"contributions": {
"commands": [
{
"id": "anchor_droplet_chip.get_reader",
"title": "Read dataset",
"python_name": "adc._reader:napari_get_reader",
"short_title": null,
"category": null,
"icon": null,
"enablement": null
},
{
"id": "anchor_droplet_chip.get_yeast_reader",
"title": "Read yeast dataset",
"python_name": "adc._reader:get_yeast_reader",
"short_title": null,
"category": null,
"icon": null,
"enablement": null
},
{
"id": "anchor_droplet_chip.segment",
"title": "Segment yeast using cellpose",
"python_name": "adc._segment_widget:SegmentYeast",
"short_title": null,
"category": null,
"icon": null,
"enablement": null
},
{
"id": "anchor_droplet_chip.make_centers",
"title": "Show centers",
"python_name": "adc._sample_data:make_centers",
"short_title": null,
"category": null,
"icon": null,
"enablement": null
},
{
"id": "anchor_droplet_chip.make_template",
"title": "Show template",
"python_name": "adc._sample_data:make_template",
"short_title": null,
"category": null,
"icon": null,
"enablement": null
},
{
"id": "anchor_droplet_chip.DetectWells",
"title": "Detect wells",
"python_name": "adc._align_widget:DetectWells",
"short_title": null,
"category": null,
"icon": null,
"enablement": null
},
{
"id": "anchor_droplet_chip.CombineStack",
"title": "Combine Stack",
"python_name": "adc._combine_widget:CombineStack",
"short_title": null,
"category": null,
"icon": null,
"enablement": null
},
{
"id": "anchor_droplet_chip.CountCells",
"title": "Count Cells",
"python_name": "adc._count_widget:CountCells",
"short_title": null,
"category": null,
"icon": null,
"enablement": null
},
{
"id": "anchor_droplet_chip.MakeProjection",
"title": "Make projection along selected axis",
"python_name": "adc._projection_stack:ProjectAlong",
"short_title": null,
"category": null,
"icon": null,
"enablement": null
},
{
"id": "anchor_droplet_chip.ManualRois",
"title": "Populate ROIs",
"python_name": "adc._manual_rois:make_matrix",
"short_title": null,
"category": null,
"icon": null,
"enablement": null
},
{
"id": "anchor_droplet_chip.CropRois",
"title": "Crop ROIs",
"python_name": "adc._manual_rois:crop_rois",
"short_title": null,
"category": null,
"icon": null,
"enablement": null
},
{
"id": "anchor_droplet_chip.SubStack",
"title": "Make a sub stack",
"python_name": "adc._sub_stack:SubStack",
"short_title": null,
"category": null,
"icon": null,
"enablement": null
},
{
"id": "anchor_droplet_chip.SplitAlong",
"title": "Split the stack along one dimension",
"python_name": "adc._split_stack:SplitAlong",
"short_title": null,
"category": null,
"icon": null,
"enablement": null
}
],
"readers": [
{
"command": "anchor_droplet_chip.get_reader",
"filename_patterns": [
"*.npy",
"*.nd2",
"*.zarr",
"*.tif",
"*.tiff",
"*.csv"
],
"accepts_directories": true
},
{
"command": "anchor_droplet_chip.get_yeast_reader",
"filename_patterns": [
"*P=*.tif",
"*.h5"
],
"accepts_directories": false
}
],
"writers": null,
"widgets": [
{
"command": "anchor_droplet_chip.segment",
"display_name": "Segment cells using cellpose",
"autogenerate": false
},
{
"command": "anchor_droplet_chip.DetectWells",
"display_name": "Detect wells",
"autogenerate": false
},
{
"command": "anchor_droplet_chip.CombineStack",
"display_name": "Combine stack",
"autogenerate": false
},
{
"command": "anchor_droplet_chip.CountCells",
"display_name": "Count Cells",
"autogenerate": false
},
{
"command": "anchor_droplet_chip.CropRois",
"display_name": "Crop ROIs",
"autogenerate": false
},
{
"command": "anchor_droplet_chip.ManualRois",
"display_name": "Populate ROIs along the line",
"autogenerate": false
},
{
"command": "anchor_droplet_chip.SubStack",
"display_name": "Make a sub stack",
"autogenerate": false
},
{
"command": "anchor_droplet_chip.SplitAlong",
"display_name": "Split the stack along one dimension",
"autogenerate": false
},
{
"command": "anchor_droplet_chip.MakeProjection",
"display_name": "Make projection along one dimension",
"autogenerate": false
}
],
"sample_data": [
{
"command": "anchor_droplet_chip.make_template",
"key": "template",
"display_name": "Show template"
},
{
"command": "anchor_droplet_chip.make_centers",
"key": "centers",
"display_name": "Show centers"
}
],
"themes": null,
"menus": {},
"submenus": null,
"keybindings": null,
"configuration": []
},
"package_metadata": {
"metadata_version": "2.1",
"name": "anchor_droplet_chip",
"version": "0.4.6",
"dynamic": null,
"platform": null,
"supported_platform": null,
"summary": "Segment organoids and measure intensities",
"description": "# \u2693 anchor-droplet-chip\n## Measuring single-cell susceptibility to antibiotics within monoclonal fluorescent bacteria.\n\nWe are imaging the entire chip using 20x 0.7NA objective lens using automatic stitching in NIS.\nBright-field image 2D and TRITC-3D acquired. The 3D stack is converted to 2D using maximum projection in NIS or Fiji. Both channels are then merged together and saved as a tif stack. After that this package can be applied to detect the individual droplets and count the fluorescent cells.\n\nAs the chips are bonded to the coverslip manually, they contain a randon tilt and shift, so detecting individual droplets proved to be unreliable. The current approach consisnts of preparing a well-lebelled template bright-field image and a labelled mask and matching the experimental brightfield image to the template.\n![Paper outline(1)](https://user-images.githubusercontent.com/11408456/178001287-513e6398-c4e0-4946-b38f-6cb98dc0ee6c.svg)\n\n## Installation\n```bash\npip install anchor-droplet-chip\n```\n## Usage\n\n1. Notebook: `jupyter lab example.ipynb`\n2. Napari plugin: see the menu `Plugins / andhor-droplet-chips / ...\n3. Command line:\n\n `python -m adc.align --help`\n\n `python -m adc.count --help`\n\n### Dowloading the raw data\nHead to release page https://github.com/BaroudLab/anchor-droplet-chip/releases/tag/v0.0.1 and download files one by one.\n\nOr\n\nExecute the notebook example.ipynb - the data will be fetched automatically.\n\n### Aligning the chips with the template and the mask\n\nDay 1:\n```bash\npython -m adc.align day1/00ng_BF_TRITC_bin2.tif template_bin16_bf.tif labels_bin2.tif\n```\nThis command will create the stack day1/00ng_BF_TRITC_bin2-aligned.tif, which can be viewed in Fiji.\n![Screenshot of 00ng_BF_TRITC_bin2-aligned.tif](https://user-images.githubusercontent.com/11408456/176169270-3d494fc3-a771-4bf0-859e-c9cc853ce2d9.png)\n\nDay 2:\n```bash\npython -m adc.align day2/00ng_BF_TRITC_bin2_24h.tif template_bin16_bf.tif labels_bin2.tif\n```\n\n### Counting the cells day 1 and day2\n```\npython -m adc.count day1/00ng_BF_TRITC_bin2-aligned.tif day1/counts.csv\npython -m adc.count day2/00ng_BF_TRITC_bin2_24h-aligned.tif day2/counts.csv\n```\n\n### Combining the tables from 2 days\n```\npython adc.merge day1/counts.csv day2/counts.csv table.csv\n```\n\n### Plotting and fitting the probabilities\n\n\n## Sample data\n\n### Batch processing:\n\nFirst you'll need to clone the repo locally and install it to have the scripts at hand.\n\n```bash\ngit clone https://github.com/BaroudLab/anchor-droplet-chip.git\n\ncd anchor-droplet-chip\n\npip install .\n```\nMake a data folder\n```bash\nmkdir data\n\n```\nDownload the dataset from Zenodo https://zenodo.org/record/6940212\n```bash\nzenodo_get 6940212 -o data\n```\nProceed with Snakemake pipeline to get tha table and plots. Be careful with the number of threads `-c` as a single thread can consume over 8 GBs of RAM.\n```bash\nsnakemake -c4 -d data table.csv\n```\n\n# Napari plugin functionaluties\n\n## nd2 reader\n\nOpen large nd2 file by drag-n-drop and select anchor-droplet-chip as a reader.\nThe reader plugin will aotimatically detect the subchannels and split them in different layers.\nThe reader will also extract the pixel size from metadata and save it as Layer.metadata[\"pixel_size_um\"]\nThe data itself is opened ad dask array using nd2 python library.\n\n## Substack\n\nSome datasets are so big, it's hard to even to open them, let alone doing processing in them.\n`anchor-droplet-chip / Make a sub stack ` addresses this problem.\nUpon opening the plugin you'll see all dimensions of you dataset, and the axes will become named accordingly.\nSimply choose the subset of data you need, and click \"Crop it!\". This will create a new layer with the subset of data.\nNote that no new files are created in the process and in the background nd2 library lazy loading chunks of data from the original nd2 file.\n\n## Populate ROIs along the line\nDraw a line in the new shapes layer and call the widget. It will populate square ROIs along the line. Adjust the number of columns and rows. This way you can manually map the 2D wells on your chip.\n\n## Crop ROIs\nUse this widget to crop the mapped previously ROIs. The extracted crops can be saved as tifs.\n\n## Split along axis\n\nAllows to split any dataset along a selected axis and save the pieces as separate tifs (imagej format, so only TZCYX axes supported)\n* Select the axis name\n* Click Split it! and check the table with the names, shapes and paths.\n* To change the prefix, set the folder by clicking at \"Choose folder\"\n* Once the table looks right, click \"Save tifs\" and wait. The colunm \"saved\" will be updated along the way.\n![image](https://user-images.githubusercontent.com/11408456/214313498-5b1f8408-1fa3-4e24-810a-b9394e936c8e.png)\n",
"description_content_type": "text/markdown",
"keywords": null,
"home_page": "https://github.com/BaroudLab/anchor-driplet-chip",
"download_url": null,
"author": "Andrey Aristov",
"author_email": "[email protected]",
"maintainer": null,
"maintainer_email": null,
"license": "BSD-3-Clause",
"classifier": [
"Development Status :: 2 - Pre-Alpha",
"Framework :: napari",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Testing"
],
"requires_dist": [
"dask",
"fire",
"h5py",
"jupyterlab",
"matplotlib",
"napari",
"nd2",
"numpy",
"pandas",
"pyqt6",
"pytest-qt",
"pyyaml",
"scikit-image",
"scipy",
"seaborn",
"tifffile",
"zarr-tools",
"zenodo-get"
],
"requires_python": ">=3.8",
"requires_external": null,
"project_url": [
"Source Code, https://github.com/BaroudLab/anchor-droplet-chip"
],
"provides_extra": null,
"provides_dist": null,
"obsoletes_dist": null
},
"npe1_shim": false
}