From 6602cf6971dd08a3012492fdee485635cc853ac8 Mon Sep 17 00:00:00 2001 From: Erick Armingol Date: Sun, 19 Nov 2023 22:31:52 +0000 Subject: [PATCH] Quick rename of "moving windows" into "sliding windows" --- README.md | 1 + cell2cell/__init__.py | 2 +- cell2cell/spatial/__init__.py | 2 +- cell2cell/spatial/neighborhoods.py | 4 ++-- docs/index.md | 1 + release/0.7.1-notes.md | 12 ++++++++++++ 6 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 release/0.7.1-notes.md diff --git a/README.md b/README.md index c239735..dba7eda 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/cell2cell/__init__.py b/cell2cell/__init__.py index 6c035d9..a73f937 100644 --- a/cell2cell/__init__.py +++ b/cell2cell/__init__.py @@ -13,4 +13,4 @@ from cell2cell import tensor from cell2cell import utils -__version__ = "0.7.0" \ No newline at end of file +__version__ = "0.7.1" \ No newline at end of file diff --git a/cell2cell/spatial/__init__.py b/cell2cell/spatial/__init__.py index e72b64d..45f6da4 100644 --- a/cell2cell/spatial/__init__.py +++ b/cell2cell/spatial/__init__.py @@ -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) \ No newline at end of file +from cell2cell.spatial.neighborhoods import (create_spatial_grid, create_sliding_windows, calculate_window_size, add_sliding_window_info_to_adata) \ No newline at end of file diff --git a/cell2cell/spatial/neighborhoods.py b/cell2cell/spatial/neighborhoods.py index 0307f02..26d3a85 100644 --- a/cell2cell/spatial/neighborhoods.py +++ b/cell2cell/spatial/neighborhoods.py @@ -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. @@ -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 diff --git a/docs/index.md b/docs/index.md index 7b564a2..f5795a0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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 diff --git a/release/0.7.1-notes.md b/release/0.7.1-notes.md new file mode 100644 index 0000000..d3f411b --- /dev/null +++ b/release/0.7.1-notes.md @@ -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