Skip to content

Commit

Permalink
Merge pull request #42 from earmingol/new_version
Browse files Browse the repository at this point in the history
Quick rename of "moving windows" into "sliding windows"
  • Loading branch information
earmingol committed Nov 19, 2023
2 parents 0329247 + 6602cf6 commit 7b00865
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Quickstart and extended tutorials are available for [using Tensor-cell2cell in c

These tutorials include the use of multiple LR-based tools running on LIANA, different databases of ligand-receptor interactions,
downstream analyses, and the use of spatial transcriptomics.

---
## Common issues
- When running Tensor-cell2cell (```InteractionTensor.compute_tensor_factorization()``` or ```InteractionTensor.elbow_rank_selection()```), a common error is
Expand Down
2 changes: 1 addition & 1 deletion cell2cell/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
from cell2cell import tensor
from cell2cell import utils

__version__ = "0.7.0"
__version__ = "0.7.1"
2 changes: 1 addition & 1 deletion cell2cell/spatial/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from cell2cell.spatial.distances import (celltype_pair_distance, pairwise_celltype_distances)
from cell2cell.spatial.filtering import (dist_filter_liana, dist_filter_tensor)
from cell2cell.spatial.neighborhoods import (create_spatial_grid, create_moving_windows, calculate_window_size, add_moving_window_info_to_adata)
from cell2cell.spatial.neighborhoods import (create_spatial_grid, create_sliding_windows, calculate_window_size, add_sliding_window_info_to_adata)
4 changes: 2 additions & 2 deletions cell2cell/spatial/neighborhoods.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def calculate_window_size(adata, num_windows):
return window_size


def create_moving_windows(adata, window_size, stride):
def create_sliding_windows(adata, window_size, stride):
"""
Maps windows to the cells they contain based on spatial transcriptomics data.
Returns a dictionary where keys are window identifiers and values are sets of cell indices.
Expand Down Expand Up @@ -145,7 +145,7 @@ def find_windows(coord, window_edges):
return window_mapping


def add_moving_window_info_to_adata(adata, window_mapping):
def add_sliding_window_info_to_adata(adata, window_mapping):
"""
Adds window information to the AnnData object's .obs DataFrame. Each window is represented
as a column, and cells/spots belonging to a window are marked with a 1.0, while others are marked
Expand Down
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Quickstart and extended tutorials are available for [using Tensor-cell2cell in c

These tutorials include the use of multiple LR-based tools running on LIANA, different databases of ligand-receptor interactions,
downstream analyses, and the use of spatial transcriptomics.

---
## Common issues
- When running Tensor-cell2cell (```InteractionTensor.compute_tensor_factorization()``` or ```InteractionTensor.elbow_rank_selection()```), a common error is
Expand Down
12 changes: 12 additions & 0 deletions release/0.7.1-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Release Notes - cell2cell v0.7.1

## New features
- Refer to [v0.7.0 notes](./0.7.0-notes.md) to see the new features. This is a quick fix of that version.

## Feature updates
- Renamed `cell2cell.spatial.neighborhoods.create_moving_windows()` and
and `cell2cell.spatial.neighborhoods.add_moving_window_info_to_adata()` into
`cell2cell.spatial.neighborhoods.create_sliding_windows()` and
and `cell2cell.spatial.neighborhoods.add_sliding_window_info_to_adata()` respectively.

## Fixed Bugs

0 comments on commit 7b00865

Please sign in to comment.