flexynesis 0.1.0__tar.gz

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.
@@ -0,0 +1,404 @@
1
+ ```txt
2
+ Attribution-NonCommercial-NoDerivatives 4.0 International
3
+
4
+ =======================================================================
5
+
6
+ Creative Commons Corporation ("Creative Commons") is not a law firm and
7
+ does not provide legal services or legal advice. Distribution of
8
+ Creative Commons public licenses does not create a lawyer-client or
9
+ other relationship. Creative Commons makes its licenses and related
10
+ information available on an "as-is" basis. Creative Commons gives no
11
+ warranties regarding its licenses, any material licensed under their
12
+ terms and conditions, or any related information. Creative Commons
13
+ disclaims all liability for damages resulting from their use to the
14
+ fullest extent possible.
15
+
16
+ Using Creative Commons Public Licenses
17
+
18
+ Creative Commons public licenses provide a standard set of terms and
19
+ conditions that creators and other rights holders may use to share
20
+ original works of authorship and other material subject to copyright
21
+ and certain other rights specified in the public license below. The
22
+ following considerations are for informational purposes only, are not
23
+ exhaustive, and do not form part of our licenses.
24
+
25
+ Considerations for licensors: Our public licenses are
26
+ intended for use by those authorized to give the public
27
+ permission to use material in ways otherwise restricted by
28
+ copyright and certain other rights. Our licenses are
29
+ irrevocable. Licensors should read and understand the terms
30
+ and conditions of the license they choose before applying it.
31
+ Licensors should also secure all rights necessary before
32
+ applying our licenses so that the public can reuse the
33
+ material as expected. Licensors should clearly mark any
34
+ material not subject to the license. This includes other CC-
35
+ licensed material, or material used under an exception or
36
+ limitation to copyright. More considerations for licensors:
37
+ wiki.creativecommons.org/Considerations_for_licensors
38
+
39
+ Considerations for the public: By using one of our public
40
+ licenses, a licensor grants the public permission to use the
41
+ licensed material under specified terms and conditions. If
42
+ the licensor's permission is not necessary for any reason--for
43
+ example, because of any applicable exception or limitation to
44
+ copyright--then that use is not regulated by the license. Our
45
+ licenses grant only permissions under copyright and certain
46
+ other rights that a licensor has authority to grant. Use of
47
+ the licensed material may still be restricted for other
48
+ reasons, including because others have copyright or other
49
+ rights in the material. A licensor may make special requests,
50
+ such as asking that all changes be marked or described.
51
+ Although not required by our licenses, you are encouraged to
52
+ respect those requests where reasonable. More considerations
53
+ for the public:
54
+ wiki.creativecommons.org/Considerations_for_licensees
55
+
56
+ =======================================================================
57
+
58
+ Creative Commons Attribution-NonCommercial-NoDerivatives 4.0
59
+ International Public License
60
+
61
+ By exercising the Licensed Rights (defined below), You accept and agree
62
+ to be bound by the terms and conditions of this Creative Commons
63
+ Attribution-NonCommercial-NoDerivatives 4.0 International Public
64
+ License ("Public License"). To the extent this Public License may be
65
+ interpreted as a contract, You are granted the Licensed Rights in
66
+ consideration of Your acceptance of these terms and conditions, and the
67
+ Licensor grants You such rights in consideration of benefits the
68
+ Licensor receives from making the Licensed Material available under
69
+ these terms and conditions.
70
+
71
+
72
+ Section 1 -- Definitions.
73
+
74
+ a. Adapted Material means material subject to Copyright and Similar
75
+ Rights that is derived from or based upon the Licensed Material
76
+ and in which the Licensed Material is translated, altered,
77
+ arranged, transformed, or otherwise modified in a manner requiring
78
+ permission under the Copyright and Similar Rights held by the
79
+ Licensor. For purposes of this Public License, where the Licensed
80
+ Material is a musical work, performance, or sound recording,
81
+ Adapted Material is always produced where the Licensed Material is
82
+ synched in timed relation with a moving image.
83
+
84
+ b. Copyright and Similar Rights means copyright and/or similar rights
85
+ closely related to copyright including, without limitation,
86
+ performance, broadcast, sound recording, and Sui Generis Database
87
+ Rights, without regard to how the rights are labeled or
88
+ categorized. For purposes of this Public License, the rights
89
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
90
+ Rights.
91
+
92
+ c. Effective Technological Measures means those measures that, in the
93
+ absence of proper authority, may not be circumvented under laws
94
+ fulfilling obligations under Article 11 of the WIPO Copyright
95
+ Treaty adopted on December 20, 1996, and/or similar international
96
+ agreements.
97
+
98
+ d. Exceptions and Limitations means fair use, fair dealing, and/or
99
+ any other exception or limitation to Copyright and Similar Rights
100
+ that applies to Your use of the Licensed Material.
101
+
102
+ e. Licensed Material means the artistic or literary work, database,
103
+ or other material to which the Licensor applied this Public
104
+ License.
105
+
106
+ f. Licensed Rights means the rights granted to You subject to the
107
+ terms and conditions of this Public License, which are limited to
108
+ all Copyright and Similar Rights that apply to Your use of the
109
+ Licensed Material and that the Licensor has authority to license.
110
+
111
+ g. Licensor means the individual(s) or entity(ies) granting rights
112
+ under this Public License.
113
+
114
+ h. NonCommercial means not primarily intended for or directed towards
115
+ commercial advantage or monetary compensation. For purposes of
116
+ this Public License, the exchange of the Licensed Material for
117
+ other material subject to Copyright and Similar Rights by digital
118
+ file-sharing or similar means is NonCommercial provided there is
119
+ no payment of monetary compensation in connection with the
120
+ exchange.
121
+
122
+ i. Share means to provide material to the public by any means or
123
+ process that requires permission under the Licensed Rights, such
124
+ as reproduction, public display, public performance, distribution,
125
+ dissemination, communication, or importation, and to make material
126
+ available to the public including in ways that members of the
127
+ public may access the material from a place and at a time
128
+ individually chosen by them.
129
+
130
+ j. Sui Generis Database Rights means rights other than copyright
131
+ resulting from Directive 96/9/EC of the European Parliament and of
132
+ the Council of 11 March 1996 on the legal protection of databases,
133
+ as amended and/or succeeded, as well as other essentially
134
+ equivalent rights anywhere in the world.
135
+
136
+ k. You means the individual or entity exercising the Licensed Rights
137
+ under this Public License. Your has a corresponding meaning.
138
+
139
+
140
+ Section 2 -- Scope.
141
+
142
+ a. License grant.
143
+
144
+ 1. Subject to the terms and conditions of this Public License,
145
+ the Licensor hereby grants You a worldwide, royalty-free,
146
+ non-sublicensable, non-exclusive, irrevocable license to
147
+ exercise the Licensed Rights in the Licensed Material to:
148
+
149
+ a. reproduce and Share the Licensed Material, in whole or
150
+ in part, for NonCommercial purposes only; and
151
+
152
+ b. produce and reproduce, but not Share, Adapted Material
153
+ for NonCommercial purposes only.
154
+
155
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
156
+ Exceptions and Limitations apply to Your use, this Public
157
+ License does not apply, and You do not need to comply with
158
+ its terms and conditions.
159
+
160
+ 3. Term. The term of this Public License is specified in Section
161
+ 6(a).
162
+
163
+ 4. Media and formats; technical modifications allowed. The
164
+ Licensor authorizes You to exercise the Licensed Rights in
165
+ all media and formats whether now known or hereafter created,
166
+ and to make technical modifications necessary to do so. The
167
+ Licensor waives and/or agrees not to assert any right or
168
+ authority to forbid You from making technical modifications
169
+ necessary to exercise the Licensed Rights, including
170
+ technical modifications necessary to circumvent Effective
171
+ Technological Measures. For purposes of this Public License,
172
+ simply making modifications authorized by this Section 2(a)
173
+ (4) never produces Adapted Material.
174
+
175
+ 5. Downstream recipients.
176
+
177
+ a. Offer from the Licensor -- Licensed Material. Every
178
+ recipient of the Licensed Material automatically
179
+ receives an offer from the Licensor to exercise the
180
+ Licensed Rights under the terms and conditions of this
181
+ Public License.
182
+
183
+ b. No downstream restrictions. You may not offer or impose
184
+ any additional or different terms or conditions on, or
185
+ apply any Effective Technological Measures to, the
186
+ Licensed Material if doing so restricts exercise of the
187
+ Licensed Rights by any recipient of the Licensed
188
+ Material.
189
+
190
+ 6. No endorsement. Nothing in this Public License constitutes or
191
+ may be construed as permission to assert or imply that You
192
+ are, or that Your use of the Licensed Material is, connected
193
+ with, or sponsored, endorsed, or granted official status by,
194
+ the Licensor or others designated to receive attribution as
195
+ provided in Section 3(a)(1)(A)(i).
196
+
197
+ b. Other rights.
198
+
199
+ 1. Moral rights, such as the right of integrity, are not
200
+ licensed under this Public License, nor are publicity,
201
+ privacy, and/or other similar personality rights; however, to
202
+ the extent possible, the Licensor waives and/or agrees not to
203
+ assert any such rights held by the Licensor to the limited
204
+ extent necessary to allow You to exercise the Licensed
205
+ Rights, but not otherwise.
206
+
207
+ 2. Patent and trademark rights are not licensed under this
208
+ Public License.
209
+
210
+ 3. To the extent possible, the Licensor waives any right to
211
+ collect royalties from You for the exercise of the Licensed
212
+ Rights, whether directly or through a collecting society
213
+ under any voluntary or waivable statutory or compulsory
214
+ licensing scheme. In all other cases the Licensor expressly
215
+ reserves any right to collect such royalties, including when
216
+ the Licensed Material is used other than for NonCommercial
217
+ purposes.
218
+
219
+
220
+ Section 3 -- License Conditions.
221
+
222
+ Your exercise of the Licensed Rights is expressly made subject to the
223
+ following conditions.
224
+
225
+ a. Attribution.
226
+
227
+ 1. If You Share the Licensed Material, You must:
228
+
229
+ a. retain the following if it is supplied by the Licensor
230
+ with the Licensed Material:
231
+
232
+ i. identification of the creator(s) of the Licensed
233
+ Material and any others designated to receive
234
+ attribution, in any reasonable manner requested by
235
+ the Licensor (including by pseudonym if
236
+ designated);
237
+
238
+ ii. a copyright notice;
239
+
240
+ iii. a notice that refers to this Public License;
241
+
242
+ iv. a notice that refers to the disclaimer of
243
+ warranties;
244
+
245
+ v. a URI or hyperlink to the Licensed Material to the
246
+ extent reasonably practicable;
247
+
248
+ b. indicate if You modified the Licensed Material and
249
+ retain an indication of any previous modifications; and
250
+
251
+ c. indicate the Licensed Material is licensed under this
252
+ Public License, and include the text of, or the URI or
253
+ hyperlink to, this Public License.
254
+
255
+ For the avoidance of doubt, You do not have permission under
256
+ this Public License to Share Adapted Material.
257
+
258
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
259
+ reasonable manner based on the medium, means, and context in
260
+ which You Share the Licensed Material. For example, it may be
261
+ reasonable to satisfy the conditions by providing a URI or
262
+ hyperlink to a resource that includes the required
263
+ information.
264
+
265
+ 3. If requested by the Licensor, You must remove any of the
266
+ information required by Section 3(a)(1)(A) to the extent
267
+ reasonably practicable.
268
+
269
+
270
+ Section 4 -- Sui Generis Database Rights.
271
+
272
+ Where the Licensed Rights include Sui Generis Database Rights that
273
+ apply to Your use of the Licensed Material:
274
+
275
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
276
+ to extract, reuse, reproduce, and Share all or a substantial
277
+ portion of the contents of the database for NonCommercial purposes
278
+ only and provided You do not Share Adapted Material;
279
+
280
+ b. if You include all or a substantial portion of the database
281
+ contents in a database in which You have Sui Generis Database
282
+ Rights, then the database in which You have Sui Generis Database
283
+ Rights (but not its individual contents) is Adapted Material; and
284
+
285
+ c. You must comply with the conditions in Section 3(a) if You Share
286
+ all or a substantial portion of the contents of the database.
287
+
288
+ For the avoidance of doubt, this Section 4 supplements and does not
289
+ replace Your obligations under this Public License where the Licensed
290
+ Rights include other Copyright and Similar Rights.
291
+
292
+
293
+ Section 5 -- Disclaimer of Warranties and Limitation of Liability.
294
+
295
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
296
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
297
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
298
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
299
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
300
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
301
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
302
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
303
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
304
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
305
+
306
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
307
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
308
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
309
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
310
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
311
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
312
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
313
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
314
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
315
+
316
+ c. The disclaimer of warranties and limitation of liability provided
317
+ above shall be interpreted in a manner that, to the extent
318
+ possible, most closely approximates an absolute disclaimer and
319
+ waiver of all liability.
320
+
321
+
322
+ Section 6 -- Term and Termination.
323
+
324
+ a. This Public License applies for the term of the Copyright and
325
+ Similar Rights licensed here. However, if You fail to comply with
326
+ this Public License, then Your rights under this Public License
327
+ terminate automatically.
328
+
329
+ b. Where Your right to use the Licensed Material has terminated under
330
+ Section 6(a), it reinstates:
331
+
332
+ 1. automatically as of the date the violation is cured, provided
333
+ it is cured within 30 days of Your discovery of the
334
+ violation; or
335
+
336
+ 2. upon express reinstatement by the Licensor.
337
+
338
+ For the avoidance of doubt, this Section 6(b) does not affect any
339
+ right the Licensor may have to seek remedies for Your violations
340
+ of this Public License.
341
+
342
+ c. For the avoidance of doubt, the Licensor may also offer the
343
+ Licensed Material under separate terms or conditions or stop
344
+ distributing the Licensed Material at any time; however, doing so
345
+ will not terminate this Public License.
346
+
347
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
348
+ License.
349
+
350
+
351
+ Section 7 -- Other Terms and Conditions.
352
+
353
+ a. The Licensor shall not be bound by any additional or different
354
+ terms or conditions communicated by You unless expressly agreed.
355
+
356
+ b. Any arrangements, understandings, or agreements regarding the
357
+ Licensed Material not stated herein are separate from and
358
+ independent of the terms and conditions of this Public License.
359
+
360
+
361
+ Section 8 -- Interpretation.
362
+
363
+ a. For the avoidance of doubt, this Public License does not, and
364
+ shall not be interpreted to, reduce, limit, restrict, or impose
365
+ conditions on any use of the Licensed Material that could lawfully
366
+ be made without permission under this Public License.
367
+
368
+ b. To the extent possible, if any provision of this Public License is
369
+ deemed unenforceable, it shall be automatically reformed to the
370
+ minimum extent necessary to make it enforceable. If the provision
371
+ cannot be reformed, it shall be severed from this Public License
372
+ without affecting the enforceability of the remaining terms and
373
+ conditions.
374
+
375
+ c. No term or condition of this Public License will be waived and no
376
+ failure to comply consented to unless expressly agreed to by the
377
+ Licensor.
378
+
379
+ d. Nothing in this Public License constitutes or may be interpreted
380
+ as a limitation upon, or waiver of, any privileges and immunities
381
+ that apply to the Licensor or You, including from the legal
382
+ processes of any jurisdiction or authority.
383
+
384
+ =======================================================================
385
+
386
+ Creative Commons is not a party to its public
387
+ licenses. Notwithstanding, Creative Commons may elect to apply one of
388
+ its public licenses to material it publishes and in those instances
389
+ will be considered the “Licensor.” The text of the Creative Commons
390
+ public licenses is dedicated to the public domain under the CC0 Public
391
+ Domain Dedication. Except for the limited purpose of indicating that
392
+ material is shared under a Creative Commons public license or as
393
+ otherwise permitted by the Creative Commons policies published at
394
+ creativecommons.org/policies, Creative Commons does not authorize the
395
+ use of the trademark "Creative Commons" or any other trademark or logo
396
+ of Creative Commons without its prior written consent including,
397
+ without limitation, in connection with any unauthorized modifications
398
+ to any of its public licenses or any other arrangements,
399
+ understandings, or agreements concerning use of licensed material. For
400
+ the avoidance of doubt, this paragraph does not form part of the
401
+ public licenses.
402
+
403
+ Creative Commons may be contacted at creativecommons.org.
404
+ ```
@@ -0,0 +1,286 @@
1
+ Metadata-Version: 2.1
2
+ Name: flexynesis
3
+ Version: 0.1.0
4
+ Summary: A deep-learning based multi-omics bulk sequencing
5
+ Author-email: Bora Uyar <bora.uyar@mdc-berlin.de>, Taras Savchyn <Taras.Savchyn@mdc-berlin.de>
6
+ Project-URL: homepage, https://github.com/BIMSBbioinfo/flexynesis
7
+ Classifier: Development Status :: 3 - Alpha
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: Programming Language :: Python :: 3.11
10
+ Requires-Python: <3.12,>=3.11
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENCE.md
13
+ Requires-Dist: matplotlib
14
+ Requires-Dist: numpy
15
+ Requires-Dist: pandas
16
+ Requires-Dist: lightning
17
+ Requires-Dist: pyyaml
18
+ Requires-Dist: scikit-optimize
19
+ Requires-Dist: scipy
20
+ Requires-Dist: seaborn
21
+ Requires-Dist: torch
22
+ Requires-Dist: torchvision
23
+ Requires-Dist: tqdm
24
+ Requires-Dist: umap-learn
25
+ Requires-Dist: rich
26
+ Requires-Dist: captum
27
+ Requires-Dist: ipywidgets
28
+ Requires-Dist: torch_geometric
29
+ Requires-Dist: ipykernel
30
+ Requires-Dist: lifelines
31
+ Requires-Dist: papermill
32
+ Requires-Dist: scikit-survival
33
+ Requires-Dist: python-louvain
34
+ Provides-Extra: test
35
+ Requires-Dist: pytest; extra == "test"
36
+
37
+
38
+ <p align="center">
39
+ <img alt="logo" src="https://github.com/BIMSBbioinfo/flexynesis/blob/main/img/logo.png" width="50%" height="50%">
40
+ </p>
41
+
42
+ ![tests](https://github.com/BIMSBbioinfo/flexynesis/actions/workflows/tests.yml/badge.svg)
43
+ ![benchmarks](https://github.com/BIMSBbioinfo/flexynesis/actions/workflows/benchmarks.yml/badge.svg)
44
+ ![tutorials](https://github.com/BIMSBbioinfo/flexynesis/actions/workflows/tutorials.yml/badge.svg)
45
+ ![License: CC BY-NC-ND 4.0](https://img.shields.io/badge/License-CC_BY--NC--ND_4.0-lightgrey.svg)
46
+
47
+ # flexynesis
48
+ A deep-learning based multi-omics bulk sequencing data integration suite with a focus on (pre-)clinical
49
+ endpoint prediction. The package includes multiple types of deep learning architectures such as simple
50
+ fully connected networks, supervised variational autoencoders; different options of data layer fusion,
51
+ and automates feature selection and hyperparameter optimisation. The tools are continuosly benchmarked
52
+ on publicly available datasets mostly related to the study of cancer. Some of the applications of the methods
53
+ we develop are drug response modeling in cancer patients or preclinical models (such as cell lines and
54
+ patient-derived xenografts), cancer subtype prediction, or any other clinically relevant outcome prediction
55
+ that can be formulated as a regression or classification problem.
56
+
57
+ <p align="center">
58
+ <img alt="workflow" src="https://github.com/BIMSBbioinfo/flexynesis/blob/main/img/graphical_abstract.jpg">
59
+ </p>
60
+
61
+ # Documentation
62
+
63
+ A detailed documentation of classes and functions in this repository can be found [here](https://bimsbstatic.mdc-berlin.de/akalin/buyar/flexynesis/docs/flexynesis/index.html).
64
+
65
+ # Benchmarks
66
+
67
+ For the latest benchmark results see:
68
+ https://bimsbstatic.mdc-berlin.de/akalin/buyar/flexynesis-benchmark-datasets/dashboard.html
69
+
70
+ The code for the benchmarking pipeline is at: https://github.com/BIMSBbioinfo/flexynesis-benchmarks
71
+
72
+ # Quick Start
73
+
74
+ ## Install
75
+
76
+ ```
77
+ git clone https://github.com/BIMSBbioinfo/flexynesis.git
78
+ cd flexynesis
79
+ # create an environment with python 3.11
80
+ conda create --name flexynesisenv --file spec-file.txt
81
+ # => alternatively: conda create --name flexynesisenv python==3.11
82
+ # activate environment and install dependencies
83
+ conda activate flexynesisenv
84
+ pip install -e .
85
+ ```
86
+
87
+ ## Options
88
+
89
+ For a full set of command-line options:
90
+ ```
91
+ flexynesis -h
92
+ ```
93
+
94
+ ## Test the installation
95
+
96
+ Download a dataset and test the flexynesis installation on a test run.
97
+ ```
98
+ curl -L -o dataset1.tgz \
99
+ https://bimsbstatic.mdc-berlin.de/akalin/buyar/flexynesis-benchmark-datasets/dataset1.tgz
100
+
101
+ tar -xzvf dataset1.tgz
102
+
103
+ conda activate flexynesisenv
104
+
105
+ flexynesis --data_path dataset1 \
106
+ --model_class DirectPred \
107
+ --target_variables Erlotinib \
108
+ --fusion_type early \
109
+ --hpo_iter 1 \
110
+ --features_min 50 \
111
+ --features_top_percentile 5 \
112
+ --log_transform False \
113
+ --data_types gex,cnv \
114
+ --outdir . \
115
+ --prefix erlotinib_direct \
116
+ --early_stop_patience 3 \
117
+ --use_loss_weighting False \
118
+ --evaluate_baseline_performance False
119
+ ```
120
+
121
+ ## Accelerating with GPUs
122
+
123
+ If you have access to GPUs on your system, they can be used to accelerate the training of models.
124
+ However, making GPUs accessible to `torch` is system-specific. Please contact your system administrator
125
+ to make sure you have accessible GPUs and methods to access them.
126
+
127
+ ### With Slurm
128
+
129
+ If you have [Slurm Workload Manager] in your system, you can call `flexynesis` as follows:
130
+
131
+ ```
132
+ conda activate flexynesisenv
133
+ srun --gpus=1 --pty flexynesis --use_gpu ...otherarguments
134
+ ```
135
+
136
+ ### GridEngine
137
+
138
+ If you have an HPC sytem running GridEngine with GPU nodes, you may be allowed to request a node with
139
+ GPUs. The important thing here is to request a GPU node with the proper **CUDA** version installed on it.
140
+
141
+ ```
142
+ # request 1 GPU device node with CUDA version 12
143
+ qrsh -l gpu=1,cuda12
144
+ # activate your environment
145
+ conda activate flexynesisenv
146
+ flexynesis --use_gpu ...otherarguments
147
+ ```
148
+
149
+ # Input Dataset Structure
150
+
151
+ ```txt
152
+ InputFolder/
153
+ | -- train
154
+ | |-- omics1.csv
155
+ | |-- omics2.csv
156
+ | |-- ...
157
+ | |-- clin.csv
158
+
159
+ | -- test
160
+ | |-- omics1.csv
161
+ | |-- omics2.csv
162
+ | |-- ...
163
+ | |-- clin.csv
164
+ ```
165
+
166
+ ## File contents
167
+
168
+ ### clin.csv
169
+ `clin.csv` contains the sample metadata. The first column contains unique sample identifiers.
170
+ The other columns contain sample-associated clinical variables.
171
+ `NA` values are allowed in the clinical variables.
172
+
173
+ ```csv
174
+ v1,v2
175
+ s1,a,b
176
+ s2,c,d
177
+ s3,e,f
178
+ ```
179
+
180
+ ### omics.csv
181
+ The first column of the feature tables must be unique feature identifiers (e.g. gene names).
182
+ The column names must be sample identifiers that should overlap with those in the `clin.csv`.
183
+ They don't have to be completely identical or in the same order. Samples from the `clin.csv` that are not represented
184
+ in the omics table will be dropped.
185
+
186
+ ```txt
187
+ s1,s2,s3
188
+ g1,0,1,2
189
+ g2,3,3,5
190
+ g3,2,3,4
191
+ ```
192
+
193
+ ### Concordance between train/test splits
194
+ The corresponding omics files in train/test splits must contain overlapping feature names (they don't
195
+ have to be identical or in the same order).
196
+ The `clin.csv` files in train/test must contain matching clinical variables.
197
+
198
+ # Guix
199
+
200
+ You can also create a reproducible development environment or build a reproducible package of Flexynesis with [GNU Guix](https://guix.gnu.org). You will need at least the Guix channels listed in `channels.scm`. It also helps to have authorized the Inria substitute server to get binaries for CUDA-enabled packages. See [this page](https://hpc.guix.info/channels/non-free/) for instructions on how to configure fetching binary substitutes from the build servers.
201
+
202
+ You can build a Guix package from the current committed state of your git checkout and using the specified state of Guix like this:
203
+
204
+ ```sh
205
+ guix time-machine -C channels.scm -- \
206
+ build --no-grafts -f guix.scm
207
+ ```
208
+
209
+ To enter an environment containing just Flexynesis:
210
+
211
+ ```sh
212
+ guix time-machine -C channels.scm -- \
213
+ shell --no-grafts -f guix.scm
214
+ ```
215
+
216
+ To enter a development environment to hack on Flexynesis:
217
+
218
+ ```sh
219
+ guix time-machine -C channels.scm -- \
220
+ shell --no-grafts -Df guix.scm
221
+ ```
222
+
223
+ Do this to build a Docker image containing this package together with a matching Python installation:
224
+
225
+ ```sh
226
+ guix time-machine -C channels.scm -- \
227
+ pack -C none \
228
+ -e '(load "guix.scm")' \
229
+ -f docker \
230
+ -S /bin=bin -S /lib=lib -S /share=share \
231
+ glibc-locales coreutils bash python
232
+ ```
233
+
234
+ # Defining Kernel for Jupyter Notebook
235
+
236
+ For interactively using flexynesis on Jupyter notebooks, one can define the kernel to make
237
+ flexynesis and its dependencies available on the jupyter session.
238
+
239
+ Assuming you have already defined an environment and installed the package:
240
+ ```
241
+ conda activate flexynesisenv
242
+ python -m ipykernel install --user --name "flexynesisenv" --display-name "flexynesisenv"
243
+ ```
244
+
245
+ # Compiling Notebooks
246
+
247
+ `papermill` can be used to compile the tutorials under `examples/tutorials`.
248
+
249
+ If the purpose is to quickly check if the notebook can be run; set HPO_ITER to 1.
250
+ This sets hyperparameter optimisation steps to 1.
251
+ For longer training runs to see more meaningful results from the notebook, increase this number to e.g. 50.
252
+
253
+ Example:
254
+
255
+ ```
256
+ papermill examples/tutorials/brca_subtypes.ipynb brca_subtypes.ipynb -p HPO_ITER 1
257
+ ```
258
+
259
+ The output from papermill can be converted to an html file as follows:
260
+
261
+ ```
262
+ jupyter nbconvert --to html brca_subtypes.ipynb
263
+ ```
264
+
265
+
266
+ # Testing
267
+
268
+ Run unit tests
269
+ ```python
270
+ pytest -vvv tests/unit
271
+ ```
272
+
273
+ This will run all the unit tests in the tests directory.
274
+
275
+ # Contributing
276
+ If you would like to contribute to the project, please open an issue or a pull request on the GitHub repository.
277
+
278
+
279
+ # Documentation
280
+
281
+ ```
282
+ pdoc --html --output-dir docs --force flexynesis
283
+ ```
284
+
285
+
286
+