draft-grn 0.1.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.
Files changed (100) hide show
  1. draft_grn-0.1.0.dist-info/METADATA +127 -0
  2. draft_grn-0.1.0.dist-info/RECORD +100 -0
  3. draft_grn-0.1.0.dist-info/WHEEL +5 -0
  4. draft_grn-0.1.0.dist-info/entry_points.txt +4 -0
  5. draft_grn-0.1.0.dist-info/licenses/LICENSE +21 -0
  6. draft_grn-0.1.0.dist-info/top_level.txt +2 -0
  7. draft_paired/R/check_simulator.R +140 -0
  8. draft_paired/R/positive_kinetics.R +44 -0
  9. draft_paired/R/prior_trial_context.R +24 -0
  10. draft_paired/R/simulate_prior.R +197 -0
  11. draft_paired/__init__.py +3 -0
  12. draft_paired/analysis/__init__.py +43 -0
  13. draft_paired/analysis/ccc.py +1567 -0
  14. draft_paired/analysis/ccc_alignment.py +235 -0
  15. draft_paired/analysis/ccc_config.py +95 -0
  16. draft_paired/analysis/ccc_networks.py +209 -0
  17. draft_paired/analysis/ccc_timing.py +1030 -0
  18. draft_paired/analysis/consensus.py +384 -0
  19. draft_paired/analysis/continuous_activity.py +443 -0
  20. draft_paired/analysis/edge_cluster.py +546 -0
  21. draft_paired/analysis/gene_keys.py +122 -0
  22. draft_paired/analysis/network.py +1353 -0
  23. draft_paired/analysis/repro.py +513 -0
  24. draft_paired/analysis/single_tf.py +897 -0
  25. draft_paired/analysis/topic.py +662 -0
  26. draft_paired/ccc_inputs.py +129 -0
  27. draft_paired/ccc_workflow.py +20 -0
  28. draft_paired/checkpoint.py +35 -0
  29. draft_paired/cli.py +338 -0
  30. draft_paired/cli_options.py +202 -0
  31. draft_paired/config_init.py +136 -0
  32. draft_paired/config_profiles.py +38 -0
  33. draft_paired/directory_inputs.py +249 -0
  34. draft_paired/examples/simulation_9plus3/inputs_101.npz +0 -0
  35. draft_paired/examples/simulation_9plus3/inputs_102.npz +0 -0
  36. draft_paired/examples/simulation_9plus3/inputs_103.npz +0 -0
  37. draft_paired/examples/simulation_9plus3/manifest.json +120 -0
  38. draft_paired/examples/simulation_9plus3/prior.tsv +1801 -0
  39. draft_paired/examples/simulation_9plus3/prior_provenance.json +6 -0
  40. draft_paired/examples/simulation_9plus3/truth_101.npz +0 -0
  41. draft_paired/examples/simulation_9plus3/truth_102.npz +0 -0
  42. draft_paired/examples/simulation_9plus3/truth_103.npz +0 -0
  43. draft_paired/graph_builder.py +293 -0
  44. draft_paired/graph_input.py +143 -0
  45. draft_paired/infer.py +286 -0
  46. draft_paired/input_schema.py +143 -0
  47. draft_paired/io.py +101 -0
  48. draft_paired/lineage.py +152 -0
  49. draft_paired/models/__init__.py +23 -0
  50. draft_paired/models/gnn.py +267 -0
  51. draft_paired/pipeline.py +85 -0
  52. draft_paired/preprocess.py +336 -0
  53. draft_paired/prior_preparation.py +765 -0
  54. draft_paired/prior_resources.py +215 -0
  55. draft_paired/reproduce.py +394 -0
  56. draft_paired/simulation.py +563 -0
  57. draft_paired/simulation_generate.py +646 -0
  58. draft_paired/simulation_training.py +196 -0
  59. draft_paired/templates/draft_ccc_template.yaml +39 -0
  60. draft_paired/templates/draft_example_fly_ccc.yaml +77 -0
  61. draft_paired/templates/draft_example_fly_germ.yaml +125 -0
  62. draft_paired/templates/draft_example_fly_soma.yaml +125 -0
  63. draft_paired/templates/draft_example_mouse_development.yaml +129 -0
  64. draft_paired/templates/draft_example_mouse_motifs.yaml +141 -0
  65. draft_paired/templates/draft_lineage_template.yaml +122 -0
  66. draft_paired/templates/draft_simulation_prior_template.yaml +44 -0
  67. draft_paired/templates/draft_simulation_template.yaml +29 -0
  68. draft_paired/templates/method_profiles.yaml +29 -0
  69. draft_paired/train.py +1027 -0
  70. draft_paired/tutorial_data.py +240 -0
  71. draft_paired/utils.py +141 -0
  72. draft_paired/workflow.py +167 -0
  73. draft_paired/workflow_cli.py +282 -0
  74. draft_unpaired/__init__.py +3 -0
  75. draft_unpaired/analysis/__init__.py +3 -0
  76. draft_unpaired/analysis/continuous_activity.py +8 -0
  77. draft_unpaired/analysis/edge_cluster.py +71 -0
  78. draft_unpaired/analysis/network.py +743 -0
  79. draft_unpaired/analysis/repro.py +23 -0
  80. draft_unpaired/analysis/single_tf.py +431 -0
  81. draft_unpaired/analysis/topic.py +77 -0
  82. draft_unpaired/checkpoint.py +13 -0
  83. draft_unpaired/cli.py +200 -0
  84. draft_unpaired/config_init.py +81 -0
  85. draft_unpaired/graph_builder.py +220 -0
  86. draft_unpaired/infer.py +128 -0
  87. draft_unpaired/io.py +101 -0
  88. draft_unpaired/lineage.py +5 -0
  89. draft_unpaired/models/__init__.py +5 -0
  90. draft_unpaired/models/gnn.py +187 -0
  91. draft_unpaired/pipeline.py +88 -0
  92. draft_unpaired/preprocess.py +319 -0
  93. draft_unpaired/prior.py +301 -0
  94. draft_unpaired/reproduce.py +152 -0
  95. draft_unpaired/scmtni_prior.py +482 -0
  96. draft_unpaired/templates/draft_motif_template.yaml +136 -0
  97. draft_unpaired/templates/draft_staged_prior_template.yaml +123 -0
  98. draft_unpaired/templates/draft_unpaired_template.yaml +128 -0
  99. draft_unpaired/train.py +568 -0
  100. draft_unpaired/utils.py +19 -0
@@ -0,0 +1,127 @@
1
+ Metadata-Version: 2.4
2
+ Name: draft-grn
3
+ Version: 0.1.0
4
+ Summary: Dynamic gene regulatory networks from paired or unpaired single-cell RNA and ATAC data along lineage trees.
5
+ Author-email: Zehua Zhang <zehua.zhang@cos.uni-heidelberg.de>
6
+ Maintainer-email: Zehua Zhang <zehua.zhang@cos.uni-heidelberg.de>
7
+ License: MIT
8
+ Project-URL: Homepage, https://github.com/velten-group/DRAFT
9
+ Project-URL: Repository, https://github.com/velten-group/DRAFT
10
+ Project-URL: Issues, https://github.com/velten-group/DRAFT/issues
11
+ Project-URL: Documentation, https://github.com/velten-group/DRAFT#readme
12
+ Keywords: single-cell,graph-neural-network,dynamic-gene-regulatory-network,multiomics,trajectory
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
22
+ Requires-Python: >=3.10
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: pyyaml>=6.0
26
+ Provides-Extra: paired
27
+ Requires-Dist: numpy>=1.24; extra == "paired"
28
+ Requires-Dist: pandas>=2.0; extra == "paired"
29
+ Requires-Dist: torch>=2.1; extra == "paired"
30
+ Requires-Dist: torch-geometric>=2.5; extra == "paired"
31
+ Requires-Dist: anndata>=0.10; extra == "paired"
32
+ Requires-Dist: scipy>=1.11; extra == "paired"
33
+ Requires-Dist: matplotlib>=3.8; extra == "paired"
34
+ Requires-Dist: scikit-learn>=1.4; extra == "paired"
35
+ Requires-Dist: networkx>=3.2; extra == "paired"
36
+ Provides-Extra: unpaired
37
+ Requires-Dist: numpy>=1.24; extra == "unpaired"
38
+ Requires-Dist: pandas>=2.0; extra == "unpaired"
39
+ Requires-Dist: torch>=2.1; extra == "unpaired"
40
+ Requires-Dist: torch-geometric>=2.5; extra == "unpaired"
41
+ Requires-Dist: anndata>=0.10; extra == "unpaired"
42
+ Requires-Dist: scipy>=1.11; extra == "unpaired"
43
+ Requires-Dist: matplotlib>=3.8; extra == "unpaired"
44
+ Requires-Dist: scikit-learn>=1.4; extra == "unpaired"
45
+ Requires-Dist: networkx>=3.2; extra == "unpaired"
46
+ Provides-Extra: full
47
+ Requires-Dist: pybigtools<0.4,>=0.3.0; extra == "full"
48
+ Requires-Dist: numpy>=1.24; extra == "full"
49
+ Requires-Dist: pandas>=2.0; extra == "full"
50
+ Requires-Dist: torch>=2.1; extra == "full"
51
+ Requires-Dist: torch-geometric>=2.5; extra == "full"
52
+ Requires-Dist: anndata>=0.10; extra == "full"
53
+ Requires-Dist: scipy>=1.11; extra == "full"
54
+ Requires-Dist: matplotlib>=3.8; extra == "full"
55
+ Requires-Dist: scikit-learn>=1.4; extra == "full"
56
+ Requires-Dist: networkx>=3.2; extra == "full"
57
+ Provides-Extra: prior
58
+ Requires-Dist: numpy>=1.24; extra == "prior"
59
+ Requires-Dist: pandas>=2.0; extra == "prior"
60
+ Requires-Dist: anndata>=0.10; extra == "prior"
61
+ Requires-Dist: scipy>=1.11; extra == "prior"
62
+ Requires-Dist: pybigtools<0.4,>=0.3.0; extra == "prior"
63
+ Provides-Extra: dev
64
+ Requires-Dist: build>=1.2; extra == "dev"
65
+ Requires-Dist: pytest>=8.0; extra == "dev"
66
+ Requires-Dist: ruff>=0.6; extra == "dev"
67
+ Requires-Dist: twine>=5.1; extra == "dev"
68
+ Requires-Dist: nbformat>=5.10; extra == "dev"
69
+ Requires-Dist: nbclient>=0.10; extra == "dev"
70
+ Requires-Dist: ipykernel>=6.29; extra == "dev"
71
+ Provides-Extra: tutorial
72
+ Requires-Dist: nbformat>=5.10; extra == "tutorial"
73
+ Requires-Dist: nbclient>=0.10; extra == "tutorial"
74
+ Requires-Dist: ipykernel>=6.29; extra == "tutorial"
75
+ Provides-Extra: release
76
+ Requires-Dist: build>=1.2; extra == "release"
77
+ Requires-Dist: twine>=5.1; extra == "release"
78
+ Provides-Extra: enrich
79
+ Requires-Dist: gseapy>=1.1; extra == "enrich"
80
+ Dynamic: license-file
81
+
82
+ # DRAFT
83
+
84
+ DRAFT infers dynamic gene regulatory networks from paired or unpaired
85
+ single-cell RNA and ATAC data along a lineage tree, and compares two lineages
86
+ by developmental alignment (DTW) and cell-cell communication (CCC).
87
+
88
+ > **Status:** early release; commands and options may still change.
89
+
90
+ ## Installation
91
+
92
+ Python 3.10 or newer:
93
+
94
+ ```bash
95
+ pip install "draft-grn[full]"
96
+ draft simulation # quick start on bundled simulated data; results in result/simulation/
97
+ ```
98
+
99
+ Optional extras: `[enrich]` adds GO enrichment of regulatory topics, `[tutorial]`
100
+ runs the interactive example. The tutorial's example inputs (`data/`) and the
101
+ manuscript reproduction script are in the GitHub repository; to use them, install
102
+ from a clone:
103
+
104
+ ```bash
105
+ git clone https://github.com/velten-group/DRAFT.git
106
+ cd DRAFT
107
+ pip install -e ".[full]"
108
+ ```
109
+
110
+ ## Documentation
111
+
112
+ - [README](https://github.com/velten-group/DRAFT#readme): tutorial on example
113
+ data (preprocess, train, networks, regulons, two-lineage comparison) and
114
+ [manuscript reproduction](https://github.com/velten-group/DRAFT#reproducing-the-manuscript)
115
+ - [Input guide](https://github.com/velten-group/DRAFT/blob/main/docs/input_formats.md)
116
+ - [Downstream analyses](https://github.com/velten-group/DRAFT/blob/main/docs/downstream.md)
117
+ - Manuscript analyses and figures: [DRAFT-analysis](https://github.com/velten-group/DRAFT-analysis)
118
+
119
+ ## Citation
120
+
121
+ Zhang Z, Santhi Sekhar P, van Nierop y Sanchez P, Lohmann I, Velten B. DRAFT: graph-recurrent learning of
122
+ dynamic gene regulatory networks along single-cell multi-omics trajectories. bioRxiv (2026).
123
+ [doi:10.64898/2026.11.17.767145](https://doi.org/10.64898/2026.11.17.767145)
124
+
125
+ ## License and contact
126
+
127
+ MIT. Questions and bug reports: [GitHub issues](https://github.com/velten-group/DRAFT/issues).
@@ -0,0 +1,100 @@
1
+ draft_grn-0.1.0.dist-info/licenses/LICENSE,sha256=XOKhLARnKiLD6tplgUsFIygQaJ3Y6oOGhVkAcCVhubc,1090
2
+ draft_paired/__init__.py,sha256=Fjp57igUfdNT9v9RHK9_o-DlXxLS-9H9u1wVnpb-UxU,75
3
+ draft_paired/ccc_inputs.py,sha256=y_v3bzz75rDJaiOjMD4zqvRfD1whU_8lAnUAyBHbouk,4988
4
+ draft_paired/ccc_workflow.py,sha256=YXdm8JBcON_l5yIrjnB9yoQw3sOzOBShRjUXAw6gkQo,696
5
+ draft_paired/checkpoint.py,sha256=1JT-6aAlRq2H4dXRm4fgsmac-DafAitHS-QdJYYcMJs,1163
6
+ draft_paired/cli.py,sha256=tacwEurPx1NGkb0H_B5loPfoWJusPSItIM9P97LWy_I,12904
7
+ draft_paired/cli_options.py,sha256=lscg0JSo15XUmgaJqq1SFu3vO_zdeFFXRxIT1Gxe16Q,7744
8
+ draft_paired/config_init.py,sha256=778M3Y87kqPDCXzxirHlzAkGCmDBvOyq6XqQ7LOPMBc,4709
9
+ draft_paired/config_profiles.py,sha256=7MZUy8pFcwIF5eB2Mso1_ZnaPSp9JxWU43mb8S6jpI8,1242
10
+ draft_paired/directory_inputs.py,sha256=cVpLQOjunYShskJMA9nbZkV-v9UR7bK-8csFlq7yU0k,9811
11
+ draft_paired/graph_builder.py,sha256=mtAE-yAq49d7Qq3LT78U-BoFIXlSiAB7JMr5vqoP_DM,13382
12
+ draft_paired/graph_input.py,sha256=wsaAKnmMtm78hOviPRdELR4I_DkorDsT_egeoxLqWyo,5757
13
+ draft_paired/infer.py,sha256=rHBoHEVyFG7W6_m25JE2PCLv4Qy4Scer681IT8O5Nx4,11250
14
+ draft_paired/input_schema.py,sha256=9qkGkq8E-mKmbFZPSKoeOoqw7u8XojO7kOcaoy9JNMg,5254
15
+ draft_paired/io.py,sha256=I_JNA5YuEliILjSFaMhW0LNivvZVKEt5iBzEOktL6QY,3461
16
+ draft_paired/lineage.py,sha256=343REH195nasZMcT5ARR0WxENwW0x5fxvWMgd3892sc,6450
17
+ draft_paired/pipeline.py,sha256=LxUHPqivL7BFUGThyNnmjnvICotMb6zhx-5OwuBhjK0,3172
18
+ draft_paired/preprocess.py,sha256=l0qoqyJXv89ec0f4Xtp4LavvL0hMrWXMCZUbfS3Uqn0,14433
19
+ draft_paired/prior_preparation.py,sha256=1VB7nn_yiHqyP_WHLSqNEaAjli5Hkouv4LdjCnU-9y0,31931
20
+ draft_paired/prior_resources.py,sha256=FcUcc-0OhA6ubbsfZ8oblisPnKZrrQflwz7tcrSCaLU,8228
21
+ draft_paired/reproduce.py,sha256=LPgqbD6Ut7EzszlbzBaM9EnyYx1oLhPaLNWODxjbzXE,15003
22
+ draft_paired/simulation.py,sha256=AS0R3k4sBbNVhM0bUXJgSePuN2nzn-bTGBv14lV4AB0,22368
23
+ draft_paired/simulation_generate.py,sha256=7Hr1Be7lLM1v0KJP0dapmjdTw3S6QSTLCHnTUOOmafU,26750
24
+ draft_paired/simulation_training.py,sha256=XY4Ku2w37StoZ-hL3tpcOVtgDZhZ2IkRG9DA9D6SQRY,7194
25
+ draft_paired/train.py,sha256=5XVMBbABTSgiFULUjtJG4daHjkb9J4jBTHro_grtuGM,40405
26
+ draft_paired/tutorial_data.py,sha256=m_78qFKR85qPWQUpUI4eyOV336sPaFGizR2hcb5ZWdY,9229
27
+ draft_paired/utils.py,sha256=ytZCth0valSG2P1cYStbpSioK9tHi8sfRjrmiFL-Vzg,4683
28
+ draft_paired/workflow.py,sha256=G7xQBTdg5eDVTkylhlEVhcSiNbmA4UR8hVCFJBqO9Wk,6685
29
+ draft_paired/workflow_cli.py,sha256=EQ7M9S_o_jnuoNWQp7wxnQEeK_725-Z3u-oH0pXpcOs,11499
30
+ draft_paired/R/check_simulator.R,sha256=-SEX6J2jDwF-ust1TRIrilAuYXU7IT01rAcinL07P7c,11539
31
+ draft_paired/R/positive_kinetics.R,sha256=zOJFgZ7LQvuZTDKIyRLU9xKzsgHFQkqmTQwHuBZBv7k,2081
32
+ draft_paired/R/prior_trial_context.R,sha256=NLmZ_u3yuoiYbqPmR8TNQ3RnCeDG2Z8fmvwtiDSAVhM,1251
33
+ draft_paired/R/simulate_prior.R,sha256=d5dU3VpIu8F-WjtkQOkcLgCKCs45NDTunz6AnzC35f8,11332
34
+ draft_paired/analysis/__init__.py,sha256=IjEKdXa7mgBUItuyiVVcXIg7XEzEi8VxYj2oRFcnGKc,1854
35
+ draft_paired/analysis/ccc.py,sha256=8BFo9HbLkGwiyOHchBuQ-thgu-8I1H_C2DUiR5bs0LE,65416
36
+ draft_paired/analysis/ccc_alignment.py,sha256=ZWqAoJfIhnrxJsXAL1qaNq-eXKduZIvyLB5zr-tbKVc,9483
37
+ draft_paired/analysis/ccc_config.py,sha256=-lXFLJVof83ds_lSZdUvAPkANHvmZL2Bdox5RlWRSso,4028
38
+ draft_paired/analysis/ccc_networks.py,sha256=Z09XkqICkNQljjb8sxzYMXat3nQd_kHn2pnXP00yeVI,7675
39
+ draft_paired/analysis/ccc_timing.py,sha256=XmVIx_VzZZhMq1I-zfuNI8mgcndhA-Fk7dgSOcXwZyw,43540
40
+ draft_paired/analysis/consensus.py,sha256=Vr4ZnxDxqX4PGDtFxxSnwp3AF32Lm8DJNzSP11YvAj4,15264
41
+ draft_paired/analysis/continuous_activity.py,sha256=E2QgMkNSvCBYpg3RbBQ5pieQFVVuwC3SZklHJa9rACo,18335
42
+ draft_paired/analysis/edge_cluster.py,sha256=fw6eIN8ccDv_6pbSwd13OJi2-efPune8tHib8bQx6Ws,22937
43
+ draft_paired/analysis/gene_keys.py,sha256=OCgqGKDW2rG8nEu4LVPUGa-XNjNFrlKQ8zdY0yPjtcg,4776
44
+ draft_paired/analysis/network.py,sha256=5Xidf4NKJCRDtFJ5N1Uzea_e1HgQpZTvJSQ2TMkFJhU,56066
45
+ draft_paired/analysis/repro.py,sha256=Yek53JD82VrmGSeE0b0xgXK86yRbpJz774BAmKlZjSc,19302
46
+ draft_paired/analysis/single_tf.py,sha256=LJ5ErTA0J5ZdYinhG3hHgnL8yywGyGuTRNZrQtl5kSA,36245
47
+ draft_paired/analysis/topic.py,sha256=7HazOMUfuKqpeIey9uy6BxDisxbC05_6wCjlGsGYHvE,28063
48
+ draft_paired/examples/simulation_9plus3/inputs_101.npz,sha256=qYh27y2T8WiNcti9LXZM6GS3iBTqKqrcgyWVOBw8k-k,849404
49
+ draft_paired/examples/simulation_9plus3/inputs_102.npz,sha256=xXoz-0okcgTSXULjRIhqpZ_SZqBe5Tsm1dZlHkPhmQ4,823722
50
+ draft_paired/examples/simulation_9plus3/inputs_103.npz,sha256=B8ajENtwXqzjb3z-dVQAxPsb63bqbKCionOxOWKH3P8,841067
51
+ draft_paired/examples/simulation_9plus3/manifest.json,sha256=Cq1L9KGUidx0_NEDoaHEuS2f5EVA8kbw8u9RQ6lMW90,3537
52
+ draft_paired/examples/simulation_9plus3/prior.tsv,sha256=9V8DTNJWFaEPnZ8M72A48s6wShemHEbPfkEK14C9Prw,13493
53
+ draft_paired/examples/simulation_9plus3/prior_provenance.json,sha256=ZkmOoZJyXa1Nchtpaym_ISEe467Zw9ZkSV-lvRjKTtA,206
54
+ draft_paired/examples/simulation_9plus3/truth_101.npz,sha256=L4dOJVgwDju-7ZQPn8rgcXnXpveFINdHffRcaqA9fOI,4429
55
+ draft_paired/examples/simulation_9plus3/truth_102.npz,sha256=uTKG6_VtKg6eraDmMfiv6Xbmbu0SzKMiGq2Jj9p1V9Y,4461
56
+ draft_paired/examples/simulation_9plus3/truth_103.npz,sha256=hHxQr8jO1AW3uEkphr_dcLnNF8ewc2uuOhlMJz5FB6s,4499
57
+ draft_paired/models/__init__.py,sha256=kzPmDEqV1MsT3013spQ5rvt-yQXwJy7H8xagqmvzRDw,534
58
+ draft_paired/models/gnn.py,sha256=GELhK5l43VHpoFybfyRQy36LhtXqHTJfBdlAKbXywJk,10237
59
+ draft_paired/templates/draft_ccc_template.yaml,sha256=rG1w1jj6LFMq5h5IoPODlE9PKhqWRleq_mBWgWfwcUA,1105
60
+ draft_paired/templates/draft_example_fly_ccc.yaml,sha256=JswcqegirQU9e-wLR72a8avIkbV3AvRnDcE2nuX3cRs,1878
61
+ draft_paired/templates/draft_example_fly_germ.yaml,sha256=9IeXpBz_ApN6EtaEPsMmHBlTzvPGu8zzeC7BySLRdcU,2987
62
+ draft_paired/templates/draft_example_fly_soma.yaml,sha256=HPub3x-k6cse6n7DBlLZSdnKNDxCBgiHvL4N9S0BbaA,2992
63
+ draft_paired/templates/draft_example_mouse_development.yaml,sha256=W0L2fexdKuZZ3sXBisDi40CysuSik4gjicOzBnZmGWA,3296
64
+ draft_paired/templates/draft_example_mouse_motifs.yaml,sha256=qUV91taE-Vud_1OAH5b8cQxAPsLxSy41AqH-dEjFc1I,3812
65
+ draft_paired/templates/draft_lineage_template.yaml,sha256=hNA3WbtEHlPSw2W6UpKyctW_2r-b0dbSAzUO55PokWQ,3147
66
+ draft_paired/templates/draft_simulation_prior_template.yaml,sha256=gyrt1uKnAlm1s2Y0M23_Pking-IFQ3paBV_0vZwsagM,1210
67
+ draft_paired/templates/draft_simulation_template.yaml,sha256=FYDbQIJOkstpl7OGKlO01fyMoJrgI5VCdoWcP45P4q8,713
68
+ draft_paired/templates/method_profiles.yaml,sha256=r0sCN2pLO4XLxclI22SQYpe_goUDkNXGfdXLh-LVDx0,694
69
+ draft_unpaired/__init__.py,sha256=xG0BQDNHPGkpgWBfz9XMdTIURbzwV6r4OSKG0P_8KWk,77
70
+ draft_unpaired/checkpoint.py,sha256=glbCIMPcgkw8EgfYtbk6QCSPHLjdzp-xAP2Paw6byxk,288
71
+ draft_unpaired/cli.py,sha256=kyxptr_DdiLkukOF1BzFm4wGzx85IiBm8iKuhmtCqd0,8827
72
+ draft_unpaired/config_init.py,sha256=CxOVo_SqIPaH5MGHEtQe43mMJw3EzBdmPCExASLFYIo,2481
73
+ draft_unpaired/graph_builder.py,sha256=GCwcuycfS_mOF5e2BJpVAukU3jqZzerTmfJOzCnp14I,9258
74
+ draft_unpaired/infer.py,sha256=j0oVRG2S1AOONBquU7DSldSvO8Ci6CR92nlPR4caPao,4781
75
+ draft_unpaired/io.py,sha256=fqwqbULp8k855BuvE7VJcF94DABYgVbNQHcnC1gkbn0,3560
76
+ draft_unpaired/lineage.py,sha256=2U5lOpLNP-rjcy72vB7IOvgYtaLMeC2C3AtuQsYqd3w,139
77
+ draft_unpaired/pipeline.py,sha256=nls3v1zc_qvCiy6U0hafLJJUbjlVs01PwYl6pFqhGjQ,3397
78
+ draft_unpaired/preprocess.py,sha256=k4n1Hngu7IBly2Ujk7uK9SVk8t0W3dJ1EHmKCwqeHBg,12418
79
+ draft_unpaired/prior.py,sha256=Fhyiio9n7twReyzkAefDJoKR9WX2jhqDfYrH0n4tjcI,12601
80
+ draft_unpaired/reproduce.py,sha256=qXf3-pjAM42XzlG50Lpv5Y70G20cZWksEJ2hETyMQhE,5770
81
+ draft_unpaired/scmtni_prior.py,sha256=9yfAa2_I4Kan8I5KUzbGILqTsYpIIQymWCKzfzqq8Ec,20333
82
+ draft_unpaired/train.py,sha256=JhZxPrVMW41wnmm5JsomL1Q_BujdmOyjfcYUduWQVBU,22740
83
+ draft_unpaired/utils.py,sha256=HRppGb7wG2QlDU_EZyfJkRGRCAqmYAEOOUG9bWQnH-U,377
84
+ draft_unpaired/analysis/__init__.py,sha256=C07DFTwyaoZAOXjUCYRW1elW1trCjcfzyqtiToDfsNI,82
85
+ draft_unpaired/analysis/continuous_activity.py,sha256=dfOI7OJehGIzEsBDkGVWVI35dwOeqEOYa2QbfGK7CvA,283
86
+ draft_unpaired/analysis/edge_cluster.py,sha256=VOnjZG6MLYcCaIaitEItboFxoiATWUICqJdipkk3mRA,2295
87
+ draft_unpaired/analysis/network.py,sha256=zgypm2F-UbNjj7DaFMctaShnGD7vJ0iflgY-NtF4OvE,32097
88
+ draft_unpaired/analysis/repro.py,sha256=khHYOgX4wiILoKco3GWEpfyGiLvbcSB2Q_bU4tNQc1M,582
89
+ draft_unpaired/analysis/single_tf.py,sha256=8SFMShNX1sMyz7hb_M_04YhlB_OzHIjqPT1nvYXKb7Y,17080
90
+ draft_unpaired/analysis/topic.py,sha256=ZSyvnNhAAzreENKmYBbeOXSfeJzKiGPV9yZNbU1tsS0,2543
91
+ draft_unpaired/models/__init__.py,sha256=cMIca1pqaWio1EXQdZpDJTZb4Ix1qFz2vluE9I6pNd0,172
92
+ draft_unpaired/models/gnn.py,sha256=jAAnG1W0F-RUu9nsmSlS5ceSEk4YdrOETwGZEtl0U_Y,6761
93
+ draft_unpaired/templates/draft_motif_template.yaml,sha256=1W8_JUqlzEAViSBaL0I1pCrQ06sNu97SeTSFYvlg0c8,3692
94
+ draft_unpaired/templates/draft_staged_prior_template.yaml,sha256=RQXuPA5kpdmBa-VpQ8cMrJ9rLtyjMYLX0XYkV26VIuE,3149
95
+ draft_unpaired/templates/draft_unpaired_template.yaml,sha256=DGBfQBTOUFoJSR8jyNKek0KR5Kx3bVq1TsMrYUa3Yas,3434
96
+ draft_grn-0.1.0.dist-info/METADATA,sha256=bdpLn8fvAyw1V3YkGt62vH4PyltBEErG3f1prk_Rf_M,5554
97
+ draft_grn-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
98
+ draft_grn-0.1.0.dist-info/entry_points.txt,sha256=QL_ng1MrA7Ick30EMXAnHOC-abK3iem7S_b8JfXksSU,135
99
+ draft_grn-0.1.0.dist-info/top_level.txt,sha256=K0n9B0dntUHXysY_72fZeejgTl0R7xZi_M1mxCQAfpk,28
100
+ draft_grn-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,4 @@
1
+ [console_scripts]
2
+ draft = draft_paired.workflow_cli:main
3
+ draft_paired = draft_paired.cli:main
4
+ draft_unpaired = draft_unpaired.cli:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Velten Group
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,2 @@
1
+ draft_paired
2
+ draft_unpaired
@@ -0,0 +1,140 @@
1
+ # Verify scMultiSim function fingerprints against the Bioconductor 3.20 source.
2
+ scmultisim_source_sha256 <- '15ddbe83503bc1af1b408ddc3e506662888712c0bf3cdec6d1a5cfa60bf91052'
3
+ scmultisim_expected_functions <- c(
4
+ ".default" = "24a3d3d1af8a208dc3c71439031428ed42b85a58e6a375e0a15188d47bc34b3e",
5
+ ".should.be.int.between" = "90fa4113156319eeafc27ff927e982b81e6b08bad8562d270aa515d7e51c41c3",
6
+ ".should.be.num.between" = "8ce26b6d21a9840968ecb796738e830e4abadca4cfa778ee220f5a014c72ab16",
7
+ ".choose_from" = "e0d11338b1116a169e26c74ec737998c80cd2a4e04d746dc5519a2347f988c98",
8
+ ".opt_list" = "8b9f880d910c245931b90f6eb2cd9e38d1ce613ad936ba355db2894f0d352199",
9
+ ".check_opt" = "f300b7881f446ce16ceaaee008c8ce5a29440df955abc111da36f2184c4f9242",
10
+ ".split_long_string" = "31675116ff1437813dc670dcf67202c619b52f310307e18099ad0a119d56ecb7",
11
+ ".print_opt" = "176f35eb51213adcaa12a86c69c30abc186b4dcd56ebf59fd79add517a9941d7",
12
+ "OP" = "254cbef323f90ef9fb36d9a819d044cd777f0151a1e74c2159e19ff5e0590f0c",
13
+ ".dynamic_grn_default_params" = "2ce62a3fbdbe5eb15e3f2323939e2fbf95ebaaf8e09b569a70a47ac5a33f05e1",
14
+ ".continuousCIFParam" = "57cfbbaf92ede813c0a7586da1b02b054e4f8f1d1c222a795a65d77a3b742bea",
15
+ ".continuousCIFParamSpatial" = "fbea5292bcf1ae6f40d422ca7d1bcb43b55c47f2fa0a5554720fd41838836999",
16
+ ".continuousCIFParamNormal" = "712078000d3739d34bf7ddfc694f1a6fb4049c42271283090c1d70fb389e214f",
17
+ ".discreteCIFSpatial" = "b707a443ecbee5cb951063608a90ed8bf404167149a2ee4c11681626a657df83",
18
+ "SampleEdge" = "db35094434c41d4638eb9c5b66784d0bf5a29b1a7b086dfbd238f79b89e6ba33",
19
+ "SampleSubtree" = "be6cdb295459f1586794255a82f30aa0bd1ed1856894fde13b84520ae2583480",
20
+ "sim_true_counts" = "0dc7047b362342d2a7384cba67a53f97757900734e0ee40a8d84f2249d9b6db4",
21
+ ".getResult" = "69e38b8252483dd4d043b416baacad4a5ca102ac5f2472f4f4cac7e9b3e47832",
22
+ ".renameGenes" = "bba07961174283c58ac799c185966b91f96de16becc31390b5cd2032a5981a9c",
23
+ ".normalizeGRNParams" = "e8cc02cf0e5f86ea317becc04ae231174f750d7cb1cb9c8a3c3959ef270e8c4c",
24
+ ".getNumbers" = "b14501de62bb52f3339120f5769729a32aff6a280aeedb70a4761b06b049b9bf",
25
+ ".discreteCIF" = "7e073400c85dde4c9f53270e37dbf9a12a70059fbdb095c3d54b846b152402d6",
26
+ ".continuousCIF" = "325246e25fedcd893abfa77c562b5ebd2c310ece686ad1bc1a8049e5f04f173d",
27
+ ".geneEffectsByRegulator" = "45d047fc0a9f2beed077aade54fde641615f0daf3fe01452a46b8d036d575bbd",
28
+ ".identityVectors" = "d270d6b8b7fb4f83abc04bdec1bc11d67078ca40b0e4e11071144310f5e3cedd",
29
+ ".geneIdentifyVectors" = "9c74b5a585280a774fb6f77456479dc1db744d8b04b55060915e3e1c048e3159",
30
+ ".regionIdentityVectors" = "1a49007b34526fd80150b77bc8aeff41e07e4571a05e78ace44a4449078df63a",
31
+ ".regionToGeneMatrix" = "c5d103835544186d7d7d38b0e53e1ffd3b72b1b35d3d49994c525c918889fa02",
32
+ ".summarizeExp" = "c8638508c57cc7486af2365b9331e6528ce423aeaecdb0094d27a844ed3ba149",
33
+ ".matchParamsDen" = "22f2dbbe13e0161507931d4645c080358dcbabe776bb495061b4fd3540f7ebc1",
34
+ ".getParams" = "d2b703f8ef897d1831294b89fab49d6bd5e83155ff3578da6b2a897d8761931d",
35
+ ".prepareHGE" = "d02644825b3198599f4534a522fec1a1381db31b6ad5cd1072490f202f9d8bdf",
36
+ ".atacSeq" = "8eb165444e4cc37e36ced435c0fe341a755b641a0bd44f0c88cb14ce6417a02f",
37
+ ".rnaSeq" = "cdbf1af7db300775bacc080067dc244cbbfc03590b90d2e743ba381597607d06",
38
+ ".rnaSimEdge" = "4b24de51c138a163115cadd70fcf92f0e6a84e66d48178e7833554d2408985f1",
39
+ ".setSpatialFinalCellType" = "a31e64a7700d40e75d012cb26b16056ad0c226bfac30def2a517b05ce98ef654",
40
+ ".getExtraCIF" = "c6e7af1180ab0c68e60b7326d128cc8f2e0361880e0abb6e4fc205d1d3ff9fc0",
41
+ ".rnaSeqSpatial" = "967c2996c69d9be600c753c22c79164d5cbbb1437fdeb65b61ac12f50b66703d",
42
+ "gen_1branch" = "ff96db99a796045e279cecf5b91b66c9519351d88593b0084c89bf9de6d3b359",
43
+ ".betaPoisson" = "3805615714826b57ef164014b3749d3a05e0edcfda3c64a01eaccef9248b9569",
44
+ ".betaPoisson.vec" = "88eed0afb165d911daaed76ecb5a43bd76bbb77585936e37053518d13d0bee5e",
45
+ ".atacIntrNoise" = "580c3666653e8ed016762420c93b316ca958021521c4252aba8345c3d154793e",
46
+ ".parseSpatialParams" = "8754c7da7b082270392a95e08673c06f13e5edc7a9198a62c913b2d2f052983b",
47
+ ".getPaths" = "1edcc46937dedf818ddb0d40c4ed3012eff619749694b2b8164a30826da783bf",
48
+ ".getPathLen" = "a1feb9473dc57c52aea28dcf3614ddb176b6a2042d2342f6cdb9a762bc683eaf",
49
+ ".cellTypeParamToMatrix" = "3d6df3d0f59f5838b46ca9fec25dc0389831d8d1b11e48e9b37138ddab08674c",
50
+ "cci_cell_type_params" = "efbebc5c82ec020c744373a891d0b2de662db2a3ab9412fe9c7ff8bd76ca649a",
51
+ "gen_clutter" = "1f85f18cd3a54f6cc15e27e12f25725b04488fccc92fc871a923d265892d5403",
52
+ ".samplePointsGaussianKernel" = "e3d8ec7c9f2963faf297adb84437ba1d71ef4c7215b82408805e77150c6c36c8",
53
+ "CreateSpatialGrid" = "eec6b61f1f93ed32fbf4f7e87d74ad86978904621f945aabbe601e1fd1e8cc11",
54
+ ".CreateDynGRN" = "6abfb4aa2d2c020ef824a1137da4f48cbe3582514afe9c2a88885d06110fd00e",
55
+ ".getDynGRNOpts" = "b1a6e36ce19c30de682f320c74930c93101370d4f0d544a6f90a4e7fc199471e",
56
+ "add_expr_noise" = "dbf828cf66b3d7721026caba1add562fcb6a6660988f4077f79ed8c4e816fb38",
57
+ "divide_batches" = "9889312f6387167df3799484d3bc16943da374b934209906e840f0a9e782931a",
58
+ ".divideBatchesImpl" = "8c79e7d10e82e227a25fee914246255da3bd8da85b76532711184488944566ae",
59
+ ".amplifyOneCell" = "3d62d27a96805c038f783fcf6b246471439847503045a13d05b1cc165d488b59",
60
+ "True2ObservedCounts" = "b0d086304f24adc14895bf2cbfbcffd498db548b9e13b4af9189811e4d02dd62",
61
+ "True2ObservedATAC" = "9b062af4ba17d21d73276a7e78a6da7dcd1a3886c5fccf540283e82afcd4cdac",
62
+ ".calAmpBias" = "fd1e67c3ee238e66f7533d51fcd324628c848998d5d68e276b49e5c6401082c3",
63
+ ".expandToBinary" = "074c9dff017cb96b2dd4badf16ebc07a14953afa414cc739fb95837b2b44b88d",
64
+ ".rnormTrunc" = "7df68d0127cf7204991077539afcb1dc9b05ff3f3dd91505d7857dc24f2a3c4c",
65
+ ".getProb" = "2124b36d1b2826fc46f13466012cf7463c6abdb64f252469b0f9078239584414",
66
+ "add_outliers" = "749e05782bf5618929fcd3bec14a9a8a37b0b9e5743a4335d37bed06770f9013",
67
+ ".getResultsFromGlobal" = "4a089dfc5763e65cb4e57a6dc2a09b5481c7313992ebb75fb4e4d88b4777864a",
68
+ "plot_phyla" = "053430cf2c84af3401645ce521c7931c84994343addd39eb5e4d2e6451dfc9ee",
69
+ ".plotHist" = "74c748992aa3c4f30ece94cec8a0faacb842f8eb9a67735178dbcea6da2e554c",
70
+ "plot_tsne" = "cf9ec00f2712abce06028e2b1e8c2edfdc257932daa14870f6c2d6bdb2775f32",
71
+ "plot_grid" = "2bc0c0da49a0081ac7f32e0cbb16061e166a5e1f6d4c232e046814076c2fe143",
72
+ ".getGeneModuleColors" = "d8f1cb43647e0012116d068428e8c9cb9b0cb6fc84a941743ac95af8b3e1e403",
73
+ "plot_gene_module_cor_heatmap" = "2be62dd2f9c8676d06e9af630cb8dfec0d9dde678da2599056da52d7c50a8066",
74
+ "plot_cell_loc" = "80741e900f889789f622ac02c1e898b8d1bcfbee78c5b94552fbdc1edf533566",
75
+ "plot_grn" = "9458a695e64bfc36937262021096436698dfb7cfe1206b958e6a892ceeb12f22",
76
+ "gene_corr_regulator" = "41307eb86818920ae75fd4037b2d2ea342d2901c6625b3ce337e329bd8d04a67",
77
+ ".geneCorrGRN" = "9d191fa5a3841317b3a0d3e51fa199829fcfdbcbe61075f807e9ef1011bf1b93",
78
+ ".geneCorr" = "75e28f0a911687dc1f1b758477b90db116064aeff0bb445a17ad28469336399d",
79
+ "gene_corr_cci" = "ffaeb581f35cf0af7297ab77fbca5ff30c56f2ffe64eff383aaabc0e5317aecd",
80
+ "gene_coexpr_cci" = "658bfee3c7619a9673ebeb5ba4038b22eb0e681863639ad34071980517cfb9c4",
81
+ ".processVelocity" = "2dadb514f6f9fbab8a956ca1bfe74d6ed7ce824fda0313bd531ec040e0023a75",
82
+ "plot_rna_velocity" = "aa89f06f59a3a65ac06731620e6f4c53a2448352966eba20da0ceef1ea3d1af6",
83
+ ".cosineSim" = "b214024f2a90bda85c27eee0a1bf15238f71e45f40f205f7e33b34070ea0ebc7",
84
+ ".rnaVelocityCosine" = "3bc204d940b5614d40464f335dfdbb9a7672ab3d36a07fbe29810a8dfaba4b48",
85
+ ".getCountCorrMatrix" = "fbf5970a69846c710b538722e0a97165340f1d7b8647b6053509a534136d66e6",
86
+ "Get_1region_ATAC_correlation" = "3c5eeb0c366caebf47f34eed5a76f1f4c80ee4a44a8a627758d51f1d5f20e2a7",
87
+ "Get_ATAC_correlation" = "0009d9d335204ed4af272dfee1ce7033b984ed88ca41c1d4ef684849eabf7a82",
88
+ "%+%" = "74f09f3942be6b933eb76ada34c9e3e5479e940b4cba82cba3960564a31e2d64",
89
+ ".defaultArgs" = "5e8c80484cee0321b10946ccbe9fc17cbbf22ab823cf263e0150cbe46032e922",
90
+ ".regionToTFMatrix" = "904af2b6f0e19ca4e15e14e63cc53ee5b8851d13364e7a42f76256c2ed676d69",
91
+ "SampleDen" = "3342e74365a410e321d5ad59f49f6ec83a25d6fff387a83a33f4e15376e6a5cb",
92
+ "Phyla5" = "767709e0b65cc3088448a5d379a992f651d2ae3c6eeed339589cb53561b33ee3",
93
+ "Phyla3" = "0d4a5f8029135a1d74c9e6103923342344520f425fb5d4c887ef0a099679717c",
94
+ "Phyla1" = "bee419070c63d42505abbb9956d52e7415f0012954238128d9e61546baecdaf6",
95
+ ".tree_info" = "531a91e0605bbdc1a94e8cb0d0fd54d664e4bc9c22c8d6801c9f1e4c582f70d3",
96
+ ".print_param_summary" = "a43d27d4b20aa67a119395b1235e980c42465a56a65df358df31a7e475c94e18",
97
+ ".print_matrix_dim" = "fb702682afca23fa0c7aabceb0dc273a7eb38a0860a5e7a653a6ca296fc47e84",
98
+ ".print_time" = "f1e92bf72812903674a7d38edeef58adbd820b1c58215b0fe8ec8b3fac77c69f",
99
+ ".print_gene_in_grn" = "f5728ba3a219b1918ba64603f3d15106b96719f74b072f08362dc9e1b2cea8c4",
100
+ "sim_example" = "35082fcfe2906169aef47c0d30143cdc6f7b93b91334fd4dcac14dc2186ce850",
101
+ "sim_example_spatial" = "b5b34c4b2d0134fff75f9f4e1216da1a05b8642d51f9f28e1d0ef362cc6fd9a9",
102
+ "atac_dens_nonzero" = "bb6a57db45a50476505e7fbae4ca2230e55b20a41e7cd4a3ac7e19ecaece2488",
103
+ "run_shiny" = "83baca992c06ee3282b0e02717b94b7b53c183733567874a0de0937188cbac00",
104
+ "generateSpatialLoc" = "797b07764ecb295b82e99f0429f9b39f3ed2a11160a3428f0cd9e635a01d2b11",
105
+ "scmultisim_help" = "fabff23c3768875a33985349f5be57374334dffccb475683cfc2146e307dc8bf",
106
+ ".cci_help" = "86b958283e8a538e028a6d6c5679912685e83e5c04bc235c518b98e8b7960d50",
107
+ "rna_velo_knn" = "add3331e018f391cc9dedcfc8eb1b17d5aef74fb78593316651edd87c8628899"
108
+ )
109
+
110
+ verify_scmultisim_implementation <- function(audit=NULL) {
111
+ if (length(scmultisim_expected_functions) != 104L) stop('Damaged scMultiSim function fingerprint manifest.')
112
+ if (!requireNamespace('scMultiSim',quietly=TRUE) ||
113
+ as.character(packageVersion('scMultiSim')) != '1.2.0') {
114
+ stop('Requires Bioconductor 3.20 scMultiSim 1.2.0; run scripts/install_simulation_r.R.')
115
+ }
116
+ ns <- asNamespace('scMultiSim')
117
+ hashes <- vapply(names(scmultisim_expected_functions),function(name) {
118
+ if (!exists(name,ns,inherits=FALSE) || !is.function(get(name,ns))) return('missing')
119
+ code <- paste(deparse(get(name,ns),width.cutoff=500L),collapse='\n')
120
+ digest::digest(code,algo='sha256',serialize=FALSE)
121
+ },character(1))
122
+ checks <- data.frame(name=names(hashes),sha256=unname(hashes),
123
+ expected_sha256=unname(scmultisim_expected_functions),
124
+ matches=unname(hashes==scmultisim_expected_functions))
125
+ if (any(!checks$matches)) {
126
+ stop(paste0('scMultiSim implementation mismatch (',sum(!checks$matches),
127
+ ' native functions differ). Requires the official Bioconductor 3.20 scMultiSim 1.2.0 source; ',
128
+ 'the GitHub implementation also reports 1.2.0 but uses a different random-number process. ',
129
+ 'Run scripts/install_simulation_r.R into the selected R library.'))
130
+ }
131
+ if (!is.null(audit)) {
132
+ write.table(checks,file.path(audit,'native_function_checks.tsv'),sep='\t',row.names=FALSE,quote=FALSE)
133
+ writeLines(c(paste('library',find.package('scMultiSim')),
134
+ paste('RNGkind',paste(RNGkind(),collapse='/')),
135
+ capture.output(packageDescription('scMultiSim'))),
136
+ file.path(audit,'simulator_implementation.txt'))
137
+ }
138
+ data.frame(package=c('scMultiSim_source','scMultiSim_source_sha256'),
139
+ version=c('Bioconductor_3.20/1.2.0',scmultisim_source_sha256))
140
+ }
@@ -0,0 +1,44 @@
1
+ # Rejection-sample nonpositive kinetic rates within the current R process.
2
+ # Retain positive draws and use the configured mean for replacement draws.
3
+ positive_kinetic_draws <- function(values, center) {
4
+ if (!is.numeric(center) || length(center) != 1L || !is.finite(center) || center <= 0 || any(!is.finite(values))) {
5
+ stop('Invalid native kinetic-rate mean or nonfinite rate')
6
+ }
7
+ corrected <- values
8
+ rounds <- 0L
9
+ while (any(corrected <= 0)) {
10
+ bad <- which(corrected <= 0)
11
+ corrected[bad] <- rnorm(length(bad), mean=center, sd=.1)
12
+ rounds <- rounds+1L
13
+ if (rounds > 1000L) stop('Positive kinetic-rate rejection sampler did not finish')
14
+ }
15
+ list(values=corrected, rounds=rounds)
16
+ }
17
+
18
+ install_positive_kinetic_rates <- function(audit) {
19
+ native_edge <- get('.rnaSimEdge', asNamespace('scMultiSim'))
20
+ checked <- FALSE
21
+ assignInNamespace('.rnaSimEdge', function(sim, ...) {
22
+ if (!checked) {
23
+ rejected <- data.frame(gene=integer(), role=character(), original=double(), replacement=double(), mean=double(), sd=double(), rounds=integer())
24
+ for (role in c('beta','d')) {
25
+ field <- paste0(role,'_genes')
26
+ before <- sim[[field]]
27
+ result <- positive_kinetic_draws(before, sim$options[[role]])
28
+ sim[[field]] <- result$values
29
+ bad <- which(before <= 0)
30
+ if (length(bad)) {
31
+ rejected <- rbind(rejected, data.frame(gene=bad,role=role,
32
+ original=before[bad],replacement=result$values[bad],
33
+ mean=sim$options[[role]],sd=.1,rounds=result$rounds))
34
+ }
35
+ }
36
+ rates <- data.frame(gene=seq_along(sim$beta_genes), beta=sim$beta_genes,d=sim$d_genes)
37
+ if (any(rates$beta <= 0) || any(rates$d <= 0)) stop('Nonpositive kinetic rates remain')
38
+ write.table(rates,file.path(audit,'kinetic_rates.tsv'),sep='\t',row.names=FALSE,quote=FALSE)
39
+ write.table(rejected,file.path(audit,'kinetic_rate_resampling.tsv'),sep='\t',row.names=FALSE,quote=FALSE)
40
+ checked <<- TRUE
41
+ }
42
+ native_edge(sim, ...)
43
+ },ns='scMultiSim')
44
+ }
@@ -0,0 +1,24 @@
1
+ # Use fixed seeds for the native simulation stages in a local function copy.
2
+ # Consume the stage-seed draw on every call to keep the RNG sequence aligned.
3
+ # Native code computes the weighted GRN for each snapshot.
4
+ make_pinned_snapshot_runner <- function(native, master_seed, rng_kind) {
5
+ force(native)
6
+ native_body <- as.list(body(native))
7
+ is_seed_assignment <- function(expr) {
8
+ is.call(expr) && identical(expr[[1]], as.name('<-')) &&
9
+ identical(expr[[2]], as.name('seed')) && is.call(expr[[3]]) &&
10
+ as.character(expr[[3]][[1]]) %in% c('sample', 'sample.int')
11
+ }
12
+ positions <- which(vapply(native_body, is_seed_assignment, logical(1)))
13
+ if (length(positions) != 1L) stop('Unsupported scMultiSim native stage seed layout')
14
+ position <- positions[[1]]
15
+ sampler <- native_body[[position]][[3]]
16
+ do.call(RNGkind, as.list(rng_kind))
17
+ set.seed(master_seed)
18
+ stage_seeds <- eval(sampler, envir=environment(native))
19
+ if (length(stage_seeds) != 9L || anyNA(stage_seeds)) stop('Expected nine native stage seeds')
20
+ native_body[[position]][[3]] <- substitute({DRAW; FIXED}, list(DRAW=sampler, FIXED=stage_seeds))
21
+ pinned <- native
22
+ body(pinned) <- as.call(native_body)
23
+ list(run=pinned, seeds=stage_seeds)
24
+ }