Skip to content

Commit

Permalink
added: citation
Browse files Browse the repository at this point in the history
  • Loading branch information
rraadd88 committed Nov 27, 2023
1 parent a81c4d4 commit 2d79264
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 236 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,4 @@ examples/_*
examples/_*/
_*/
examples/*demo_data*
outputs/
24 changes: 10 additions & 14 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
cff-version: 1.2.0
title: >-
htsimaging: High-Throughput Single-cell Imaging analysis
in python
message: >-
If you use this software, please cite it using the
metadata from this file.
title: 'htsimaging: High-Throughput Single-cell Imaging analysis in python'
message: If you use this software, please cite it using the metadata from this file.
type: software
authors:
- given-names: Rohan
family-names: Dandage
orcid: 'https://orcid.org/0000-0002-6421-2067'
- given-names: Rohan
family-names: Dandage
orcid: https://orcid.org/0000-0002-6421-2067
identifiers:
- type: doi
value: 10.5281/zenodo.8264035
repository-code: 'https://github.com/rraadd88/htsimaging'
version: 1.0.4
date-released: '2023-08-10'
- type: doi
value: doi/10.5281/zenodo.3697134
repository-code: https://github.com/rraadd88/htsimaging
version: v1.0.5
date-released: '2023-11-27'
253 changes: 39 additions & 214 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<a href="">[![Issues](https://img.shields.io/github/issues/rraadd88/htsimaging.svg?style=for-the-badge)](https://github.com/rraadd88/htsimaging/issues)</a>
<br />
<a href="">[![Downloads](https://img.shields.io/pypi/dm/htsimaging?style=for-the-badge)](https://pepy.tech/project/htsimaging)</a>
<a href="">[![GNU License](https://img.shields.io/github/license/rraadd88/htsimaging.svg?style=for-the-badge)](https://github.com/rraadd88/htsimaging/blob/master/LICENSE)</a>
<a href="">[![GNU License](https://img.shields.io/github/license/rraadd88/htsimaging.svg?style=for-the-badge)](https://github.com/rraadd88/htsimaging/blob/main/LICENSE)</a>
</div>

<!-- PROJECT LOGO -->
Expand All @@ -23,8 +23,19 @@
·
<a href="https://github.com/rraadd88/htsimaging#api">Explore the API</a>
</p>
</div>

</div>

![image](./examples/image.png)

# Examples

[📈 Single-cell protein abundance and its normalization](https://github.com/rraadd88/htsimaging/blob/main/examples/protein_abundance_and_normalization.ipynb)
[📈 Single-cell protein abundance by marker localization](https://github.com/rraadd88/htsimaging/blob/main/examples/protein_abundance_by_marker_location.ipynb)
[🖼️ Visualization of the images.](https://github.com/rraadd88/htsimaging/blob/main/examples/viz_image.ipynb)
[📈 Quantitative analysis of endocytosis.](https://github.com/rraadd88/htsimaging/blob/main/examples/endocytosis.ipynb)
[📈 Single-particle tracking (SPT).](https://github.com/rraadd88/htsimaging/blob/main/examples/spt.ipynb)
[📈 Calculating the recovery rate from a bleach-chase data](https://github.com/rraadd88/htsimaging/blob/main/examples/bleach_chase.ipynb)

# Installation

```
Expand All @@ -34,14 +45,30 @@ With additional dependencies as required:
```
pip install htsimaging[spt] # for the analysis of the Single-Particle Tracking e.g. endocytosis.
```
# Examples

# How to cite?
1. Using BibTeX:
```
@software{Dandage_htsimaging,
title = {htsimaging: High-Throughput Single-cell Imaging analysis in python},
author = {Dandage, Rohan},
year = {2023},
url = {https://zenodo.org/doi/10.5281/zenodo.3697134},
version = {v1.0.5},
note = {The URL is a DOI link to the permanent archive of the software.},
}
```
2. DOI link: [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3697134.svg)](https://zenodo.org/doi/10.5281/zenodo.3697134), or

[Single-cell protein abundance and its normalization](https://github.com/rraadd88/htsimaging/blob/master/examples/protein_abundance_and_normalization.ipynb)
[Single-cell protein abundance by marker localization](https://github.com/rraadd88/htsimaging/blob/master/examples/protein_abundance_by_marker_location.ipynb)
[Visualization of the images.](https://github.com/rraadd88/htsimaging/blob/master/examples/viz_image.ipynb)
[Quantitative analysis of endocytosis.](https://github.com/rraadd88/htsimaging/blob/master/examples/endocytosis.ipynb)
[Single-particle tracking (SPT).](https://github.com/rraadd88/htsimaging/blob/master/examples/spt.ipynb)
[Calculating the recovery rate from a bleach-chase data](https://github.com/rraadd88/htsimaging/blob/master/examples/bleach_chase.ipynb)
3. Using citation information from [CITATION.CFF file](https://github.com/rraadd88/htsimaging/blob/main/CITATION.cff).


# Future directions, for which contributions are welcome
- [ ] Command-line usage.

# Similar projects
- https://github.com/vanvalenlab/deepcell-tf
- https://github.com/junlabucsd/napari-mm3

# API
<!-- markdownlint-disable -->
Expand Down Expand Up @@ -1678,208 +1705,6 @@ Distance travelled.
- <b>`pd.DataFrame`</b>: output dataframe.


<!-- markdownlint-disable -->

<a href="https://github.com/rraadd88/htsimaging/blob/master/htsimaging/spt.py#L0"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>module</kbd> `htsimaging.spt.viz`





---

<a href="https://github.com/rraadd88/htsimaging/blob/master/htsimaging/spt/viz.py#L20"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>function</kbd> `plot_msd`

```python
plot_msd(
imsd: DataFrame,
emsd: DataFrame,
scale: str = 'log',
plot_fh: str = None,
time_points_max: int = None,
ax: Axes = None
) → Axes
```

Plot MSD.



**Args:**

- <b>`imsd`</b> (pd.DataFrame): mean squared displacement of each particle.
- <b>`emsd`</b> (pd.DataFrame): ensemble mean squared displacement of particles.
- <b>`scale`</b> (str, optional): axis scale. Defaults to "log".
- <b>`plot_fh`</b> (str, optional): output path. Defaults to None.
- <b>`params_msd`</b> (dict, optional): parameters of MSD. Defaults to { "mpp":0.0645, "fps":0.2, "max_lagtime":100 }.
- <b>`ax`</b> (plt.Axes, optional): subplot. Defaults to None.



**Returns:**

- <b>`plt.Axes`</b>: subplot



**Examples:**
Calculate `time_points_max`: ```
params_msd: dict={
"mpp":0.0645,
"fps":0.2,
"max_lagtime":100
}
time_points_max=params_msd["fps"]*params_msd["max_lagtime"]
```


---

<a href="https://github.com/rraadd88/htsimaging/blob/master/htsimaging/spt/viz.py#L80"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>function</kbd> `plot_emsd`

```python
plot_emsd(
expt_data: DataFrame,
color: str = 'k',
scale: str = 'log',
plot_fh: str = None,
ax: Axes = None
) → Axes
```

Plot ensemble mean squared displacement of particles.



**Args:**

- <b>`expt_data`</b> (pd.DataFrame): input data.
- <b>`color`</b> (str, optional): color. Defaults to 'k'.
- <b>`scale`</b> (str, optional): scale of the axes. Defaults to "log".
- <b>`plot_fh`</b> (str, optional): output path. Defaults to None.
- <b>`ax`</b> (plt.Axes, optional): subplot. Defaults to None.



**Returns:**

- <b>`plt.Axes`</b>: subplot


---

<a href="https://github.com/rraadd88/htsimaging/blob/master/htsimaging/spt/viz.py#L117"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>function</kbd> `plot_kin`

```python
plot_kin(
traj: DataFrame,
dparams: DataFrame = None,
ctime: str = 'time (s)',
fit_eqn: str = None,
ylabel: str = '',
label: str = '',
color: str = 'b',
ax1: Axes = None,
plot_fh: str = None
) → Axes
```

Plot kinetics.



**Args:**

- <b>`traj`</b> (pd.DataFrame): table containing the trajectories.
- <b>`dparams`</b> (pd.DataFrame, optional): table containing the parameters. Defaults to None.
- <b>`ctime`</b> (str, optional): time point. Defaults to 'time (s)'.
- <b>`fit_eqn`</b> (str, optional): fit equation name. Defaults to None.



**Returns:**
plt.Axes


---

<a href="https://github.com/rraadd88/htsimaging/blob/master/htsimaging/spt/viz.py#L187"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>function</kbd> `plot_kin_all`

```python
plot_kin_all(expt_dh: str, imsd_fhs: list)
```

Plot multiple kinetics plots.


---

<a href="https://github.com/rraadd88/htsimaging/blob/master/htsimaging/spt/viz.py#L220"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>function</kbd> `plot_trajectories_stats`

```python
plot_trajectories_stats(
df: DataFrame,
coly: str,
colx: str = 'frame',
rescalex: bool = True,
label: str = None,
axvlinex=None,
params_plot: dict = {'color': 'k', 'alpha': 0.5},
fig=None,
ax: Axes = None
) → Axes
```

Plot statistics of the particle trajectories.


---

<a href="https://github.com/rraadd88/htsimaging/blob/master/htsimaging/spt/viz.py#L252"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>function</kbd> `plot_trajectories`

```python
plot_trajectories(
traj,
image,
colorby: str = 'particle',
mpp: float = None,
label: str = False,
cmap: str = None,
t_column: str = None,
pos_columns: list = None,
plot_style: dict = {},
params_text: dict = {'ha': 'center', 'va': 'center'},
ax: Axes = None,
**kwargs
) → Axes
```

Plot traces of trajectories for each particle. Optionally image it on a frame from the video.

Parameters
---------- traj : DataFrame The DataFrame should include time and spatial coordinate columns. colorby : {'particle', 'frame'}, optional mpp : float, optional Microns per pixel. If omitted, the labels will have units of pixels. label : boolean, optional Set to True to write particle ID numbers next to trajectories. image : ndarray, optional Background image, default None cmap : colormap, optional This is only used in colorby='frame' mode. Default = mpl.cm.winter ax : matplotlib axes object, optional Defaults to current axes t_column : string, optional DataFrame column name for time coordinate. Default is 'frame'. pos_columns : list of strings, optional Dataframe column names for spatial coordinates. Default is ['x', 'y']. plot_style : dictionary Keyword arguments passed through to the `Axes.plot(...)` command

Returns
------- Axes object

See Also
-------- plot_traj3d : the 3D equivalent of `plot_traj`


<!-- markdownlint-disable -->

<a href="https://github.com/rraadd88/htsimaging/blob/master/htsimaging/viz.py#L0"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
Expand Down Expand Up @@ -1954,7 +1779,7 @@ Keyword Args: parameters provided to the `plt.imshow`.

---

<a href="https://github.com/rraadd88/htsimaging/blob/master/htsimaging/viz/image.py#L81"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="https://github.com/rraadd88/htsimaging/blob/master/htsimaging/viz/image.py#L87"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>function</kbd> `annot_cells`

Expand All @@ -1980,7 +1805,7 @@ Annotate the cells on an image.

---

<a href="https://github.com/rraadd88/htsimaging/blob/master/htsimaging/viz/image.py#L108"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="https://github.com/rraadd88/htsimaging/blob/master/htsimaging/viz/image.py#L114"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>function</kbd> `image_regions_annotated`

Expand Down
2 changes: 1 addition & 1 deletion examples/endocytosis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"metadata": {},
"source": [
"---\n",
"# Quantitative analysis of endocytosis.\n",
"# 📈 Quantitative analysis of endocytosis.\n",
"\n",
"Note: Demo data used in this notebook is not included in the repository, but can be made available upon request."
]
Expand Down
Binary file added examples/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/io_read_nd2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"metadata": {},
"source": [
"---\n",
"## Reading the channels from Nikon microscope images with `.nd2` format"
"## 💾 Reading the channels from Nikon microscope images with `.nd2` format"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion examples/protein_abundance_and_normalization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"metadata": {},
"source": [
"---\n",
"# Single-cell protein abundance and its normalization"
"# 📈 Single-cell protein abundance and its normalization"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion examples/protein_abundance_by_marker_location.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"metadata": {},
"source": [
"---\n",
"# Single-cell protein abundance by marker localization"
"# 📈 Single-cell protein abundance by marker localization"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion examples/spt.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"metadata": {},
"source": [
"---\n",
"## Single-particle tracking (SPT).\n",
"## 📈 Single-particle tracking (SPT).\n",
"\n",
"**Demo data** \n",
"Download the demodata from this link: [the test video from Munder et al 2016 paper](https://elifesciences.org/download/aHR0cHM6Ly9zdGF0aWMtbW92aWUtdXNhLmdsZW5jb2Vzb2Z0d2FyZS5jb20vbXA0LzEwLjc1NTQvNTI2LzY3YWIyOTExMjkxMTcyMGU1OTk4MjY5OGZiMWVlMzY2OTE0YTBmZDIvZWxpZmUtMDkzNDctbWVkaWExLm1wNA==/elife-09347-media1.mp4?_hash=0Xnr7HGX1AYuIfQcupU%2BW3PG30wh8Wj6Cx3CXW6cO%2BA%3D) and store it in folder containing this notebook i.e. `examples`.\n",
Expand Down
4 changes: 2 additions & 2 deletions examples/viz_image.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"metadata": {},
"source": [
"---\n",
"## Visualization of the images."
"## 🖼️ Visualization of the images."
]
},
{
Expand Down Expand Up @@ -96,7 +96,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.8"
"version": "3.7.12"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 2d79264

Please sign in to comment.