Releases: earmingol/cell2cell
Release list
v0.8.4
What's Changed
- v0.8.4 by @earmingol in #74
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()incell2cell.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
What's Changed
- v0.8.3 by @earmingol in #73
Please refer to the release notes of all previous versions here
New features
-
Manual weight control for coupled tensor factorization: Added
manual_weightsparameter tocoupled_non_negative_parafac(),CoupledInteractionTensor.compute_tensor_factorization(), andCoupledInteractionTensor.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 bothBaseTensorandCoupledInteractionTensorclasses. For coupled tensors, this includes individual errors for each tensor as well as combined weighted errors. The newfactorization_errors_attribute stores these errors after runningcompute_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 raisedNotImplementedError. -
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_individualparameter toCoupledInteractionTensor.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, useplot_coupled_factorization_errors(). Both functions are available incell2cell.plotting.tensor_plot. -
Coupled tensor elbow plots: Added specialized plotting functions
plot_coupled_elbow()andplot_multiple_run_coupled_elbow()incell2cell.plotting.tensor_plotto visualize elbow analysis results for coupled tensors. These functions support displaying individual tensor metrics (tensor1, tensor2) alongside combined metrics via theshow_individualparameter.
Feature updates
-
Extended class attributes: Added
factorization_errors_attribute toBaseTensorclass docstring to document the storage of per-iteration reconstruction errors. Similarly updatedCoupledInteractionTensorattributes to includefactorization_errors1_,factorization_errors2_, andcombined_errors_for tracking errors during coupled factorization. -
Customizable tensor names in plots: Added
tensor1_nameandtensor2_nameparameters 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 incell2cell.tensor.coupled_factorizationfor 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 movetl_object1,tl_object2,norm_tl_object1, andnorm_tl_object2attributes to the specified device when they exist, ensuring complete device migration. Similar idea was implemented toInteractionTensor.to_device(). -
Updated plotting imports: Changed imports in
coupled_tensor.pyfrom genericplot_elbowandplot_multiple_run_elbowto specializedplot_coupled_elbow,plot_multiple_run_coupled_elbow, andplot_coupled_factorization_errorsfor coupled tensor-specific visualizations. Similarly,tensor.pynow importsplot_factorization_errorsfor regular tensor error visualization. -
Improved verbose output: Enhanced verbose logging in
coupled_non_negative_parafac()to display the weights being used whenbalance_errors=Trueandverbose > 1. -
Balance errors parameter flexibility: Added
balance_errors=Noneparameter tocompute_tensor_factorization()andelbow_rank_selection()methods, which defaults to the value set duringCoupledInteractionTensorinitialization if not explicitly provided. -
Error tracking in compute_tensor_factorization: Both
BaseTensor.compute_tensor_factorization()andCoupledInteractionTensor.compute_tensor_factorization()methods now store detailed error information from the best run. For regular tensors, this includes per-iteration reconstruction errors stored infactorization_errors_. For coupled tensors, this includesfactorization_errors1_,factorization_errors2_, andcombined_errors_for both tensors and their weighted combination. Documentation updated to reflect that the method now updates thefactorization_errors_attribute in addition tofactorsandrank.
Full Changelog: v0.8.2...v0.8.3
v0.8.2
What's Changed
- Catching master commits by @earmingol in #71
- v0.8.2 by @earmingol in #72
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
What's Changed
- Update requirements.txt by @earmingol in #67
- Update new_version by @earmingol in #68
- Update tutorials by @earmingol in #69
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
What's Changed
- v0.8.0 by @earmingol in #66
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
CoupledInteractionTensorincell2cell.tensor.coupled_tensor. - Methods available in
cell2cell.tensor.coupled_factorization.
- New class
Feature updates
- Updated default parameter in
cell2cell.tensorfunctions to usesvd='truncated_svd'instead ofsvd='numpy_svd'
as the latter is deprecated in thetensorlypackage.
v0.7.4
Please refer to the release notes of all previous versions here
New features
- Refer to v0.7.3 notes to see the previous 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
- Updated Spatial Example by @earmingol in #47
Full Changelog: v0.7.3...v0.7.4
cell2cell - v0.7.3
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
docsfolder 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
Please refer to the release notes of all previous versions here
New features
- Added
cell2cell.spatialfunctions for enabling analyses considering spatial organization in spatial data.
These functions include:- Filtering by intercellular distances by thresholding values (
cell2cell.spatial.distancesandcell2cell.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(),
andcell2cell.spatial.neighborhoods.add_sliding_window_info_to_adata())
- Filtering by intercellular distances by thresholding values (
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
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
Please refer to the release notes of all previous versions here
Release Notes - cell2cell v0.6.7
New features
- Direct access to
interaction_elementsattribute fromcell2cell.analysis.cell2cell_pipelines.SingleCellInteractions
andcell2cell.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()