cellink-tools 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.
Files changed (291) hide show
  1. cellink_tools-0.1.0/.codecov.yaml +17 -0
  2. cellink_tools-0.1.0/.cruft.json +30 -0
  3. cellink_tools-0.1.0/.editorconfig +15 -0
  4. cellink_tools-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +89 -0
  5. cellink_tools-0.1.0/.github/ISSUE_TEMPLATE/config.yml +5 -0
  6. cellink_tools-0.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +11 -0
  7. cellink_tools-0.1.0/.github/workflows/build.yaml +29 -0
  8. cellink_tools-0.1.0/.github/workflows/release.yaml +29 -0
  9. cellink_tools-0.1.0/.github/workflows/run_notebooks.yaml +46 -0
  10. cellink_tools-0.1.0/.github/workflows/test.yaml +75 -0
  11. cellink_tools-0.1.0/.gitignore +206 -0
  12. cellink_tools-0.1.0/.pre-commit-config.yaml +47 -0
  13. cellink_tools-0.1.0/.readthedocs.yaml +19 -0
  14. cellink_tools-0.1.0/CHANGELOG.md +190 -0
  15. cellink_tools-0.1.0/LICENSE +201 -0
  16. cellink_tools-0.1.0/PKG-INFO +441 -0
  17. cellink_tools-0.1.0/README.md +126 -0
  18. cellink_tools-0.1.0/docs/Makefile +20 -0
  19. cellink_tools-0.1.0/docs/_static/.gitkeep +0 -0
  20. cellink_tools-0.1.0/docs/_static/css/custom.css +4 -0
  21. cellink_tools-0.1.0/docs/_static/img/cellink-logo-mark.svg +61 -0
  22. cellink_tools-0.1.0/docs/_static/img/cellink-logo.png +0 -0
  23. cellink_tools-0.1.0/docs/_static/img/cellink-logo.svg +70 -0
  24. cellink_tools-0.1.0/docs/_static/img/schematic_figure.png +0 -0
  25. cellink_tools-0.1.0/docs/_templates/.gitkeep +0 -0
  26. cellink_tools-0.1.0/docs/_templates/autosummary/class.rst +61 -0
  27. cellink_tools-0.1.0/docs/api/at.md +16 -0
  28. cellink_tools-0.1.0/docs/api/cli.md +3 -0
  29. cellink_tools-0.1.0/docs/api/donordata.md +17 -0
  30. cellink_tools-0.1.0/docs/api/index.md +17 -0
  31. cellink_tools-0.1.0/docs/api/io.md +27 -0
  32. cellink_tools-0.1.0/docs/api/ml.md +13 -0
  33. cellink_tools-0.1.0/docs/api/pl.md +15 -0
  34. cellink_tools-0.1.0/docs/api/pp.md +18 -0
  35. cellink_tools-0.1.0/docs/api/resources.md +31 -0
  36. cellink_tools-0.1.0/docs/api/tl.md +24 -0
  37. cellink_tools-0.1.0/docs/api/tl_external.md +156 -0
  38. cellink_tools-0.1.0/docs/api/utils.md +14 -0
  39. cellink_tools-0.1.0/docs/changelog.md +3 -0
  40. cellink_tools-0.1.0/docs/conf.py +142 -0
  41. cellink_tools-0.1.0/docs/contributing.md +264 -0
  42. cellink_tools-0.1.0/docs/extensions/typed_returns.py +32 -0
  43. cellink_tools-0.1.0/docs/index.md +31 -0
  44. cellink_tools-0.1.0/docs/installation.md +79 -0
  45. cellink_tools-0.1.0/docs/references.bib +10 -0
  46. cellink_tools-0.1.0/docs/references.md +5 -0
  47. cellink_tools-0.1.0/docs/tutorials/benchmark_alternatives.py +29 -0
  48. cellink_tools-0.1.0/docs/tutorials/benchmark_loader_c.py +42 -0
  49. cellink_tools-0.1.0/docs/tutorials/benchmark_loader_g.py +89 -0
  50. cellink_tools-0.1.0/docs/tutorials/benchmark_next.py +123 -0
  51. cellink_tools-0.1.0/docs/tutorials/burden_testing.ipynb +11303 -0
  52. cellink_tools-0.1.0/docs/tutorials/burden_testing.py +281 -0
  53. cellink_tools-0.1.0/docs/tutorials/cell_level_ldsc_analysis.ipynb +7147 -0
  54. cellink_tools-0.1.0/docs/tutorials/clumping_pruning.ipynb +961 -0
  55. cellink_tools-0.1.0/docs/tutorials/colocalization.ipynb +4995 -0
  56. cellink_tools-0.1.0/docs/tutorials/donordata_basics.ipynb +900 -0
  57. cellink_tools-0.1.0/docs/tutorials/explore_annotations.ipynb +10143 -0
  58. cellink_tools-0.1.0/docs/tutorials/formula_resolver.ipynb +536 -0
  59. cellink_tools-0.1.0/docs/tutorials/formula_resolver.py +134 -0
  60. cellink_tools-0.1.0/docs/tutorials/generate_dummy_onek1k.py +465 -0
  61. cellink_tools-0.1.0/docs/tutorials/gsmap.ipynb +1136 -0
  62. cellink_tools-0.1.0/docs/tutorials/index.md +24 -0
  63. cellink_tools-0.1.0/docs/tutorials/magma_analysis_tutorial.ipynb +3830 -0
  64. cellink_tools-0.1.0/docs/tutorials/profile_internals.py +113 -0
  65. cellink_tools-0.1.0/docs/tutorials/profile_yields.py +186 -0
  66. cellink_tools-0.1.0/docs/tutorials/pseudobulk_eqtl.ipynb +985 -0
  67. cellink_tools-0.1.0/docs/tutorials/pseudobulk_eqtl.py +488 -0
  68. cellink_tools-0.1.0/docs/tutorials/pseudobulk_eqtl_jaxqtl_tensorqtl.ipynb +5650 -0
  69. cellink_tools-0.1.0/docs/tutorials/run_dataloader.ipynb +503 -0
  70. cellink_tools-0.1.0/docs/tutorials/scdrs_seismic.ipynb +2180 -0
  71. cellink_tools-0.1.0/docs/tutorials/sceps.ipynb +3678 -0
  72. cellink_tools-0.1.0/docs/tutorials/sclinker.ipynb +4625 -0
  73. cellink_tools-0.1.0/docs/tutorials/scooby.ipynb +482 -0
  74. cellink_tools-0.1.0/docs/tutorials/scprs.ipynb +559 -0
  75. cellink_tools-0.1.0/docs/tutorials/single_cell_eqtl_saigeqtl.ipynb +4314 -0
  76. cellink_tools-0.1.0/pyproject.toml +272 -0
  77. cellink_tools-0.1.0/src/cellink/__init__.py +8 -0
  78. cellink_tools-0.1.0/src/cellink/_config.py +63 -0
  79. cellink_tools-0.1.0/src/cellink/_core/__init__.py +4 -0
  80. cellink_tools-0.1.0/src/cellink/_core/data_fields.py +48 -0
  81. cellink_tools-0.1.0/src/cellink/_core/dummy_data.py +264 -0
  82. cellink_tools-0.1.0/src/cellink/_core/schema.py +86 -0
  83. cellink_tools-0.1.0/src/cellink/_extras.py +39 -0
  84. cellink_tools-0.1.0/src/cellink/at/__init__.py +14 -0
  85. cellink_tools-0.1.0/src/cellink/at/acat.py +129 -0
  86. cellink_tools-0.1.0/src/cellink/at/base_model.py +116 -0
  87. cellink_tools-0.1.0/src/cellink/at/fetch.py +185 -0
  88. cellink_tools-0.1.0/src/cellink/at/formula.py +77 -0
  89. cellink_tools-0.1.0/src/cellink/at/gwas.py +207 -0
  90. cellink_tools-0.1.0/src/cellink/at/require.py +80 -0
  91. cellink_tools-0.1.0/src/cellink/at/resolver.py +166 -0
  92. cellink_tools-0.1.0/src/cellink/at/skat.py +230 -0
  93. cellink_tools-0.1.0/src/cellink/at/structlmm.py +221 -0
  94. cellink_tools-0.1.0/src/cellink/at/utils.py +176 -0
  95. cellink_tools-0.1.0/src/cellink/cli/__init__.py +0 -0
  96. cellink_tools-0.1.0/src/cellink/cli/pgen.md +119 -0
  97. cellink_tools-0.1.0/src/cellink/cli/pgen.py +91 -0
  98. cellink_tools-0.1.0/src/cellink/io/__init__.py +4 -0
  99. cellink_tools-0.1.0/src/cellink/io/_codecs.py +98 -0
  100. cellink_tools-0.1.0/src/cellink/io/_export.py +415 -0
  101. cellink_tools-0.1.0/src/cellink/io/_genotype_array.py +135 -0
  102. cellink_tools-0.1.0/src/cellink/io/_pgen.py +625 -0
  103. cellink_tools-0.1.0/src/cellink/io/_plink.py +184 -0
  104. cellink_tools-0.1.0/src/cellink/io/_readwrite.py +415 -0
  105. cellink_tools-0.1.0/src/cellink/io/_sgkit.py +516 -0
  106. cellink_tools-0.1.0/src/cellink/ml/__init__.py +38 -0
  107. cellink_tools-0.1.0/src/cellink/ml/model.py +147 -0
  108. cellink_tools-0.1.0/src/cellink/pl/__init__.py +3 -0
  109. cellink_tools-0.1.0/src/cellink/pl/_at.py +576 -0
  110. cellink_tools-0.1.0/src/cellink/pl/_expression.py +367 -0
  111. cellink_tools-0.1.0/src/cellink/pl/_ldsc_magma.py +335 -0
  112. cellink_tools-0.1.0/src/cellink/pp/__init__.py +4 -0
  113. cellink_tools-0.1.0/src/cellink/pp/_basic.py +202 -0
  114. cellink_tools-0.1.0/src/cellink/pp/_variant_qc.py +83 -0
  115. cellink_tools-0.1.0/src/cellink/resources/__init__.py +24 -0
  116. cellink_tools-0.1.0/src/cellink/resources/_datasets.py +680 -0
  117. cellink_tools-0.1.0/src/cellink/resources/_datasets_utils.py +253 -0
  118. cellink_tools-0.1.0/src/cellink/resources/_gwas_prs_qtl.py +1117 -0
  119. cellink_tools-0.1.0/src/cellink/resources/_ld.py +706 -0
  120. cellink_tools-0.1.0/src/cellink/resources/_utils.py +321 -0
  121. cellink_tools-0.1.0/src/cellink/resources/config/1000genomes.yaml +167 -0
  122. cellink_tools-0.1.0/src/cellink/resources/config/1000genomes_grch38.yaml +133 -0
  123. cellink_tools-0.1.0/src/cellink/resources/config/dummy_onek1k.yaml +4 -0
  124. cellink_tools-0.1.0/src/cellink/resources/config/favor.yaml +47 -0
  125. cellink_tools-0.1.0/src/cellink/resources/config/magma.yaml +31 -0
  126. cellink_tools-0.1.0/src/cellink/resources/config/onek1k.yaml +13 -0
  127. cellink_tools-0.1.0/src/cellink/tl/__init__.py +15 -0
  128. cellink_tools-0.1.0/src/cellink/tl/_annotate_snps_ensembl_rest.py +105 -0
  129. cellink_tools-0.1.0/src/cellink/tl/_annotate_snps_genotype_data.py +726 -0
  130. cellink_tools-0.1.0/src/cellink/tl/_coloc.py +250 -0
  131. cellink_tools-0.1.0/src/cellink/tl/_gene_pair_effects.py +129 -0
  132. cellink_tools-0.1.0/src/cellink/tl/_pca_informed_prior.py +134 -0
  133. cellink_tools-0.1.0/src/cellink/tl/_runner.py +218 -0
  134. cellink_tools-0.1.0/src/cellink/tl/_rvat.py +117 -0
  135. cellink_tools-0.1.0/src/cellink/tl/_subset_region.py +86 -0
  136. cellink_tools-0.1.0/src/cellink/tl/external/__init__.py +256 -0
  137. cellink_tools-0.1.0/src/cellink/tl/external/_biomart.py +114 -0
  138. cellink_tools-0.1.0/src/cellink/tl/external/_gsmap.py +299 -0
  139. cellink_tools-0.1.0/src/cellink/tl/external/_jaxqtl.py +648 -0
  140. cellink_tools-0.1.0/src/cellink/tl/external/_joint_nmf.py +259 -0
  141. cellink_tools-0.1.0/src/cellink/tl/external/_ld.py +89 -0
  142. cellink_tools-0.1.0/src/cellink/tl/external/_ldsc.py +2435 -0
  143. cellink_tools-0.1.0/src/cellink/tl/external/_ldsc2magma.py +934 -0
  144. cellink_tools-0.1.0/src/cellink/tl/external/_magma.py +835 -0
  145. cellink_tools-0.1.0/src/cellink/tl/external/_mixmil.py +136 -0
  146. cellink_tools-0.1.0/src/cellink/tl/external/_pc.py +71 -0
  147. cellink_tools-0.1.0/src/cellink/tl/external/_preprocessing.py +118 -0
  148. cellink_tools-0.1.0/src/cellink/tl/external/_saigeqtl.py +961 -0
  149. cellink_tools-0.1.0/src/cellink/tl/external/_scdrs.py +355 -0
  150. cellink_tools-0.1.0/src/cellink/tl/external/_sclinker.py +744 -0
  151. cellink_tools-0.1.0/src/cellink/tl/external/_sclinker_utils.py +2038 -0
  152. cellink_tools-0.1.0/src/cellink/tl/external/_scooby.py +1499 -0
  153. cellink_tools-0.1.0/src/cellink/tl/external/_scprs.py +1213 -0
  154. cellink_tools-0.1.0/src/cellink/tl/external/_seismic.py +326 -0
  155. cellink_tools-0.1.0/src/cellink/tl/external/_seismic_torch.py +485 -0
  156. cellink_tools-0.1.0/src/cellink/tl/external/_sldsc_utils.py +739 -0
  157. cellink_tools-0.1.0/src/cellink/tl/external/_tensorqtl.py +1129 -0
  158. cellink_tools-0.1.0/src/cellink/tl/external/_tensorqtl_main.py +51 -0
  159. cellink_tools-0.1.0/src/cellink/tl/external/config/ldsc.yaml +6 -0
  160. cellink_tools-0.1.0/src/cellink/tl/external/config/ldsc_docker.yaml +5 -0
  161. cellink_tools-0.1.0/src/cellink/tl/external/config/ldsc_singularity.yaml +5 -0
  162. cellink_tools-0.1.0/src/cellink/tl/external/config/saigeqtl.yaml +8 -0
  163. cellink_tools-0.1.0/src/cellink/tl/external/config/saigeqtl_docker.yaml +7 -0
  164. cellink_tools-0.1.0/src/cellink/tl/external/config/saigeqtl_singularity.yaml +7 -0
  165. cellink_tools-0.1.0/src/cellink/tl/external/config/vep.yaml +20 -0
  166. cellink_tools-0.1.0/src/cellink/tl/external/config/vep_offline.yaml +34 -0
  167. cellink_tools-0.1.0/src/cellink/tl/external/config/vep_offline_local.yaml +34 -0
  168. cellink_tools-0.1.0/src/cellink/tl/utils.py +17 -0
  169. cellink_tools-0.1.0/src/cellink/utils/__init__.py +2 -0
  170. cellink_tools-0.1.0/src/cellink/utils/_encode_genotype_data.py +130 -0
  171. cellink_tools-0.1.0/src/cellink/utils/preprocess.py +33 -0
  172. cellink_tools-0.1.0/tests/conftest.py +34 -0
  173. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.bed +0 -0
  174. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.bgen +0 -0
  175. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.bim +1000 -0
  176. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.fam +100 -0
  177. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.pgen +0 -0
  178. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.psam +101 -0
  179. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.pvar +1001 -0
  180. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.sample +102 -0
  181. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/.zattrs +5 -0
  182. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/.zgroup +3 -0
  183. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/.zmetadata +451 -0
  184. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/call_genotype/.zarray +25 -0
  185. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/call_genotype/.zattrs +8 -0
  186. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/call_genotype/0/0/0 +0 -0
  187. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/call_genotype_mask/.zarray +25 -0
  188. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/call_genotype_mask/.zattrs +8 -0
  189. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/call_genotype_mask/0/0/0 +0 -0
  190. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/call_genotype_phased/.zarray +23 -0
  191. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/call_genotype_phased/.zattrs +7 -0
  192. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/call_genotype_phased/0/0 +0 -0
  193. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/contig_id/.zarray +24 -0
  194. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/contig_id/.zattrs +5 -0
  195. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/contig_id/0 +0 -0
  196. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/contig_length/.zarray +20 -0
  197. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/contig_length/.zattrs +5 -0
  198. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/contig_length/0 +0 -0
  199. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/filter_id/.zarray +24 -0
  200. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/filter_id/.zattrs +5 -0
  201. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/filter_id/0 +0 -0
  202. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/sample_id/.zarray +24 -0
  203. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/sample_id/.zattrs +5 -0
  204. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/sample_id/0 +0 -0
  205. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/variant_PR/.zarray +21 -0
  206. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/variant_PR/.zattrs +6 -0
  207. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/variant_PR/0 +0 -0
  208. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/variant_allele/.zarray +27 -0
  209. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/variant_allele/.zattrs +7 -0
  210. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/variant_allele/0/0 +0 -0
  211. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/variant_contig/.zarray +21 -0
  212. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/variant_contig/.zattrs +6 -0
  213. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/variant_contig/0 +0 -0
  214. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/variant_filter/.zarray +23 -0
  215. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/variant_filter/.zattrs +7 -0
  216. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/variant_filter/0/0 +0 -0
  217. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/variant_id/.zarray +25 -0
  218. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/variant_id/.zattrs +6 -0
  219. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/variant_id/0 +0 -0
  220. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/variant_id_mask/.zarray +21 -0
  221. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/variant_id_mask/.zattrs +6 -0
  222. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/variant_id_mask/0 +0 -0
  223. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/variant_position/.zarray +21 -0
  224. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/variant_position/.zattrs +6 -0
  225. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/variant_position/0 +0 -0
  226. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/variant_quality/.zarray +21 -0
  227. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/variant_quality/.zattrs +6 -0
  228. cellink_tools-0.1.0/tests/data/simulated_genotype_calls.vcz/variant_quality/0 +0 -0
  229. cellink_tools-0.1.0/tests/data/simulated_genotype_calls_dosage_per_strand.npy +0 -0
  230. cellink_tools-0.1.0/tests/data/simulated_genotype_calls_one_hot_encoded.npy +0 -0
  231. cellink_tools-0.1.0/tests/data/test_variants_vep_annotated.txt +45 -0
  232. cellink_tools-0.1.0/tests/test_1000genomes_eas_prefix.py +56 -0
  233. cellink_tools-0.1.0/tests/test_ancestry_match.py +46 -0
  234. cellink_tools-0.1.0/tests/test_at.py +194 -0
  235. cellink_tools-0.1.0/tests/test_basic.py +5 -0
  236. cellink_tools-0.1.0/tests/test_categorical_var_dtype.py +130 -0
  237. cellink_tools-0.1.0/tests/test_cli.py +32 -0
  238. cellink_tools-0.1.0/tests/test_coloc.py +190 -0
  239. cellink_tools-0.1.0/tests/test_donor_data.py +72 -0
  240. cellink_tools-0.1.0/tests/test_extras.py +54 -0
  241. cellink_tools-0.1.0/tests/test_fetch.py +127 -0
  242. cellink_tools-0.1.0/tests/test_gene_pair_effects.py +92 -0
  243. cellink_tools-0.1.0/tests/test_genotype_array.py +387 -0
  244. cellink_tools-0.1.0/tests/test_gsmap.py +40 -0
  245. cellink_tools-0.1.0/tests/test_io.py +457 -0
  246. cellink_tools-0.1.0/tests/test_io_pgen.py +110 -0
  247. cellink_tools-0.1.0/tests/test_io_plink.py +178 -0
  248. cellink_tools-0.1.0/tests/test_jaxqtl.py +367 -0
  249. cellink_tools-0.1.0/tests/test_ld_merge_alleles.py +41 -0
  250. cellink_tools-0.1.0/tests/test_ldsc.py +99 -0
  251. cellink_tools-0.1.0/tests/test_ldsc_allna_columns.py +62 -0
  252. cellink_tools-0.1.0/tests/test_ldsc_annot_colocation.py +92 -0
  253. cellink_tools-0.1.0/tests/test_ldsc_build_and_chr_normalization.py +50 -0
  254. cellink_tools-0.1.0/tests/test_ldsc_combine_frq_only.py +23 -0
  255. cellink_tools-0.1.0/tests/test_ldsc_make_annot_validation.py +27 -0
  256. cellink_tools-0.1.0/tests/test_ldsc_munge_and_mhc.py +81 -0
  257. cellink_tools-0.1.0/tests/test_ldsc_native_merge_alleles.py +45 -0
  258. cellink_tools-0.1.0/tests/test_ldsc_output_dir_creation.py +21 -0
  259. cellink_tools-0.1.0/tests/test_magma.py +107 -0
  260. cellink_tools-0.1.0/tests/test_magma_gene_ids.py +84 -0
  261. cellink_tools-0.1.0/tests/test_mixmil.py +20 -0
  262. cellink_tools-0.1.0/tests/test_ml.py +120 -0
  263. cellink_tools-0.1.0/tests/test_munge_sumstats_preflight.py +59 -0
  264. cellink_tools-0.1.0/tests/test_packaged_configs.py +137 -0
  265. cellink_tools-0.1.0/tests/test_pca_informed_prior.py +107 -0
  266. cellink_tools-0.1.0/tests/test_pl.py +155 -0
  267. cellink_tools-0.1.0/tests/test_pp.py +169 -0
  268. cellink_tools-0.1.0/tests/test_resolver.py +306 -0
  269. cellink_tools-0.1.0/tests/test_resources.py +226 -0
  270. cellink_tools-0.1.0/tests/test_runner.py +68 -0
  271. cellink_tools-0.1.0/tests/test_runner_comma_separated_paths.py +48 -0
  272. cellink_tools-0.1.0/tests/test_saigeqtl.py +87 -0
  273. cellink_tools-0.1.0/tests/test_scdrs_gene_overlap.py +129 -0
  274. cellink_tools-0.1.0/tests/test_scdrs_normalization.py +94 -0
  275. cellink_tools-0.1.0/tests/test_sclinker.py +195 -0
  276. cellink_tools-0.1.0/tests/test_sclinker_build_consistency.py +141 -0
  277. cellink_tools-0.1.0/tests/test_sclinker_ld_scores_thin_annot.py +60 -0
  278. cellink_tools-0.1.0/tests/test_sclinker_nmf_orientation.py +29 -0
  279. cellink_tools-0.1.0/tests/test_sclinker_roadmap_tissue_code.py +29 -0
  280. cellink_tools-0.1.0/tests/test_scooby.py +205 -0
  281. cellink_tools-0.1.0/tests/test_seismic_gene_overlap.py +81 -0
  282. cellink_tools-0.1.0/tests/test_seismic_normalization.py +187 -0
  283. cellink_tools-0.1.0/tests/test_seismic_torch.py +128 -0
  284. cellink_tools-0.1.0/tests/test_seismic_torch_robustness.py +71 -0
  285. cellink_tools-0.1.0/tests/test_sldsc_utils.py +107 -0
  286. cellink_tools-0.1.0/tests/test_tensorqtl.py +167 -0
  287. cellink_tools-0.1.0/tests/test_tl.py +180 -0
  288. cellink_tools-0.1.0/tests/test_tl_external.py +171 -0
  289. cellink_tools-0.1.0/tests/test_tl_external_dense_trans_scan.py +73 -0
  290. cellink_tools-0.1.0/tests/test_tl_external_pc_ld_gsmap.py +121 -0
  291. cellink_tools-0.1.0/tests/test_utils.py +58 -0
@@ -0,0 +1,17 @@
1
+ # Based on pydata/xarray
2
+ codecov:
3
+ require_ci_to_pass: no
4
+
5
+ coverage:
6
+ status:
7
+ project:
8
+ default:
9
+ # Require 1% coverage, i.e., always succeed
10
+ target: 1
11
+ patch: false
12
+ changes: false
13
+
14
+ comment:
15
+ layout: diff, flags, files
16
+ behavior: once
17
+ require_base: no
@@ -0,0 +1,30 @@
1
+ {
2
+ "template": "https://github.com/scverse/cookiecutter-scverse",
3
+ "commit": "ab6df8677b2e65fc8ae7ae9b7425373b706af3ee",
4
+ "checkout": null,
5
+ "context": {
6
+ "cookiecutter": {
7
+ "project_name": "Single-cell Genetics (Cellink)",
8
+ "package_name": "cellink",
9
+ "project_description": "cellink enables genetic analyses on single-cell data",
10
+ "author_full_name": "Jan Engelmann, Lucas Arnoldt, Eva Holtkamp",
11
+ "author_email": "jan.engelmann@helmholtz-munich.de, lucas.arnoldt@helmholtz-munich.de, eva.holtkamp@helmholtz-munich.de",
12
+ "github_user": "theislab",
13
+ "github_repo": "cellink",
14
+ "license": "Apache License Version 2.0",
15
+ "ide_integration": false,
16
+ "_copy_without_render": [
17
+ ".github/workflows/build.yaml",
18
+ ".github/workflows/test.yaml",
19
+ "docs/_templates/autosummary/**.rst"
20
+ ],
21
+ "_render_devdocs": false,
22
+ "_jinja2_env_vars": {
23
+ "lstrip_blocks": true,
24
+ "trim_blocks": true
25
+ },
26
+ "_template": "https://github.com/scverse/cookiecutter-scverse"
27
+ }
28
+ },
29
+ "directory": null
30
+ }
@@ -0,0 +1,15 @@
1
+ root = true
2
+
3
+ [*]
4
+ indent_style = space
5
+ indent_size = 4
6
+ end_of_line = lf
7
+ charset = utf-8
8
+ trim_trailing_whitespace = true
9
+ insert_final_newline = true
10
+
11
+ [{*.{yml,yaml,toml},.cruft.json}]
12
+ indent_size = 2
13
+
14
+ [Makefile]
15
+ indent_style = tab
@@ -0,0 +1,89 @@
1
+ name: Bug report
2
+ description: Report something that is broken or incorrect
3
+ labels: bug
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ **Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports)
9
+ detailing how to provide the necessary information for us to reproduce your bug. In brief:
10
+ * Please provide exact steps how to reproduce the bug in a clean Python environment.
11
+ * In case it's not clear what's causing this bug, please provide the data or the data generation procedure.
12
+ * Sometimes it is not possible to share the data, but usually it is possible to replicate problems on publicly
13
+ available datasets or to share a subset of your data.
14
+
15
+ - type: textarea
16
+ id: report
17
+ attributes:
18
+ label: Report
19
+ description: A clear and concise description of what the bug is.
20
+ validations:
21
+ required: true
22
+
23
+ - type: textarea
24
+ id: versions
25
+ attributes:
26
+ label: Version information
27
+ description: |
28
+ Please paste below the output of
29
+
30
+ ```python
31
+ import session_info
32
+ session_info.show(html=False, dependencies=True)
33
+ ```
34
+ placeholder: |
35
+ -----
36
+ anndata 0.8.0rc2.dev27+ge524389
37
+ session_info 1.0.0
38
+ -----
39
+ asttokens NA
40
+ awkward 1.8.0
41
+ backcall 0.2.0
42
+ cython_runtime NA
43
+ dateutil 2.8.2
44
+ debugpy 1.6.0
45
+ decorator 5.1.1
46
+ entrypoints 0.4
47
+ executing 0.8.3
48
+ h5py 3.7.0
49
+ ipykernel 6.15.0
50
+ jedi 0.18.1
51
+ mpl_toolkits NA
52
+ natsort 8.1.0
53
+ numpy 1.22.4
54
+ packaging 21.3
55
+ pandas 1.4.2
56
+ parso 0.8.3
57
+ pexpect 4.8.0
58
+ pickleshare 0.7.5
59
+ pkg_resources NA
60
+ prompt_toolkit 3.0.29
61
+ psutil 5.9.1
62
+ ptyprocess 0.7.0
63
+ pure_eval 0.2.2
64
+ pydev_ipython NA
65
+ pydevconsole NA
66
+ pydevd 2.8.0
67
+ pydevd_file_utils NA
68
+ pydevd_plugins NA
69
+ pydevd_tracing NA
70
+ pygments 2.12.0
71
+ pytz 2022.1
72
+ scipy 1.8.1
73
+ setuptools 62.5.0
74
+ setuptools_scm NA
75
+ six 1.16.0
76
+ stack_data 0.3.0
77
+ tornado 6.1
78
+ traitlets 5.3.0
79
+ wcwidth 0.2.5
80
+ zmq 23.1.0
81
+ -----
82
+ IPython 8.4.0
83
+ jupyter_client 7.3.4
84
+ jupyter_core 4.10.0
85
+ -----
86
+ Python 3.9.13 | packaged by conda-forge | (main, May 27 2022, 16:58:50) [GCC 10.3.0]
87
+ Linux-5.18.6-arch1-1-x86_64-with-glibc2.35
88
+ -----
89
+ Session information updated at 2022-07-07 17:55
@@ -0,0 +1,5 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Scverse Community Forum
4
+ url: https://discourse.scverse.org/
5
+ about: If you have questions about “How to do X”, please ask them here.
@@ -0,0 +1,11 @@
1
+ name: Feature request
2
+ description: Propose a new feature for Single-cell Genetics (Cellink)
3
+ labels: enhancement
4
+ body:
5
+ - type: textarea
6
+ id: description
7
+ attributes:
8
+ label: Description of feature
9
+ description: Please describe your suggestion for a new feature. It might help to describe a problem or use case, plus any alternatives that you have considered.
10
+ validations:
11
+ required: true
@@ -0,0 +1,29 @@
1
+ name: Check Build
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ package:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - name: Set up Python 3.12
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: "3.12"
22
+ cache: "pip"
23
+ cache-dependency-path: "**/pyproject.toml"
24
+ - name: Install build dependencies
25
+ run: python -m pip install --upgrade pip wheel twine build
26
+ - name: Build package
27
+ run: python -m build
28
+ - name: Check package
29
+ run: twine check --strict dist/*.whl
@@ -0,0 +1,29 @@
1
+ name: Release
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ # Use "trusted publishing", see https://docs.pypi.org/trusted-publishers/
8
+ jobs:
9
+ release:
10
+ name: Upload release to PyPI
11
+ runs-on: ubuntu-latest
12
+ environment:
13
+ name: pypi
14
+ url: https://pypi.org/p/cellink-tools
15
+ permissions:
16
+ id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ with:
20
+ filter: blob:none
21
+ fetch-depth: 0
22
+ - uses: actions/setup-python@v4
23
+ with:
24
+ python-version: "3.x"
25
+ cache: "pip"
26
+ - run: pip install build
27
+ - run: python -m build
28
+ - name: Publish package distributions to PyPI
29
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,46 @@
1
+ name: Run Notebooks
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ run:
18
+ runs-on: ubuntu-latest
19
+ strategy:
20
+ fail-fast: false
21
+ matrix:
22
+ # Only notebooks that run on synthetic data / tests/data and need nothing beyond pip.
23
+ notebook:
24
+ [
25
+ "docs/tutorials/donordata_basics.ipynb",
26
+ "docs/tutorials/formula_resolver.ipynb",
27
+ ]
28
+ steps:
29
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
30
+ with:
31
+ persist-credentials: false
32
+
33
+ - name: Set up Python
34
+ uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
35
+ with:
36
+ python-version: "3.13"
37
+
38
+ - name: Install UV
39
+ run: pip install uv
40
+
41
+ - name: Install cellink and notebook dependencies
42
+ # limix-core (pulled in by the `at` extra) imports pkg_resources and six without declaring them.
43
+ run: uv pip install --system ".[at,pgen,datasets]" "setuptools<82" six nbconvert ipykernel
44
+
45
+ - name: Run ${{ matrix.notebook }}
46
+ run: jupyter nbconvert --to notebook --execute ${{ matrix.notebook }}
@@ -0,0 +1,75 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ schedule:
9
+ - cron: "0 5 1,15 * *"
10
+
11
+ concurrency:
12
+ group: ${{ github.workflow }}-${{ github.ref }}
13
+ cancel-in-progress: true
14
+
15
+ jobs:
16
+ test:
17
+ runs-on: ${{ matrix.os }}
18
+ defaults:
19
+ run:
20
+ shell: bash -e {0} # -e to fail on error
21
+
22
+ strategy:
23
+ fail-fast: false
24
+ matrix:
25
+ # Every supported Python with the newest dependencies, plus one job with every direct
26
+ # dependency at its declared lower bound.
27
+ include:
28
+ - os: ubuntu-latest
29
+ python: "3.12"
30
+ resolution: highest
31
+ - os: ubuntu-latest
32
+ python: "3.13"
33
+ resolution: highest
34
+ - os: ubuntu-latest
35
+ python: "3.14"
36
+ resolution: highest
37
+ - os: ubuntu-latest
38
+ python: "3.12"
39
+ resolution: lowest-direct
40
+ name: "Minimum dependency versions"
41
+
42
+ name: ${{ matrix.name }} Python ${{ matrix.python }} (${{ matrix.resolution }})
43
+
44
+ env:
45
+ OS: ${{ matrix.os }}
46
+ PYTHON: ${{ matrix.python }}
47
+
48
+ steps:
49
+ - uses: actions/checkout@v4
50
+ - name: Set up Python ${{ matrix.python }}
51
+ uses: actions/setup-python@v5
52
+ with:
53
+ python-version: ${{ matrix.python }}
54
+
55
+ - name: Install uv
56
+ run: |
57
+ python -m pip install --upgrade pip uv
58
+ - name: Install dependencies
59
+ run: |
60
+ uv pip install --system --resolution ${{ matrix.resolution }} ".[at,datasets,pgen,dev,test]"
61
+ - name: Show installed versions
62
+ run: |
63
+ uv pip list --system
64
+ - name: Test
65
+ env:
66
+ MPLBACKEND: agg
67
+ PLATFORM: ${{ matrix.os }}
68
+ DISPLAY: :42
69
+ run: |
70
+ coverage run -m pytest -v --color=yes
71
+ - name: Report coverage
72
+ run: |
73
+ coverage report
74
+ - name: Upload coverage
75
+ uses: codecov/codecov-action@v3
@@ -0,0 +1,206 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
110
+ .pdm.toml
111
+ .pdm-python
112
+ .pdm-build/
113
+
114
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
115
+ __pypackages__/
116
+
117
+ # Celery stuff
118
+ celerybeat-schedule
119
+ celerybeat.pid
120
+
121
+ # SageMath parsed files
122
+ *.sage.py
123
+
124
+ # Environments
125
+ .env
126
+ .venv
127
+ env/
128
+ venv/
129
+ ENV/
130
+ env.bak/
131
+ venv.bak/
132
+
133
+ # Spyder project settings
134
+ .spyderproject
135
+ .spyproject
136
+
137
+ # Rope project settings
138
+ .ropeproject
139
+
140
+ # mkdocs documentation
141
+ /site
142
+
143
+ # mypy
144
+ .mypy_cache/
145
+ .dmypy.json
146
+ dmypy.json
147
+
148
+ # Pyre type checker
149
+ .pyre/
150
+
151
+ # pytype static type analyzer
152
+ .pytype/
153
+
154
+ # Cython debug symbols
155
+ cython_debug/
156
+
157
+ # PyCharm
158
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
159
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
160
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
161
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
162
+ #.idea/
163
+
164
+ # Temp files
165
+ .DS_Store
166
+ *~
167
+ buck-out/
168
+
169
+ # IDEs
170
+ /.idea/
171
+ /.vscode/
172
+
173
+ # Compiled files
174
+ .venv/
175
+ __pycache__/
176
+ .*cache/
177
+
178
+ # Distribution / packaging
179
+ /dist/
180
+
181
+ # Tests and coverage
182
+ /data/
183
+ /node_modules/
184
+
185
+ # docs
186
+ /docs/generated/
187
+ /docs/_build/
188
+
189
+ software
190
+ *.sqlite
191
+
192
+ misc
193
+ /docs/tutorials/data/
194
+ *.code-workspace
195
+
196
+ _build/*
197
+
198
+ checkpoints/
199
+ lightning_logs/
200
+ docs/tutorials/dd_G.zarr
201
+ docs/tutorials/dd_C.zarr
202
+ docs/tutorials/dd_G_collection.zarr
203
+ docs/tutorials/dd_C_collection.zarr
204
+ docs/tutorials/sceps_out/
205
+ docs/tutorials/work
206
+ *.tar.gz
@@ -0,0 +1,47 @@
1
+ fail_fast: false
2
+ default_language_version:
3
+ python: python3
4
+ default_stages:
5
+ - pre-commit
6
+ - pre-push
7
+ exclude: tests/data
8
+ minimum_pre_commit_version: 2.16.0
9
+ repos:
10
+ - repo: https://github.com/pre-commit/mirrors-prettier
11
+ rev: v4.0.0-alpha.8
12
+ hooks:
13
+ - id: prettier
14
+ - repo: https://github.com/tox-dev/pyproject-fmt
15
+ rev: "2.2.4"
16
+ hooks:
17
+ - id: pyproject-fmt
18
+ - repo: https://github.com/astral-sh/ruff-pre-commit
19
+ rev: v0.6.8
20
+ hooks:
21
+ - id: ruff
22
+ types_or: [python, pyi, jupyter]
23
+ args: [--fix, --exit-non-zero-on-fix]
24
+ - id: ruff-format
25
+ types_or: [python, pyi, jupyter]
26
+ - repo: https://github.com/pre-commit/pre-commit-hooks
27
+ rev: v4.6.0
28
+ hooks:
29
+ - id: detect-private-key
30
+ - id: check-ast
31
+ - id: end-of-file-fixer
32
+ - id: mixed-line-ending
33
+ args: [--fix=lf]
34
+ - id: trailing-whitespace
35
+ - id: check-case-conflict
36
+ # Check that there are no merge conflicts (could be generated by template sync)
37
+ - id: check-merge-conflict
38
+ args: [--assume-in-merge]
39
+ - repo: local
40
+ hooks:
41
+ - id: forbid-to-commit
42
+ name: Don't commit rej files
43
+ entry: |
44
+ Cannot commit .rej files. These indicate merge conflicts that arise during automated template updates.
45
+ Fix the merge conflicts manually and remove the .rej files.
46
+ language: fail
47
+ files: '.*\.rej$'
@@ -0,0 +1,19 @@
1
+ # https://docs.readthedocs.io/en/stable/config-file/v2.html
2
+ version: 2
3
+ build:
4
+ os: ubuntu-22.04
5
+ tools:
6
+ python: "3.12"
7
+ jobs:
8
+ post_install:
9
+ - pip install -e ".[doc,ml]"
10
+ sphinx:
11
+ configuration: docs/conf.py
12
+ # disable this for more lenient docs builds
13
+ fail_on_warning: false
14
+ python:
15
+ install:
16
+ - method: pip
17
+ path: .
18
+ extra_requirements:
19
+ - doc