Skip to content

Releases: earmingol/cell2cell

v0.8.4

Choose a tag to compare

@earmingol earmingol released this 02 Nov 22:07
5edf6e2

What's Changed

Please refer to the release notes of all previous versions here

Feature updates

  • Improved to_device() in Tensor classes: Reformulated function to pass attributes as lists and included loc_nans and loc_zeros to the tensor to move to the specified device.

  • Updated subset_tensor() in cell2cell.tensor.subset: Modified to ensure that loc_nans and loc_zeros are also subsetted along with the tensor data.

  • Validate order of elements in shared modes for CoupledTensor class: When coupling tensors from the BaseTensor class, the order of elements in shared modes is now validated (and reordered if requested) to ensure consistency across coupled tensors.

  • Dot plot enhancements: Improved dot plot visualizations in cell2cell.plotting.pval_dotplot.

Full Changelog: v0.8.3...v0.8.4

v0.8.3

Choose a tag to compare

@earmingol earmingol released this 30 Oct 01:57
957bfbf

What's Changed

Please refer to the release notes of all previous versions here

New features

  • Manual weight control for coupled tensor factorization: Added manual_weights parameter to coupled_non_negative_parafac(), CoupledInteractionTensor.compute_tensor_factorization(), and CoupledInteractionTensor.elbow_rank_selection() allowing users to manually specify the relative importance of each tensor in the factorization (e.g., manual_weights=(2., 1.) gives tensor1 twice the weight of tensor2).

  • Factorization error tracking for all tensors: Added ability to track and retrieve reconstruction errors for each iteration during tensor factorization via new get_factorization_errors() method in both BaseTensor and CoupledInteractionTensor classes. For coupled tensors, this includes individual errors for each tensor as well as combined weighted errors. The new factorization_errors_ attribute stores these errors after running compute_tensor_factorization().

  • Similarity metric for coupled elbow analysis: Implemented similarity-based elbow analysis using pairwise correlation index (CorrIndex) for coupled tensors in _multiple_runs_coupled_elbow_analysis(). Previously raised NotImplementedError.

  • Separate error metrics in elbow analysis: Elbow analysis functions now return separate metrics for tensor1, tensor2, and combined errors/similarities in a dictionary format with keys 'tensor1', 'tensor2', and 'combined', providing more granular insight into factorization quality.

  • Individual tensor visualization in elbow plots: Added show_individual parameter to CoupledInteractionTensor.elbow_rank_selection() and the new coupled plotting functions (plot_coupled_elbow(), plot_multiple_run_coupled_elbow(), plot_coupled_factorization_errors()) to optionally display individual tensor metrics (tensor1 and tensor2) alongside the combined metric in plots.

  • Plotting function for factorization errors: Added new plotting capability to visualize reconstruction errors across iterations for both regular and coupled tensor factorizations. For regular tensors, use plot_factorization_errors(). For coupled tensors, use plot_coupled_factorization_errors(). Both functions are available in cell2cell.plotting.tensor_plot.

  • Coupled tensor elbow plots: Added specialized plotting functions plot_coupled_elbow() and plot_multiple_run_coupled_elbow() in cell2cell.plotting.tensor_plot to visualize elbow analysis results for coupled tensors. These functions support displaying individual tensor metrics (tensor1, tensor2) alongside combined metrics via the show_individual parameter.

Feature updates

  • Extended class attributes: Added factorization_errors_ attribute to BaseTensor class docstring to document the storage of per-iteration reconstruction errors. Similarly updated CoupledInteractionTensor attributes to include factorization_errors1_, factorization_errors2_, and combined_errors_ for tracking errors during coupled factorization.

  • Customizable tensor names in plots: Added tensor1_name and tensor2_name parameters to coupled plotting functions (plot_coupled_elbow(), plot_multiple_run_coupled_elbow(), plot_coupled_factorization_errors()) allowing users to customize the legend labels for each tensor in visualizations instead of using default names 'Tensor1' and 'Tensor2'.

  • Centralized weight calculation: Refactored weight calculation logic into a new _compute_balancing_weights() function in cell2cell.tensor.coupled_factorization for consistent weight computation across all coupled factorization methods. This function handles both automatic (based on non-shared mode dimensions) and manual weight specifications.

  • Enhanced factor dictionary creation: Added _create_combined_factors_dict() function to properly combine factor loadings from both tensors based on mode mapping, used in similarity calculations during elbow analysis.

  • Improved elbow analysis output structure: Modified _run_coupled_elbow_analysis() and _multiple_runs_coupled_elbow_analysis() to return structured dictionaries with separate metrics for each tensor and combined scores, enabling better analysis and visualization of coupled factorization quality.

  • Enhanced device management: Updated CoupledInteractionTensor.to_device() method to also move tl_object1, tl_object2, norm_tl_object1, and norm_tl_object2 attributes to the specified device when they exist, ensuring complete device migration. Similar idea was implemented to InteractionTensor.to_device().

  • Updated plotting imports: Changed imports in coupled_tensor.py from generic plot_elbow and plot_multiple_run_elbow to specialized plot_coupled_elbow, plot_multiple_run_coupled_elbow, and plot_coupled_factorization_errors for coupled tensor-specific visualizations. Similarly, tensor.py now imports plot_factorization_errors for regular tensor error visualization.

  • Improved verbose output: Enhanced verbose logging in coupled_non_negative_parafac() to display the weights being used when balance_errors=True and verbose > 1.

  • Balance errors parameter flexibility: Added balance_errors=None parameter to compute_tensor_factorization() and elbow_rank_selection() methods, which defaults to the value set during CoupledInteractionTensor initialization if not explicitly provided.

  • Error tracking in compute_tensor_factorization: Both BaseTensor.compute_tensor_factorization() and CoupledInteractionTensor.compute_tensor_factorization() methods now store detailed error information from the best run. For regular tensors, this includes per-iteration reconstruction errors stored in factorization_errors_. For coupled tensors, this includes factorization_errors1_, factorization_errors2_, and combined_errors_ for both tensors and their weighted combination. Documentation updated to reflect that the method now updates the factorization_errors_ attribute in addition to factors and rank.

Full Changelog: v0.8.2...v0.8.3

v0.8.2

Choose a tag to compare

@earmingol earmingol released this 02 Oct 08:09
a5d4b07

What's Changed

Please refer to the release notes of all previous versions here

Feature updates

  • Removed strict requirement of gseapy version for compatibility with newer Python versions

Full Changelog: v0.8.1...v0.8.2

v0.8.1

Choose a tag to compare

@earmingol earmingol released this 04 Sep 20:18
69e8738

What's Changed

Please refer to the release notes of all previous versions here

Full Changelog: v0.8.0...v0.8.1

  • Updated cell2cell.io.read_tensor() for retro-compatibility

v0.8.0

Choose a tag to compare

@earmingol earmingol released this 30 Aug 20:37
5ced550

What's Changed

Full Changelog: v0.7.4...v0.8.0

Please refer to the release notes of all previous versions here

New features

  • Implemented Coupled Tensor Component Analysis.
    • New class CoupledInteractionTensor in cell2cell.tensor.coupled_tensor.
    • Methods available in cell2cell.tensor.coupled_factorization.

Feature updates

  • Updated default parameter in cell2cell.tensor functions to use svd='truncated_svd'instead of svd='numpy_svd'
    as the latter is deprecated in the tensorly package.

v0.7.4

Choose a tag to compare

@earmingol earmingol released this 06 May 18:08

Please refer to the release notes of all previous versions here

New features

Feature updates

  • Updated assert warnings for Tensor-cell2cell

Fixed Bugs

  • Fixed set indexing that was deprecated in new pandas versions (in cell2cell.preprocessing.rnaseq.add_complexes_to_expression())

What's Changed

Full Changelog: v0.7.3...v0.7.4

cell2cell - v0.7.3

Choose a tag to compare

@earmingol earmingol released this 29 Nov 23:16
c904946

Please refer to the release notes of all previous versions here

New features

  • Refer to v0.7.2 notes to see the previous new features.
  • Added example of using Spatial Data with Tensor-cell2cell.

Feature updates

  • Updated single-cell data example with cell2cell to use COVID-19 data.
  • Updated bulk data example with cell2cell.
  • Updated docs folder for readthedocs.org.
  • Updated README.md

Fixed Bugs

  • Fixed legend visualization in cell2cell.plotting.pcoa_plot.pcoa_3dplot()
  • Fixed negative P-values in cell2cell.stats.permutation.compute_pvalue_from_dist()
  • Fixed permutation analysis in cell2cell.analysis.cell2cell_pipelines.SingleCellInteractions
  • Fixed legend visualization in cell2cell.plotting.circular_plot.circos_plot()

cell2cell - v0.7.0 and v0.7.1

Choose a tag to compare

@earmingol earmingol released this 19 Nov 22:39
7b00865

Please refer to the release notes of all previous versions here

New features

  • Added cell2cell.spatial functions for enabling analyses considering spatial organization in spatial data.
    These functions include:
    • Filtering by intercellular distances by thresholding values (cell2cell.spatial.distances and cell2cell.spatial.filtering).
    • Dividing the tissue in square grids (cell2cell.spatial.neighborhoods.create_spatial_grid())
    • Dividing the tissue in moving windows (cell2cell.spatial.neighborhoods.create_sliding_windows(), cell2cell.spatial.neighborhoods.calculate_window_size(),
      and cell2cell.spatial.neighborhoods.add_sliding_window_info_to_adata())

Feature updates

Fixed Bugs

  • Fixed bug that made to incorrectly visualize multiple legends in plots as for example in cell2cell.plotting.tensor_plot
    when using newer matplotlib versions.

cell2cell - v0.6.8

Choose a tag to compare

@earmingol earmingol released this 20 Apr 19:51
9fa855d

Please refer to the release notes of all previous versions here

Fixed Bugs

  • Fixed bug that was skipping first factor to generate outputs from cell2cell.external.gseapy.run_gsea()

cell2cell - v0.6.7

Choose a tag to compare

@earmingol earmingol released this 22 Mar 05:36

Please refer to the release notes of all previous versions here

Release Notes - cell2cell v0.6.7

New features

  • Direct access to interaction_elements attribute from cell2cell.analysis.cell2cell_pipelines.SingleCellInteractions
    and cell2cell.analysis.cell2cell_pipelines.BulkInteractions
  • Added option to store GMT file in output_folder in cell2cell.external.gseapy

Feature updates

  • Removed tqdm for jupyter notebooks.
  • Updated tensorly version from 0.7.0 to 0.8.1

Fixed Bugs

  • Modified permutations in cell2cell.analysis.cell2cell_pipelines.SingleCellInteractions.permute_cell_labels()