Skip to content

Commit

Permalink
Update _spatial_expression.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ajitjohnson committed Mar 1, 2024
1 parent 07bcb19 commit ba1efc2
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions scimap/tools/_spatial_expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,24 +153,24 @@ def spatial_expression (adata,
The input `adata` object, updated with the spatial expression results in `adata.uns[label]`.
Examples:
```python
```python
# Calculate spatial expression using a 30-pixel radius
adata = spatial_expression(adata, x_coordinate='X_centroid', y_coordinate='Y_centroid',
method='radius', radius=30,
label='expression_radius_30')
# Calculate spatial expression using a 30-pixel radius
adata = spatial_expression(adata, x_coordinate='X_centroid', y_coordinate='Y_centroid',
method='radius', radius=30,
label='expression_radius_30')
# Calculate spatial expression using 10 nearest neighbors
adata = spatial_expression(adata, x_coordinate='X_centroid', y_coordinate='Y_centroid',
method='knn', knn=10, use_raw=True,
label='expression_knn_10')
# Analyze spatial expression within a specific image using radius method
adata = spatial_expression(adata, x_coordinate='X_centroid', y_coordinate='Y_centroid',
method='radius', radius=50, imageid='imageid', subset='specific_image',
label='expression_specific_image')
# Calculate spatial expression using 10 nearest neighbors
adata = spatial_expression(adata, x_coordinate='X_centroid', y_coordinate='Y_centroid',
method='knn', knn=10, use_raw=True,
label='expression_knn_10')
```
# Analyze spatial expression within a specific image using radius method
adata = spatial_expression(adata, x_coordinate='X_centroid', y_coordinate='Y_centroid',
method='radius', radius=50, imageid='imageid', subset='specific_image',
label='expression_specific_image')
```
"""

# Load the andata object
Expand Down

0 comments on commit ba1efc2

Please sign in to comment.