autoencodix 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of autoencodix might be problematic. Click here for more details.

Files changed (91) hide show
  1. autoencodix/__init__.py +27 -0
  2. autoencodix/base/.ipynb_checkpoints/_base_pipeline-checkpoint.py +1274 -0
  3. autoencodix/base/.ipynb_checkpoints/_base_trainer-checkpoint.py +247 -0
  4. autoencodix/base/__init__.py +21 -0
  5. autoencodix/base/_base_autoencoder.py +138 -0
  6. autoencodix/base/_base_dataset.py +103 -0
  7. autoencodix/base/_base_evaluator.py +34 -0
  8. autoencodix/base/_base_loss.py +311 -0
  9. autoencodix/base/_base_pipeline.py +1355 -0
  10. autoencodix/base/_base_predictor.py +6 -0
  11. autoencodix/base/_base_preprocessor.py +1033 -0
  12. autoencodix/base/_base_trainer.py +259 -0
  13. autoencodix/base/_base_visualizer.py +578 -0
  14. autoencodix/base/sampleconfig.yaml +132 -0
  15. autoencodix/configs/__init__.py +21 -0
  16. autoencodix/configs/default_config.py +652 -0
  17. autoencodix/configs/disentanglix_config.py +15 -0
  18. autoencodix/configs/maskix_config.py +39 -0
  19. autoencodix/configs/ontix_config.py +35 -0
  20. autoencodix/configs/stackix_config.py +33 -0
  21. autoencodix/configs/vanillix_config.py +18 -0
  22. autoencodix/configs/varix_config.py +15 -0
  23. autoencodix/configs/xmodalix_config.py +43 -0
  24. autoencodix/disentanglix.py +72 -0
  25. autoencodix/evaluate/.ipynb_checkpoints/evaluate-checkpoint.py +532 -0
  26. autoencodix/evaluate/__init__.py +4 -0
  27. autoencodix/evaluate/_general_evaluator.py +730 -0
  28. autoencodix/evaluate/_xmodalix_evaluator.py +376 -0
  29. autoencodix/imagix.py +76 -0
  30. autoencodix/losses/disentanglix_loss.py +215 -0
  31. autoencodix/losses/maskix_loss.py +94 -0
  32. autoencodix/losses/vanillix_loss.py +28 -0
  33. autoencodix/losses/varix_loss.py +102 -0
  34. autoencodix/losses/xmodal_loss.py +304 -0
  35. autoencodix/maskix.py +108 -0
  36. autoencodix/modeling/.ipynb_checkpoints/__init__-checkpoint.py +16 -0
  37. autoencodix/modeling/.ipynb_checkpoints/_captum_forward-checkpoint.py +16 -0
  38. autoencodix/modeling/__init__.py +20 -0
  39. autoencodix/modeling/_captum_forward.py +20 -0
  40. autoencodix/modeling/_classifier.py +45 -0
  41. autoencodix/modeling/_imagevae_architecture.py +296 -0
  42. autoencodix/modeling/_imgfast_architecture.py +288 -0
  43. autoencodix/modeling/_layer_factory.py +71 -0
  44. autoencodix/modeling/_maskix_architecture.py +190 -0
  45. autoencodix/modeling/_ontix_architecture.py +305 -0
  46. autoencodix/modeling/_vanillix_architecture.py +136 -0
  47. autoencodix/modeling/_varix_architecture.py +192 -0
  48. autoencodix/notebooks/__init__.py +0 -0
  49. autoencodix/ontix.py +136 -0
  50. autoencodix/py.typed +0 -0
  51. autoencodix/stackix.py +122 -0
  52. autoencodix/trainers/__init__.py +6 -0
  53. autoencodix/trainers/_general_trainer.py +525 -0
  54. autoencodix/trainers/_maskix_trainer.py +116 -0
  55. autoencodix/trainers/_ontix_trainer.py +77 -0
  56. autoencodix/trainers/_stackix_orchestrator.py +522 -0
  57. autoencodix/trainers/_stackix_trainer.py +209 -0
  58. autoencodix/trainers/_xmodal_trainer.py +1006 -0
  59. autoencodix/utils/.ipynb_checkpoints/_explainer-checkpoint.py +118 -0
  60. autoencodix/utils/.ipynb_checkpoints/_model_output-checkpoint.py +30 -0
  61. autoencodix/utils/.ipynb_checkpoints/_utils-checkpoint.py +626 -0
  62. autoencodix/utils/.ipynb_checkpoints/adata_converter-checkpoint.py +99 -0
  63. autoencodix/utils/.ipynb_checkpoints/feature_importance-checkpoint.py +823 -0
  64. autoencodix/utils/__init__.py +22 -0
  65. autoencodix/utils/_annealer.py +193 -0
  66. autoencodix/utils/_bulkreader.py +232 -0
  67. autoencodix/utils/_explainer.py +246 -0
  68. autoencodix/utils/_imgreader.py +404 -0
  69. autoencodix/utils/_internals.py +23 -0
  70. autoencodix/utils/_llm_explainer.py +318 -0
  71. autoencodix/utils/_losses.py +20 -0
  72. autoencodix/utils/_model_output.py +30 -0
  73. autoencodix/utils/_result.py +393 -0
  74. autoencodix/utils/_screader.py +76 -0
  75. autoencodix/utils/_traindynamics.py +187 -0
  76. autoencodix/utils/_utils.py +690 -0
  77. autoencodix/utils/adata_converter.py +111 -0
  78. autoencodix/utils/example_data.py +398 -0
  79. autoencodix/utils/feature_importance.py +829 -0
  80. autoencodix/utils/prompts.py +21 -0
  81. autoencodix/vanillix.py +141 -0
  82. autoencodix/varix.py +80 -0
  83. autoencodix/visualize/__init__.py +5 -0
  84. autoencodix/visualize/_general_visualizer.py +913 -0
  85. autoencodix/visualize/_imagix_visualizer.py +111 -0
  86. autoencodix/visualize/_xmodal_visualizer.py +841 -0
  87. autoencodix/visualize/visualize.py +1214 -0
  88. autoencodix/xmodalix.py +318 -0
  89. autoencodix-0.2.0.dist-info/METADATA +143 -0
  90. autoencodix-0.2.0.dist-info/RECORD +91 -0
  91. autoencodix-0.2.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,318 @@
1
+ from typing import Dict, Optional, Type, Union, Literal
2
+ import numpy as np
3
+
4
+ import anndata as ad # type: ignore
5
+
6
+ from autoencodix.base._base_dataset import BaseDataset, DataSetTypes
7
+ from autoencodix.base._base_loss import BaseLoss
8
+ from autoencodix.base._base_pipeline import BasePipeline
9
+ from autoencodix.base._base_trainer import BaseTrainer
10
+ from autoencodix.base._base_visualizer import BaseVisualizer
11
+ from autoencodix.base._base_preprocessor import BasePreprocessor
12
+ from autoencodix.base._base_autoencoder import BaseAutoencoder
13
+ from autoencodix.data._datasetcontainer import DatasetContainer
14
+ from autoencodix.data._multimodal_dataset import MultiModalDataset
15
+
16
+ from autoencodix.modeling._imagevae_architecture import ImageVAEArchitecture
17
+ from autoencodix.data._datasplitter import DataSplitter
18
+ from autoencodix.data.datapackage import DataPackage
19
+ from autoencodix.modeling._varix_architecture import VarixArchitecture
20
+ from autoencodix.data._xmodal_preprocessor import XModalPreprocessor
21
+ from autoencodix.evaluate._xmodalix_evaluator import XModalixEvaluator
22
+ from autoencodix.trainers._xmodal_trainer import XModalTrainer
23
+ from autoencodix.utils._result import Result
24
+ from autoencodix.configs.default_config import DefaultConfig
25
+ from autoencodix.configs.xmodalix_config import XModalixConfig
26
+ from autoencodix.utils._losses import XModalLoss
27
+ from autoencodix.utils._utils import find_translation_keys
28
+ from autoencodix.visualize._xmodal_visualizer import XModalVisualizer
29
+
30
+ from mudata import MuData
31
+ import torch # type: ignore
32
+
33
+
34
+ class XModalix(BasePipeline):
35
+ """XModalix specific version of the BasePipeline class.
36
+
37
+ Inherits preprocess, fit, evaluate, and visualize methods from BasePipeline.
38
+ Overrides predict
39
+
40
+ This class extends BasePipeline. See the parent class for a full list
41
+ of attributes and methods.
42
+
43
+ Additional Attributes:
44
+ _default_config: Is set to XModalixConfig here.
45
+
46
+ """
47
+
48
+ def __init__(
49
+ self,
50
+ data: Optional[Union[DataPackage, DatasetContainer]] = None,
51
+ trainer_type: Type[BaseTrainer] = XModalTrainer,
52
+ dataset_type: Type[BaseDataset] = MultiModalDataset,
53
+ model_type: Type[BaseAutoencoder] = VarixArchitecture,
54
+ loss_type: Type[BaseLoss] = XModalLoss,
55
+ preprocessor_type: Type[BasePreprocessor] = XModalPreprocessor,
56
+ visualizer: Optional[Type[BaseVisualizer]] = XModalVisualizer,
57
+ evaluator: Optional[Type[XModalixEvaluator]] = XModalixEvaluator,
58
+ result: Optional[Result] = None,
59
+ datasplitter_type: Type[DataSplitter] = DataSplitter,
60
+ custom_splits: Optional[Dict[str, np.ndarray]] = None,
61
+ config: Optional[DefaultConfig] = None,
62
+ model_map: Dict[DataSetTypes, Type[BaseAutoencoder]] = {
63
+ DataSetTypes.NUM: VarixArchitecture,
64
+ DataSetTypes.IMG: ImageVAEArchitecture,
65
+ },
66
+ ) -> None:
67
+ """See base class for full list of Args."""
68
+ self._default_config = XModalixConfig()
69
+ super().__init__(
70
+ data=data,
71
+ dataset_type=dataset_type,
72
+ trainer_type=trainer_type,
73
+ model_type=model_type,
74
+ loss_type=loss_type,
75
+ preprocessor_type=preprocessor_type,
76
+ visualizer=visualizer,
77
+ evaluator=evaluator,
78
+ result=result,
79
+ datasplitter_type=datasplitter_type,
80
+ config=config,
81
+ custom_split=custom_splits,
82
+ model_map=model_map,
83
+ )
84
+ if not isinstance(self.config, XModalixConfig):
85
+ raise TypeError(
86
+ f"For XModalix Pipeline, we only allow XModalixConfig as type for config, got {type(self.config)}"
87
+ )
88
+
89
+ def show_result(self):
90
+ """Displays key visualizations of model results.
91
+
92
+ This method generates the following visualizations:
93
+ 1. Loss Curves: Displays the absolute loss curves to provide insights into
94
+ the model's training and validation performance over epochs.
95
+ 2. Latent Space Ridgeline Plot: Visualizes the distribution of the latent
96
+ space representations across different dimensions, offering a high-level
97
+ overview of the learned embeddings.
98
+ 3. Latent Space 2D Scatter Plot: Projects the latent space into two dimensions
99
+ for a detailed view of the clustering or separation of data points.
100
+
101
+ These visualizations help in understanding the model's performance and
102
+ the structure of the latent space representations.
103
+ """
104
+ print("Creating plots ...")
105
+
106
+ self.visualizer.show_loss(plot_type="absolute")
107
+
108
+ self.visualizer.show_latent_space(result=self.result, plot_type="Ridgeline")
109
+
110
+ self.visualizer.show_latent_space(result=self.result, plot_type="2D-scatter")
111
+
112
+ dm_keys = find_translation_keys(
113
+ config=self.config,
114
+ trained_modalities=self._trainer._modality_dynamics.keys(),
115
+ )
116
+ if "IMG" in dm_keys["to"]:
117
+ self.visualizer.show_image_translation(
118
+ result=self.result,
119
+ from_key=dm_keys["from"],
120
+ to_key=dm_keys["to"],
121
+ split="test",
122
+ )
123
+
124
+ def _process_latent_results(
125
+ self, predictor_results: Result, predict_data: DatasetContainer
126
+ ):
127
+ """Processes latent space results into a single AnnData object for the source modality.
128
+
129
+ This method identifies the source ('from') modality used for translation,
130
+ extracts its latent space and sample IDs, and creates a single, informative
131
+ AnnData object. The original feature names from the source dataset are
132
+ also stored for reference.
133
+
134
+ The final AnnData object is stored in `self.result.adata_latent`.
135
+
136
+ Args:
137
+ predictor_results: The Result object returned by the `predict` method.
138
+ predict_data: The MultiModalDataset used for prediction, to access metadata.
139
+
140
+ Raises:
141
+ TypeError: if predicitonsresults arr no Dicts.
142
+ ValueError: if no translate direction can be found or no latentspace is stored for the specified modality.
143
+ """
144
+ print("Processing latent space results into a single AnnData object...")
145
+ all_latents = predictor_results.latentspaces.get(epoch=-1, split="test")
146
+ all_sample_ids = predictor_results.sample_ids.get(epoch=-1, split="test")
147
+ all_recons = predictor_results.reconstructions.get(epoch=-1, split="test")
148
+
149
+ if not all(
150
+ [isinstance(res, dict) for res in [all_latents, all_sample_ids, all_recons]]
151
+ ):
152
+ raise TypeError("Expected prediction results to be dictionaries.")
153
+
154
+ try:
155
+ predict_keys = find_translation_keys(
156
+ config=self.config,
157
+ trained_modalities=all_latents.keys(), # type: ignore
158
+ )
159
+ from_key = predict_keys["from"]
160
+ except Exception as e:
161
+ # Provide a helpful error if the key can't be determined.
162
+ raise ValueError(
163
+ "Could not determine the 'from_key' for translation. "
164
+ "Ensure the translation direction is specified in the config."
165
+ ) from e
166
+
167
+ print(f"Identified source modality for latent space: '{from_key}'")
168
+
169
+ latent = all_latents.get(from_key) # type: ignore
170
+ sample_ids = all_sample_ids.get(from_key) # type: ignore
171
+
172
+ if latent is None:
173
+ raise ValueError(
174
+ f"Latent space for source modality '{from_key}' not found."
175
+ )
176
+
177
+ self.result.adata_latent = ad.AnnData(latent)
178
+ self.result.adata_latent.var_names = [
179
+ f"latent_{i}" for i in range(latent.shape[1])
180
+ ]
181
+
182
+ if sample_ids is not None:
183
+ self.result.adata_latent.obs_names = sample_ids
184
+
185
+ source_dataset = predict_data.test.datasets.get(from_key) # type: ignore
186
+ if (
187
+ source_dataset
188
+ and hasattr(source_dataset, "feature_ids")
189
+ and source_dataset.feature_ids is not None
190
+ ):
191
+ self.result.adata_latent.uns["feature_ids"] = source_dataset.feature_ids
192
+ print(
193
+ f" - Added {len(source_dataset.feature_ids)} source feature IDs to .uns"
194
+ )
195
+
196
+ self.result.update(predictor_results)
197
+ print("Finished processing latent results.")
198
+
199
+ def _validate_prediction_data(self, predict_data: BaseDataset):
200
+ """Validate that prediction data has required test split.
201
+
202
+ Args:
203
+ predict_data: Dataset for prediciton
204
+ Raises:
205
+ ValueError: if prediciton data is empty.
206
+
207
+ """
208
+ if predict_data is None:
209
+ raise ValueError(
210
+ f"The data for prediction need to be a DatasetContainer with a test attribute containing a `BaseDataset` child"
211
+ f"attribute, got: {predict_data}"
212
+ )
213
+
214
+ def _predict(
215
+ self,
216
+ predict_data: BaseDataset,
217
+ from_key: Optional[str] = None,
218
+ to_key: Optional[str] = None,
219
+ split: Literal["train", "valid", "test"] = "test",
220
+ ):
221
+ """Utility warpper of predict method of the trainer instance"""
222
+ self._validate_prediction_data(predict_data=predict_data)
223
+ return self._trainer.predict(
224
+ data=predict_data,
225
+ model=self.result.model,
226
+ from_key=from_key,
227
+ to_key=to_key,
228
+ split=split,
229
+ ) # type: ignore
230
+
231
+ def predict(
232
+ self,
233
+ data: Optional[
234
+ Union[
235
+ DataPackage,
236
+ DatasetContainer,
237
+ ad.AnnData,
238
+ MuData, # ty: ignore[invalid-type-form]
239
+ ]
240
+ ] = None,
241
+ config: Optional[Union[None, DefaultConfig]] = None,
242
+ from_key: Optional[str] = None,
243
+ to_key: Optional[str] = None,
244
+ predict_all: bool = False,
245
+ **kwargs,
246
+ ):
247
+ """Generates predictions using the trained model.
248
+
249
+ Uses the trained model to make predictions on test data or new data
250
+ provided by the user. Processes the results and stores them in the
251
+ result container.
252
+
253
+ Args:
254
+ data: Optional new data for predictions.
255
+ config: Optional custom configuration for prediction.
256
+ from_key: string indicator of 'from' translation direction.
257
+ to_key: string indicator of 'to' translation direction.
258
+ **kwargs: Additional configuration parameters as keyword arguments.
259
+
260
+ Raises:
261
+ NotImplementedError: If required components aren't initialized.
262
+ ValueError: If no test data is available or data format is invalid.
263
+ """
264
+ self._validate_prediction_requirements()
265
+
266
+ original_input = data
267
+ predict_data = self._prepare_prediction_data(data=data)
268
+ if predict_data.test is None:
269
+ raise ValueError("No test data available for predictions.")
270
+ predictor_results = self._predict(
271
+ predict_data=predict_data.test,
272
+ from_key=from_key,
273
+ to_key=to_key,
274
+ split="test",
275
+ )
276
+
277
+ self._process_latent_results(
278
+ predictor_results=predictor_results, predict_data=predict_data
279
+ )
280
+ self._postprocess_reconstruction(
281
+ predictor_results=predictor_results,
282
+ original_input=original_input,
283
+ predict_data=predict_data,
284
+ )
285
+
286
+ if predict_all:
287
+ if self._datasets is None:
288
+ raise ValueError(
289
+ "No training/validation data available for predictions."
290
+ )
291
+ train_pred_results = self._predict(
292
+ predict_data=self._datasets.train,
293
+ from_key=from_key,
294
+ to_key=to_key,
295
+ split="train",
296
+ )
297
+ self.result.update(other=train_pred_results)
298
+ if self._datasets.valid is None:
299
+ raise ValueError("No validation data available for predictions.")
300
+ valid_pred_results = self._predict(
301
+ predict_data=self._datasets.valid,
302
+ from_key=from_key,
303
+ to_key=to_key,
304
+ split="valid",
305
+ )
306
+ self.result.update(other=valid_pred_results)
307
+
308
+ return self.result
309
+
310
+ def sample_latent_space(
311
+ self,
312
+ n_samples: int,
313
+ split: str = "test",
314
+ epoch: int = -1,
315
+ ) -> torch.Tensor:
316
+ raise NotImplementedError(
317
+ "Sampling latent space is not implemented for XModalix."
318
+ )
@@ -0,0 +1,143 @@
1
+ Metadata-Version: 2.4
2
+ Name: autoencodix
3
+ Version: 0.2.0
4
+ Summary: Framework for multi-omics data integration by autoencoders.
5
+ Project-URL: Homepage, https://github.com/jan-forest/autoencodix_package
6
+ Project-URL: Issues, https://github.com/jan-forest/autoencodix_package/issues
7
+ Author-email: Maximilian Joas & Jan Ewald <jan.ewald@uni-leipzig.de>
8
+ License-Expression: Apache-2.0
9
+ Classifier: Operating System :: OS Independent
10
+ Classifier: Programming Language :: Python :: 3
11
+ Requires-Python: <3.13,>=3.9
12
+ Requires-Dist: anndata==0.10.8
13
+ Requires-Dist: captum==0.7.0
14
+ Requires-Dist: dill>=0.4.0
15
+ Requires-Dist: ipykernel>=6.29.5
16
+ Requires-Dist: ipywidgets>=8.1.7
17
+ Requires-Dist: lightning-fabric>=2.5.0.post0
18
+ Requires-Dist: llvmlite>=0.43.0
19
+ Requires-Dist: matplotlib>=3.9.4
20
+ Requires-Dist: mistralai>=1.9.11
21
+ Requires-Dist: mkdocs-material>=9.6.19
22
+ Requires-Dist: mkdocstrings[python]>=0.30.0
23
+ Requires-Dist: mudata==0.2.4
24
+ Requires-Dist: numba>=0.60.0
25
+ Requires-Dist: numpy>=2.0.2
26
+ Requires-Dist: ollama>=0.6.1
27
+ Requires-Dist: openai==2.31.0
28
+ Requires-Dist: opencv-python>=4.11.0.86
29
+ Requires-Dist: pandas-stubs>=2.2.2.240807
30
+ Requires-Dist: pandas>=2.2.3
31
+ Requires-Dist: pyarrow>=19.0.1
32
+ Requires-Dist: pydantic>=2.10.6
33
+ Requires-Dist: pyyaml>=6.0.2
34
+ Requires-Dist: scanpy>=1.10.3
35
+ Requires-Dist: scikit-learn>=1.6.1
36
+ Requires-Dist: scipy>=1.13.1
37
+ Requires-Dist: seaborn>=0.13.2
38
+ Requires-Dist: tensorboard-plugin-profile==2.20.1
39
+ Requires-Dist: tensorboard>=2.20.0
40
+ Requires-Dist: torch<2.4.0,>=2.1.0
41
+ Requires-Dist: umap-learn>=0.5.7
42
+ Description-Content-Type: text/markdown
43
+
44
+ # AUTOENCODIX
45
+ Autoencoders are deep-learning-based networks for dimension reduction and embedding by a combination of a compressing encoder and decoder structure for non-linear and multi-modal data integration, with promising applications to complex biological data from large-scale omics measurements. Current ongoing research and publications provide many exciting architectures and implementations of autoencoders. However, there is a lack of easy-to-use and unified implementations covering the whole pipeline of autoencoder applications.
46
+ Consequently, we present `AUTOENCODIX` with the following features:
47
+ - Multi-modal data integration for any numerical or categorical data
48
+ - Different autoencoder architectures:
49
+ - vanilla `vanillix`
50
+ - variational `varix`
51
+ - disentangled variational `disentanglix`
52
+ - hierarchical/stacked `stackix`
53
+ - ontology-based `ontix`
54
+ - masking `maskix`
55
+ - Image VAE (2D) `imagix`
56
+ - cross-modal autoencoder (translation between different data modalities) `x-modalix` (works for multiple modalities paired and unpaired)
57
+ - A Python package with a scikit-learn-like interface
58
+
59
+ ## Requirements
60
+ - Python>=3.8 <3.13
61
+ - uv or another package manager (we recommend uv)
62
+ - git or gh
63
+ ## Installation
64
+ - `gh repo clone jan-forest/autoencodix_package`
65
+ - `cd autoencodix_package`
66
+ - `uv venv --python 3.10`
67
+ - `source .venv/bin/activate`
68
+ - `uv sync`
69
+
70
+ ## Sample Usage
71
+ ```python
72
+ import autoencodix as acx
73
+ from autoencodix.data.datapackage import DataPackage
74
+ from autoencodix.configs.vanillix_config import VanillixConfig
75
+ from autoencodix.configs.default_config import DataCase
76
+
77
+ # If your data is stored in pandas DataFrames, you can easily pass them to our custom DataPackage.
78
+ # For any tabular data that is not single-cell, provide it as a dictionary to the "multi_bulk" attribute of DataPackage.
79
+ # Note: "multi" might be misleading — it's valid to provide just one modality (1–n data modalities).
80
+ # Here, we assume paired metadata. If you have separate metadata for each modality, use the same dict keys as in multi_bulk, e.g.:
81
+ # annotation = {"rna": rna_annotation, "protein": protein_annotation}
82
+ my_datapackage: DataPackage = DataPackage(
83
+ multi_bulk={"rna": raw_rna, "protein": raw_protein},
84
+ annotation={"paired": annotation},
85
+ )
86
+
87
+ myconfig: VanillixConfig = VanillixConfig(data_case=DataCase.MULTI_BULK, epochs=30, device="cpu")
88
+ vanillix = acx.Vanillix(data=my_datapackage, config=myconfig)
89
+ result = vanillix.run()
90
+ ```
91
+
92
+ ## Getting Started
93
+ We provide extensive tutorials for all of our use cases. The best place to start is the `Vanillix Tutorial`. Here, we explain the design and features of our pipeline, which applies to other pipelines. From there, you can explore the tutorials for the more specialized architectures (`Varix`, `Ontix`, etc). We also provide tutorials for each pipeline, but the `Vanillix Tutorial` explains the general concepts, while the other tutorials go into the specifics of the corresponding pipeline. For even more details on extra functionality, such as visualizing or customizing we provide deep dive tutorials for these topics. You can find the tutorials here:
94
+
95
+ - Best to get started: [Vanillix Tutorial](https://github.com/jan-forest/autoencodix_package/blob/main/Tutorials/PipelineTutorials/Vanillix.ipynb)
96
+ - Tutorials for each specific pipeline (more advanced, do Vanillix first): [Pipeline Tutorials](https://github.com/jan-forest/autoencodix_package/tree/main/Tutorials/PipelineTutorials)
97
+ - Tutorials for specific extra functionality, see [Deep Dives](https://github.com/jan-forest/autoencodix_package/tree/main/Tutorials/DeepDives)
98
+ ## Contributing
99
+ Whether you have a feature request, found a bug, or have any other idea, we're always happy. For more details, refer to our [Guide](https://github.com/jan-forest/autoencodix_package/blob/main/DEVELOPER.md)
100
+
101
+ ## Read The Docs
102
+ You can find our documentation [here](https://jan-forest.github.io/autoencodix_package/).
103
+
104
+ ## FAQ
105
+
106
+ ### Reproducibility and CUBLAS_WORKSPACE_CONFIG
107
+ If you run for reproducibility with `FIX_RANDOMNESS: "all"` and you receive the following error:
108
+ ```
109
+ RuntimeError: Deterministic behavior was enabled with either `torch.use_deterministic_algorithms(True)` or `at::Context::setDeterministicAlgorithms(true)`, but this operation is not deterministic because it uses CuBLAS and you have CUDA >= 10.2.
110
+ ```
111
+ You need to run the following in your terminal before running our pipeline:
112
+ ```
113
+ export CUBLAS_WORKSPACE_CONFIG=:16:8
114
+ ```
115
+
116
+
117
+ ## Cite
118
+
119
+ While we are working on a new publication of the Python package version, we are referring to our previous publication in [Nature Computational Science](https://doi.org/10.1038/s43588-025-00916-4)
120
+
121
+ Please, use this to cite our work when using our framework:
122
+
123
+ ```
124
+ @article{joas2025autoencodix,
125
+ title={AUTOENCODIX: a generalized and versatile framework to train and evaluate autoencoders for biological representation learning and beyond},
126
+ author={Joas, Maximilian Josef and Jurenaite, Neringa and Pra{\v{s}}{\v{c}}evi{\'c}, Du{\v{s}}an and Scherf, Nico and Ewald, Jan},
127
+ journal={Nature Computational Science},
128
+ pages={1--13},
129
+ year={2025},
130
+ doi={}
131
+ publisher={Nature Publishing Group US New York}
132
+ }
133
+ ```
134
+
135
+ ## License
136
+
137
+ Copyright [2026] [Maximilian Josef Joas & Jan Ewald, ScaDS.AI, Leipzig University]
138
+
139
+ Licensed under the Apache License, Version 2.0 (the "License");
140
+ you may not use this file except in compliance with the License.
141
+ You may obtain a copy of the License at
142
+
143
+ http://www.apache.org/licenses/LICENSE-2.0
@@ -0,0 +1,91 @@
1
+ autoencodix/__init__.py,sha256=mSi8BWZdwrKAhYyjOs2_OWYCnZvkZ99YTek6lN9dsBo,590
2
+ autoencodix/disentanglix.py,sha256=JzkYA5eJrMYwUu2fUpkj8_qrHgwx_mDA06na4FORwOQ,3138
3
+ autoencodix/imagix.py,sha256=x4taC_PHI4u_0SMx-Ad_SiWmi49cvlo_rz4APcBZVb4,3156
4
+ autoencodix/maskix.py,sha256=Y5wykiP-f2LPmhenaGeqFknOsKEb0pp1l6yxcwWKKiE,4424
5
+ autoencodix/ontix.py,sha256=yAFM8-KnsRQ-f38BsWxyjCrmzL1fS7t2iEQ3QXgCtTg,5513
6
+ autoencodix/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ autoencodix/stackix.py,sha256=vyIPYRBLnj4EList7hNGdbRKtAohSS648np-QUu1ahU,5155
8
+ autoencodix/vanillix.py,sha256=pgFSV2ZXAguXfh12ibfTUmDe9QrcQZ-GZ5ymj-_8gdY,5724
9
+ autoencodix/varix.py,sha256=G5QsCtOmeCDJLVKfrvoD72o4cV-gU9nREL_mpJ3D89U,3401
10
+ autoencodix/xmodalix.py,sha256=os3ybkFzyKU36dhV38MOVEdrZOYwUob4CoTSZzWXQ_c,12588
11
+ autoencodix/base/__init__.py,sha256=H9p10DnFNX5Zsa2VcaYz70jGvBDKXHnUxc9bGKC_BC8,579
12
+ autoencodix/base/_base_autoencoder.py,sha256=yr4Zn0S1aeDGdmAuxBaWB5G_D6hNNpVtk7xR1IfiFO4,4520
13
+ autoencodix/base/_base_dataset.py,sha256=TaHXg4yzwm6An101HjIsnWUYdtNq5eNrgveOSvbYLNU,3655
14
+ autoencodix/base/_base_evaluator.py,sha256=YzP12gBRrR6-RxPBm-Rmgg5Q3t4FDXYHYcGlZ2x0b_M,993
15
+ autoencodix/base/_base_loss.py,sha256=LTfhiSo1zeKbEKC4F4oiBRXYda61oKVb-77ErZrYqlU,11881
16
+ autoencodix/base/_base_pipeline.py,sha256=ZmOZy5QeunnEx5h4-75LJfJ66wSnz2iZWBv7KjJuJrE,60239
17
+ autoencodix/base/_base_predictor.py,sha256=Sn-d5wGaCB4HWb7f5slAjVPa5qnaZ9SICFzRrblu3hA,80
18
+ autoencodix/base/_base_preprocessor.py,sha256=ahKY0Xl_rKLWJr1BUP1ml8g6VyOUlU9AAtTNyItPE1w,43675
19
+ autoencodix/base/_base_trainer.py,sha256=mCJOVbGlAZgu3VgFgoTTc59np2qCm1Z8Fpe4WjVCn3Y,9996
20
+ autoencodix/base/_base_visualizer.py,sha256=lnUh0WNn9FhGNVamXclbkmv7XYww1_BtQMXkrRGomLs,24442
21
+ autoencodix/base/sampleconfig.yaml,sha256=fnwTS45fcf9q3btiP93-zh4HGQ4TaS7YiESbmtlkGQs,11575
22
+ autoencodix/base/.ipynb_checkpoints/_base_pipeline-checkpoint.py,sha256=9lzUAKSvdC_n2oL6XFZlTzJTOxky0NiwkVdti2OB9yg,54288
23
+ autoencodix/base/.ipynb_checkpoints/_base_trainer-checkpoint.py,sha256=NsIpD_MA3MGyxB-gi4IGpYkOMrgPzGGldU8Uq__2XTM,9568
24
+ autoencodix/configs/__init__.py,sha256=BHs-0PXUGDi1wmNuOnlA5HjHOeDdC43RniL6joEH_vw,577
25
+ autoencodix/configs/default_config.py,sha256=6UMXyIyNF8Ns2P4ZStUmCU6KIVNvGn5LDIrTboj199Q,25113
26
+ autoencodix/configs/disentanglix_config.py,sha256=JykatXHHo8bcFqlcOKFdx7s2I-032NjGNxUO6p21IO0,399
27
+ autoencodix/configs/maskix_config.py,sha256=nnApo-iTdG2Tu-6PhFEbTTCKq9hojSbdNzu22W61to8,1481
28
+ autoencodix/configs/ontix_config.py,sha256=xI7zTV9ZbP2FV09KlBSlry_XUh4vyQ7WNlN8WcUtnNE,1396
29
+ autoencodix/configs/stackix_config.py,sha256=xEn0qRbYqyhK0o7pGX1FEV5X1UjKOmVdO6q-bwVLXD0,1010
30
+ autoencodix/configs/vanillix_config.py,sha256=vHeyrqbliUH_HDmZR6GMYAKUOZOgWgXAZt-s14IM0aU,505
31
+ autoencodix/configs/varix_config.py,sha256=Syw4ek-2GyvleftC-8WiHHY6uZDf_gV5m1rrn8U6Ai0,385
32
+ autoencodix/configs/xmodalix_config.py,sha256=FILIQIQDZO-iuTbHPel9BPdpeHf_DxUlcGeE_-KP-Cs,1503
33
+ autoencodix/evaluate/__init__.py,sha256=kjKWqs6rMvHr1BuyBI5SCdUt7jS1XaruuQ60-szXwsY,153
34
+ autoencodix/evaluate/_general_evaluator.py,sha256=4FmYJPCXLPA-2rk68U0PjTddBQvCRUtS4ErMtSFrqwY,34268
35
+ autoencodix/evaluate/_xmodalix_evaluator.py,sha256=UvzpOflBpETW2tqMGYMuYiB5TaSNADGpiw4_Ggg7A6A,14719
36
+ autoencodix/evaluate/.ipynb_checkpoints/evaluate-checkpoint.py,sha256=0DabR2nOU-j8FCaEog5qsQ2WJifsWvm-jTohHNY3ODw,23870
37
+ autoencodix/losses/disentanglix_loss.py,sha256=YKhXs_6gbnGSF6AmVTSkV-nnwNV_VJlytTuB4v0NNj4,8370
38
+ autoencodix/losses/maskix_loss.py,sha256=5nxSGJ_kXUQ9jTlxtXEvhPgCkrpXe2AEs5SnLk1np3s,4088
39
+ autoencodix/losses/vanillix_loss.py,sha256=7TSRDEDpZr02QjHDH0l7Djv8ruLGI8R-GUFDJD1CP2E,953
40
+ autoencodix/losses/varix_loss.py,sha256=2n3bSdXT8dcf59eKNxtmnurNT7z3p3fvdD3UA8c5Hco,3632
41
+ autoencodix/losses/xmodal_loss.py,sha256=WSfZ6ceU3mKF-xZinUrwlZ1yQEAv9aQZJgbCE5AEGWQ,13229
42
+ autoencodix/modeling/__init__.py,sha256=HTzJ6F5YzP6435k3-rn0nuhyuGqYFgKb9FkbjYkL-6k,649
43
+ autoencodix/modeling/_captum_forward.py,sha256=qWCQq4SCDLBmx3tTDeoq9pt2-IVWB0mrcg_OvdBojk4,720
44
+ autoencodix/modeling/_classifier.py,sha256=Vsr_XBFHL8JQ-KJzlmbn-f1T54lVjiAx9XVYXUYmx6s,1468
45
+ autoencodix/modeling/_imagevae_architecture.py,sha256=BYosAX2h0b9f4aBfNjpbsJcjIhI_GPVUZHqiyrLaNUg,11437
46
+ autoencodix/modeling/_imgfast_architecture.py,sha256=qvEdLA3jfyh-Qyy4RihVMCq5Do6lW5EuBGugVbt8f4A,11044
47
+ autoencodix/modeling/_layer_factory.py,sha256=Q5MDHw3G3H-yEhlyBjrFeuIlnwYkyfpJkSDrXd2ut9s,2221
48
+ autoencodix/modeling/_maskix_architecture.py,sha256=CZpMLYNPSeRlIecma8z2nlIEJtQolu37w3UocvwQ8W0,7020
49
+ autoencodix/modeling/_ontix_architecture.py,sha256=KZ0NIcY3PdhTxnmloE19k0qT7iidZd581aC-y821wPs,11067
50
+ autoencodix/modeling/_vanillix_architecture.py,sha256=Ek2jvX7InUPSOvWkisj38RBaSjB1_qJKw9nXtsfxinY,4124
51
+ autoencodix/modeling/_varix_architecture.py,sha256=xDRTldd6MGsLXvZs3RnsZGxI61tPfZQ4CsAlN9r-AZs,6140
52
+ autoencodix/modeling/.ipynb_checkpoints/__init__-checkpoint.py,sha256=PQrBfRJVka71dUpf0N5gZSRLd1WFD2a27txC-CDeTN0,464
53
+ autoencodix/modeling/.ipynb_checkpoints/_captum_forward-checkpoint.py,sha256=HWUPSqI3r-K7m0unwkYH3t2BrT1k5v8FlPo41ayYG2c,576
54
+ autoencodix/notebooks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
+ autoencodix/trainers/__init__.py,sha256=bU53mTZwcM0J4YMDs_AWiTjHkcYtb1V8D67raOrZHT8,276
56
+ autoencodix/trainers/_general_trainer.py,sha256=q9oBZVRstZgHTjKzDtlloV54T9OJvoTk8dtXD6zohWw,20609
57
+ autoencodix/trainers/_maskix_trainer.py,sha256=h41uQ5DdQ-gaJ1vMESubirGuOlcOaj34AUdvw228CEI,4567
58
+ autoencodix/trainers/_ontix_trainer.py,sha256=Ektlba30Obtt2xcEClNcW0Sz2nxroLcNNGhbYVLzI2Y,2980
59
+ autoencodix/trainers/_stackix_orchestrator.py,sha256=mUBXfvxzZLLpsKmFFWCmJ8CRkTiv8Lol0doENHGO3p8,21508
60
+ autoencodix/trainers/_stackix_trainer.py,sha256=1IOyoAhXW5JUZwtbOOGNrsb7SiOV1-K6yS8JRofpTrY,8774
61
+ autoencodix/trainers/_xmodal_trainer.py,sha256=8hOwPFzoHdSHo-GP14iA0l91BdDNVEEap3EDY9tWj7o,43247
62
+ autoencodix/utils/__init__.py,sha256=Ekw0yC3y28lomDDSvnhTjcJWS6f5fL5IR--jHHtSgyU,553
63
+ autoencodix/utils/_annealer.py,sha256=2P_M0D8hXRTlNT3Q1v3rwY_1muggGUSjVX3Z7WxM3X0,6458
64
+ autoencodix/utils/_bulkreader.py,sha256=7eCxq7LEDA0cRUzuDYDY8PAaOg5TVgYHblm0vQm9Ioc,8838
65
+ autoencodix/utils/_explainer.py,sha256=FX0zEBOEYdFzGI4ottIsT-OVRrZGAAJMqGCdCRPwU3A,10077
66
+ autoencodix/utils/_imgreader.py,sha256=zRu_pQoS1C3bveD6fDozc2kP04E3qLsUJEkJpTE4ODc,14744
67
+ autoencodix/utils/_internals.py,sha256=7AtfuXMsGDvY0knFkZA3mYDRSvscknfeR8TrKfGjReo,955
68
+ autoencodix/utils/_llm_explainer.py,sha256=Wzyje_Jy23LQbZFl5EV_R1LTasS6BRrgdV6aHDqx8sI,11611
69
+ autoencodix/utils/_losses.py,sha256=h3JS0LUoirb2K0FR5o8c5l3vOSWYFK745XFv0wg0MNk,644
70
+ autoencodix/utils/_model_output.py,sha256=0h1dm1FMOkL5uKYiSmTVeEXUt_qO4qT2Tsq167rklqQ,1030
71
+ autoencodix/utils/_result.py,sha256=iZVtoJxwHWvBvnAWKFD1L3NCVFnOfrrLI05kuo1F4O8,16825
72
+ autoencodix/utils/_screader.py,sha256=V_-loY6oo9OXxtvHHTc48OEUs7hdz0jMnTYxIKFJkyY,2839
73
+ autoencodix/utils/_traindynamics.py,sha256=cjlIYrll7ClNYEufmL3hlFxsFjbD2Poj4_yuez4s-nY,7083
74
+ autoencodix/utils/_utils.py,sha256=UkFGHD2mVQnycE_DhIXVydGkbU6Hw5zP2efETf2AFiY,27874
75
+ autoencodix/utils/adata_converter.py,sha256=Qa1JXVv8lxQ9t1MsyDCj80skDvh0ZSiy6zSZcb0Ap5k,4110
76
+ autoencodix/utils/example_data.py,sha256=m6Ci5K3NPfjHCu_GBl83UEQrRw7_xeglw1WUn17i03s,14161
77
+ autoencodix/utils/feature_importance.py,sha256=1MkL7lYVlHxfmh3-V1mgw9xYlu3clvY-xutLrdooJRY,29625
78
+ autoencodix/utils/prompts.py,sha256=DhtLfzzwqATe8lAC366pXmerXuX7ucvqbGyO4IgTOrI,1689
79
+ autoencodix/utils/.ipynb_checkpoints/_explainer-checkpoint.py,sha256=Q8sqHMZM-Bw1baaCCLRDMQECRAh_fm-uFxcbUV75qVc,4529
80
+ autoencodix/utils/.ipynb_checkpoints/_model_output-checkpoint.py,sha256=0h1dm1FMOkL5uKYiSmTVeEXUt_qO4qT2Tsq167rklqQ,1030
81
+ autoencodix/utils/.ipynb_checkpoints/_utils-checkpoint.py,sha256=L9Mcod1kRyXsPktm6SFTvLtHz055cyYsioIn56GbjkA,25440
82
+ autoencodix/utils/.ipynb_checkpoints/adata_converter-checkpoint.py,sha256=1KPesCObUAYdq949AxzXZ_srEpJK_FaIA5UOElDa31Y,3655
83
+ autoencodix/utils/.ipynb_checkpoints/feature_importance-checkpoint.py,sha256=VRQqZX8-bzFTgMKE7esA5J2vGSQFcWLLd0UfNaq3YP0,29481
84
+ autoencodix/visualize/__init__.py,sha256=pfktJGhtBmIx_LDZAy5n3nDYtYJiBmJkkuDlQELDppE,201
85
+ autoencodix/visualize/_general_visualizer.py,sha256=AWADGncwb_QYsvFp38hK_nMji7JFKN8nPi0-NgjUTAc,38381
86
+ autoencodix/visualize/_imagix_visualizer.py,sha256=4vq3dBel8vOWqKtlTVQ4vQ5zDiTp2Ofh8a9UWSXS1wM,3874
87
+ autoencodix/visualize/_xmodal_visualizer.py,sha256=L4zIhkfUaH_Q7BGCdD5kT-msCaYw5kY4AiASrFPZ6yc,32743
88
+ autoencodix/visualize/visualize.py,sha256=il2of6_Gm-oxAhnwkqPkkBtGPidEHX95Yix-CiBIps4,48152
89
+ autoencodix-0.2.0.dist-info/METADATA,sha256=9BuAUwEgNkZOW5QCcVk4Y6NFg5MsFBrwSLVWPqmPW8M,7049
90
+ autoencodix-0.2.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
91
+ autoencodix-0.2.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any