Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ajitjohnson committed Mar 1, 2024
1 parent 7c87798 commit d1efd8a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions scimap/tools/_spatial_count.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,17 @@ def spatial_count (adata,
```python
# Analyze spatial relationships using the radius method
adata = spatial_count(adata, x_coordinate='X_centroid', y_coordinate='Y_centroid',
adata = sm.tl.spatial_count(adata, x_coordinate='X_centroid', y_coordinate='Y_centroid',
phenotype='phenotype', method='radius', radius=50,
label='neighborhood_radius50')
# Explore spatial neighborhoods with KNN
adata = spatial_count(adata, x_coordinate='X_centroid', y_coordinate='Y_centroid',
adata = sm.tl.spatial_count(adata, x_coordinate='X_centroid', y_coordinate='Y_centroid',
phenotype='phenotype', method='knn', knn=15,
label='neighborhood_knn15')
# 3D spatial analysis using a radius method
adata = spatial_count(adata, x_coordinate='X_centroid', y_coordinate='Y_centroid',
adata = sm.tl.spatial_count(adata, x_coordinate='X_centroid', y_coordinate='Y_centroid',
z_coordinate='Z_centroid', phenotype='phenotype', method='radius', radius=30,
label='neighborhood_3D_radius30')
Expand Down
6 changes: 3 additions & 3 deletions scimap/tools/_spatial_distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ def spatial_distance (adata,
```python
# Calculate spatial distance in 2D
adata = spatial_distance(adata, x_coordinate='X_centroid', y_coordinate='Y_centroid',
adata = sm.tl.spatial_distance(adata, x_coordinate='X_centroid', y_coordinate='Y_centroid',
phenotype='cell_type', label='2D_distance')
# Calculate spatial distance in 3D
adata = spatial_distance(adata, x_coordinate='X_centroid', y_coordinate='Y_centroid',
adata = sm.tl.spatial_distance(adata, x_coordinate='X_centroid', y_coordinate='Y_centroid',
z_coordinate='Z_centroid', phenotype='cell_type', label='3D_distance')
# Calculate spatial distance for a specific image subset
adata = spatial_distance(adata, x_coordinate='X_centroid', y_coordinate='Y_centroid',
adata = sm.tl.spatial_distance(adata, x_coordinate='X_centroid', y_coordinate='Y_centroid',
phenotype='cell_type', imageid='image_id', subset='image01',
label='distance_image01')
Expand Down

0 comments on commit d1efd8a

Please sign in to comment.