Getting Started

Installation

To install MOSNA for use with GPU compatible libraries:

conda create --solver=libmamba -n mosna-gpu -c rapidsai -c conda-forge -c nvidia -c pytorch rapids=23.04.01 python=3.10 cuda-version=11.2 pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 scanpy
conda activate mosna-gpu

Alternatively without GPU:

conda create --solver=libmamba -n mosna -c conda-forge python=3.10 scanpy
conda activate mosna

Then, install some essential dependencies:

pip install ipykernel ipywidgets
pip install tysserand
pip install -e .
pip install scipy==1.13

Alternatively, you can create a new Conda environment that has tysserand, mosna and all their dependencies installed:

conda env create -f mosna.yml

or copy the YAML content directly:

  1name: mosna-survival
  2channels:
  3  - defaults
  4  - conda-forge
  5dependencies:
  6  - _libgcc_mutex=0.1=conda_forge
  7  - _openmp_mutex=4.5=2_gnu
  8  - anndata=0.11.4=pyhd8ed1ab_0
  9  - arpack=3.9.1=nompi_hf03ea27_102
 10  - array-api-compat=1.12.0=pyhe01879c_0
 11  - brotli=1.2.0=h41a2e66_0
 12  - brotli-bin=1.2.0=hf2c8021_0
 13  - bzip2=1.0.8=hda65f42_8
 14  - c-ares=1.34.5=hb9d3cd8_0
 15  - ca-certificates=2025.11.12=hbd8a1cb_0
 16  - cached-property=1.5.2=hd8ed1ab_1
 17  - cached_property=1.5.2=pyha770c72_1
 18  - colorama=0.4.6=pyhd8ed1ab_1
 19  - colorcet=3.1.0=pyhd8ed1ab_1
 20  - contourpy=1.3.2=py310h3788b33_0
 21  - cycler=0.12.1=pyhd8ed1ab_1
 22  - ecos=2.0.14=np2py310h99de88f_3
 23  - exceptiongroup=1.3.0=pyhd8ed1ab_0
 24  - fonttools=4.60.1=py310h3406613_0
 25  - freetype=2.14.1=ha770c72_0
 26  - glpk=5.0=h445213a_0
 27  - gmp=6.3.0=hac33072_2
 28  - h5py=3.15.1=nompi_py310h4aa865e_100
 29  - hdf5=1.14.6=nompi_h6e4c0c1_103
 30  - icu=75.1=he02047a_0
 31  - igraph=1.0.0=hfe3e89f_0
 32  - joblib=1.5.2=pyhd8ed1ab_0
 33  - keyutils=1.6.3=hb9d3cd8_0
 34  - kiwisolver=1.4.9=py310haaf941d_2
 35  - krb5=1.21.3=h659f571_0
 36  - lcms2=2.17=h717163a_0
 37  - ld_impl_linux-64=2.45=h1aa0949_0
 38  - legacy-api-wrap=1.5=pyhd8ed1ab_0
 39  - leidenalg=0.11.0=py310hea6c23e_0
 40  - lerc=4.0.0=h0aef613_1
 41  - libaec=1.1.4=h3f801dc_0
 42  - libblas=3.9.0=39_h4a7cf45_openblas
 43  - libbrotlicommon=1.2.0=h09219d5_0
 44  - libbrotlidec=1.2.0=hd53d788_0
 45  - libbrotlienc=1.2.0=h02bd7ab_0
 46  - libcblas=3.9.0=39_h0358290_openblas
 47  - libcurl=8.17.0=h4e3cde8_0
 48  - libdeflate=1.25=h17f619e_0
 49  - libedit=3.1.20250104=pl5321h7949ede_0
 50  - libev=4.33=hd590300_2
 51  - libexpat=2.7.1=hecca717_0
 52  - libffi=3.5.2=h9ec8514_0
 53  - libfreetype=2.14.1=ha770c72_0
 54  - libfreetype6=2.14.1=h73754d4_0
 55  - libgcc=15.2.0=h767d61c_7
 56  - libgcc-ng=15.2.0=h69a702a_7
 57  - libgfortran=15.2.0=h69a702a_7
 58  - libgfortran5=15.2.0=hcd61629_7
 59  - libgomp=15.2.0=h767d61c_7
 60  - libhwloc=2.12.1=default_h7f8ec31_1002
 61  - libiconv=1.18=h3b78370_2
 62  - libjpeg-turbo=3.1.2=hb03c661_0
 63  - liblapack=3.9.0=39_h47877c9_openblas
 64  - libleidenalg=0.12.0=hb700be7_0
 65  - liblzma=5.8.1=hb9d3cd8_2
 66  - libnghttp2=1.67.0=had1ee68_0
 67  - libnsl=2.0.1=hb9d3cd8_1
 68  - libopenblas=0.3.30=pthreads_h94d23a6_4
 69  - libosqp=0.6.3=h5888daf_1
 70  - libpng=1.6.50=h421ea60_1
 71  - libqdldl=0.1.7=hcb278e6_0
 72  - libsqlite=3.51.0=hee844dc_0
 73  - libssh2=1.11.1=hcf80075_0
 74  - libstdcxx=15.2.0=h8f9b012_7
 75  - libstdcxx-ng=15.2.0=h4852527_7
 76  - libtiff=4.7.1=h9d88235_1
 77  - libuuid=2.41.2=he9a06e4_0
 78  - libwebp-base=1.6.0=hd42ef1d_0
 79  - libxcb=1.17.0=h8a09558_0
 80  - libxcrypt=4.4.36=hd590300_1
 81  - libxgboost=3.1.1=cpu_h2ebb00f_0
 82  - libxml2=2.15.1=h26afc86_0
 83  - libxml2-16=2.15.1=ha9997c6_0
 84  - libxml2-devel=2.15.1=h26afc86_0
 85  - libzlib=1.3.1=hb9d3cd8_2
 86  - llvmlite=0.45.1=py310hee1c697_0
 87  - matplotlib-base=3.10.8=py310hfde16b3_0
 88  - munkres=1.1.4=pyhd8ed1ab_1
 89  - natsort=8.4.0=pyh29332c3_1
 90  - ncurses=6.5=h2d0b736_3
 91  - networkx=3.4.2=pyh267e887_2
 92  - nomkl=1.0=h5ca1d4c_0
 93  - numba=0.62.1=py310h3477d8a_0
 94  - numexpr=2.14.1=py310h34a7263_101
 95  - openjpeg=2.5.4=h55fea9a_0
 96  - openssl=3.6.0=h26f9b46_0
 97  - osqp=0.6.7.post3=py310h5eaa309_1
 98  - packaging=25.0=pyh29332c3_1
 99  - pandas=2.3.3=py310h0158d43_1
100  - patsy=1.0.2=pyhcf101f3_0
101  - pillow=12.0.0=py310h80abafc_0
102  - pip=25.3=pyh8b19718_0
103  - pthread-stubs=0.4=hb9d3cd8_1002
104  - py-xgboost=3.1.1=cpu_pyh35227d3_0
105  - pynndescent=0.5.13=pyhd8ed1ab_1
106  - pyparsing=3.2.5=pyhcf101f3_0
107  - python=3.10.19=h3c07f61_2_cpython
108  - python-dateutil=2.9.0.post0=pyhe01879c_2
109  - python-igraph=1.0.0=py310hea6c23e_0
110  - python-tzdata=2025.2=pyhd8ed1ab_0
111  - python_abi=3.10=8_cp310
112  - pytz=2025.2=pyhd8ed1ab_0
113  - qdldl-python=0.1.7.post5=np20py310h5ebf739_1
114  - qhull=2020.2=h434a139_5
115  - readline=8.2=h8c095d6_2
116  - scanpy=1.11.5=pyhd8ed1ab_0
117  - scikit-learn=1.7.2=py310h228f341_0
118  - scikit-survival=0.25.0=np2py310h99cdc5b_0
119  - seaborn=0.13.2=hd8ed1ab_3
120  - seaborn-base=0.13.2=pyhd8ed1ab_3
121  - session-info2=0.2.3=pyhd8ed1ab_0
122  - setuptools=80.9.0=pyhff2d567_0
123  - six=1.17.0=pyhe01879c_1
124  - statsmodels=0.14.5=py310hf779ad0_1
125  - tbb=2022.3.0=h8d10470_1
126  - texttable=1.7.0=pyhd8ed1ab_1
127  - threadpoolctl=3.6.0=pyhecae5ae_0
128  - tk=8.6.13=noxft_ha0e22de_103
129  - tqdm=4.67.1=pyhd8ed1ab_1
130  - typing-extensions=4.15.0=h396c80c_0
131  - typing_extensions=4.15.0=pyhcf101f3_0
132  - tzdata=2025b=h78e105d_0
133  - umap-learn=0.5.9.post2=py310hff52083_0
134  - unicodedata2=17.0.0=py310h7c4b9e2_1
135  - wheel=0.45.1=pyhd8ed1ab_1
136  - xgboost=3.1.1=cpu_pyhb39878e_0
137  - xorg-libxau=1.0.12=hb03c661_1
138  - xorg-libxdmcp=1.1.5=hb03c661_1
139  - zlib-ng=2.2.5=hde8ca8f_0
140  - zstd=1.5.7=hb8e6e7a_2
141  - pip:
142      - aiohappyeyeballs==2.6.1
143      - aiohttp==3.13.2
144      - aiosignal==1.4.0
145      - alabaster==1.0.0
146      - annotated-types==0.7.0
147      - annoy==1.17.3
148      - app-model==0.4.0
149      - appdirs==1.4.4
150      - asciitree==0.3.3
151      - asttokens==3.0.1
152      - async-timeout==5.0.1
153      - attrs==25.4.0
154      - autograd==1.8.0
155      - autograd-gamma==0.5.0
156      - babel==2.17.0
157      - bermuda==0.1.6
158      - bokeh==3.8.1
159      - build==1.3.0
160      - cachey==0.2.1
161      - certifi==2025.11.12
162      - charset-normalizer==3.4.4
163      - click==8.3.1
164      - cloudpickle==3.1.2
165      - comm==0.2.3
166      - composition-stats==2.0.0
167      - dask==2025.11.0
168      - debugpy==1.8.17
169      - decorator==5.2.1
170      - distributed==2025.11.0
171      - docstring-parser==0.17.0
172      - docutils==0.21.2
173      - executing==2.2.1
174      - fasteners==0.20
175      - fbpca==1.0
176      - flexcache==0.3
177      - flexparser==0.4
178      - formulaic==1.2.1
179      - freetype-py==2.5.1
180      - frozenlist==1.8.0
181      - fsspec==2025.10.0
182      - geosketch==1.3
183      - hdbscan==0.8.40
184      - heapdict==1.0.1
185      - hsluv==5.0.4
186      - idna==3.11
187      - imageio==2.37.2
188      - imagesize==1.4.1
189      - importlib-metadata==8.7.0
190      - in-n-out==0.2.1
191      - interface-meta==1.3.0
192      - intervaltree==3.1.0
193      - ipykernel==6.31.0
194      - ipython==8.37.0
195      - ipython-pygments-lexers==1.1.1
196      - ipywidgets==8.1.8
197      - jedi==0.19.2
198      - jinja2==3.1.6
199      - jsonschema==4.25.1
200      - jsonschema-specifications==2025.9.1
201      - jupyter-client==8.6.3
202      - jupyter-core==5.9.1
203      - jupyterlab-widgets==3.0.16
204      - lazy-loader==0.4
205      - lifelines==0.30.0
206      - lightkit==0.5.0
207      - lightning-utilities==0.15.2
208      - locket==1.0.0
209      - lz4==4.4.5
210      - magicgui==0.10.1
211      - markdown-it-py==4.0.0
212      - markupsafe==3.0.3
213      - matplotlib-inline==0.2.1
214      - mdurl==0.1.2
215      - msgpack==1.1.2
216      - multidict==6.7.0
217      - napari==0.6.6
218      - napari-console==0.1.4
219      - napari-plugin-engine==0.2.0
220      - napari-plugin-manager==0.1.8
221      - napari-svg==0.2.1
222      - narwhals==2.11.0
223      - nest-asyncio==1.6.0
224      - npe2==0.7.9
225      - numcodecs==0.13.1
226      - numpy==1.26.4
227      - numpydoc==1.9.0
228      - opencv-python-headless==4.12.0.88
229      - parso==0.8.5
230      - partd==1.4.2
231      - pathlib==1.0.1
232      - pexpect==4.9.0
233      - pint==0.24.4
234      - platformdirs==4.5.0
235      - pooch==1.8.2
236      - prompt-toolkit==3.0.52
237      - propcache==0.4.1
238      - psutil==7.1.3
239      - psygnal==0.15.0
240      - ptyprocess==0.7.0
241      - pure-eval==0.2.3
242      - pyarrow==22.0.0
243      - pycave==3.2.1
244      - pyconify==0.2.1
245      - pydantic==2.12.4
246      - pydantic-compat==0.1.2
247      - pydantic-core==2.41.5
248      - pygments==2.19.2
249      - pyopengl==3.1.10
250      - pyproject-hooks==1.2.0
251      - pyqt5==5.15.11
252      - pyqt5-qt5==5.15.18
253      - pyqt5-sip==12.17.1
254      - pytorch-lightning==1.9.5
255      - pyyaml==6.0.3
256      - pyzmq==27.1.0
257      - qtconsole==5.7.0
258      - qtpy==2.4.3
259      - referencing==0.37.0
260      - requests==2.32.5
261      - rich==14.2.0
262      - rpds-py==0.29.0
263      - scanorama==1.7.4
264      - scikit-image==0.25.2
265      - scipy==1.13.0
266      - shellingham==1.5.4
267      - snowballstemmer==3.0.1
268      - sortedcontainers==2.4.0
269      - sphinx==8.1.3
270      - sphinxcontrib-applehelp==2.0.0
271      - sphinxcontrib-devhelp==2.0.0
272      - sphinxcontrib-htmlhelp==2.1.0
273      - sphinxcontrib-jsmath==1.0.1
274      - sphinxcontrib-qthelp==2.0.0
275      - sphinxcontrib-serializinghtml==2.0.0
276      - stack-data==0.6.3
277      - superqt==0.7.6
278      - tblib==3.2.2
279      - tifffile==2025.5.10
280      - tomli==2.3.0
281      - tomli-w==1.2.0
282      - toolz==1.1.0
283      - torch==1.12.1
284      - torchmetrics==0.11.4
285      - tornado==6.5.2
286      - traitlets==5.14.3
287      - triangle==20250106
288      - typer==0.20.0
289      - typing-inspection==0.4.2
290      - tysserand==0.6.0
291      - urllib3==2.5.0
292      - vispy==0.15.2
293      - wcwidth==0.2.14
294      - widgetsnbextension==4.0.15
295      - wrapt==2.0.1
296      - xyzservices==2025.10.0
297      - yarl==1.22.0
298      - zarr==2.18.3
299      - zict==3.0.0
300      - zipp==3.23.0
301prefix: /home/haast026/miniconda3/envs/mosna-survival

or, if you prefer, you can download the Conda environment file here: