lamindb 0.45a1__tar.gz → 0.46a1__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 (261) hide show
  1. {lamindb-0.45a1 → lamindb-0.46a1}/.github/workflows/build.yml +1 -1
  2. {lamindb-0.45a1 → lamindb-0.46a1}/.gitignore +1 -0
  3. {lamindb-0.45a1 → lamindb-0.46a1}/PKG-INFO +20 -17
  4. {lamindb-0.45a1 → lamindb-0.46a1}/README.md +15 -12
  5. {lamindb-0.45a1 → lamindb-0.46a1}/docs/biology/01-registries.ipynb +65 -6
  6. {lamindb-0.45a1 → lamindb-0.46a1}/docs/biology/02-scrna.ipynb +45 -143
  7. {lamindb-0.45a1 → lamindb-0.46a1}/docs/biology/03-flow.ipynb +3 -3
  8. {lamindb-0.45a1 → lamindb-0.46a1}/docs/changelog.md +28 -1
  9. {lamindb-0.45a1 → lamindb-0.46a1}/docs/faq/acid.ipynb +2 -2
  10. {lamindb-0.45a1 → lamindb-0.46a1}/docs/faq/idempotency.ipynb +1 -1
  11. {lamindb-0.45a1 → lamindb-0.46a1}/docs/faq/ingest.ipynb +0 -10
  12. {lamindb-0.45a1 → lamindb-0.46a1}/docs/faq/setup.ipynb +54 -15
  13. {lamindb-0.45a1 → lamindb-0.46a1}/docs/faq/track-run-inputs.ipynb +2 -2
  14. lamindb-0.45a1/docs/guide/01-files-records.ipynb → lamindb-0.46a1/docs/guide/01-tutorial1.ipynb +260 -34
  15. {lamindb-0.45a1 → lamindb-0.46a1}/docs/guide/index.md +2 -2
  16. {lamindb-0.45a1 → lamindb-0.46a1}/docs/lnschema-bionty.ipynb +2 -2
  17. {lamindb-0.45a1 → lamindb-0.46a1}/docs/storage/add-replace-stage.ipynb +13 -4
  18. {lamindb-0.45a1 → lamindb-0.46a1}/docs/storage/upload.ipynb +41 -1
  19. {lamindb-0.45a1 → lamindb-0.46a1}/lamindb/__init__.py +30 -9
  20. {lamindb-0.45a1 → lamindb-0.46a1}/lamindb/_context.py +11 -12
  21. lamindb-0.46a1/lamindb/_dataset.py +142 -0
  22. {lamindb-0.45a1 → lamindb-0.46a1}/lamindb/_delete.py +6 -6
  23. lamindb-0.46a1/lamindb/_feature_set.py +138 -0
  24. {lamindb-0.45a1 → lamindb-0.46a1}/lamindb/_file.py +322 -81
  25. {lamindb-0.45a1 → lamindb-0.46a1}/lamindb/_from_values.py +57 -160
  26. lamindb-0.46a1/lamindb/_orm.py +398 -0
  27. {lamindb-0.45a1 → lamindb-0.46a1}/lamindb/_save.py +26 -10
  28. {lamindb-0.45a1 → lamindb-0.46a1}/lamindb/_select.py +3 -3
  29. {lamindb-0.45a1 → lamindb-0.46a1}/lamindb/_view.py +2 -2
  30. {lamindb-0.45a1 → lamindb-0.46a1}/lamindb/dev/__init__.py +2 -2
  31. {lamindb-0.45a1 → lamindb-0.46a1}/lamindb/dev/_settings.py +2 -1
  32. {lamindb-0.45a1 → lamindb-0.46a1}/lamindb/dev/datasets/__init__.py +6 -0
  33. {lamindb-0.45a1 → lamindb-0.46a1}/lamindb/dev/datasets/_core.py +30 -0
  34. {lamindb-0.45a1 → lamindb-0.46a1}/lamindb/dev/hashing.py +4 -0
  35. {lamindb-0.45a1 → lamindb-0.46a1}/lamindb/dev/storage/__init__.py +4 -3
  36. {lamindb-0.45a1 → lamindb-0.46a1}/lamindb/dev/storage/_backed_access.py +3 -3
  37. lamindb-0.45a1/lamindb/dev/storage/_file.py → lamindb-0.46a1/lamindb/dev/storage/file.py +48 -3
  38. lamindb-0.45a1/lamindb/dev/storage/_object.py → lamindb-0.46a1/lamindb/dev/storage/object.py +1 -0
  39. lamindb-0.46a1/lamindb/dev/utils.py +9 -0
  40. lamindb-0.46a1/lamindb/types.py +18 -0
  41. {lamindb-0.45a1 → lamindb-0.46a1}/pyproject.toml +4 -4
  42. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/docs/changelog.md +3 -0
  43. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/__init__.py +2 -1
  44. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/_check_instance_setup.py +5 -4
  45. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/_init_instance.py +15 -1
  46. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/_load_instance.py +15 -1
  47. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/_notebook.py +2 -2
  48. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/_set.py +6 -5
  49. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/dev/_django.py +5 -6
  50. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/dev/_settings_instance.py +2 -2
  51. {lamindb-0.45a1/sub → lamindb-0.46a1/sub/lamindb-setup}/lnschema-core/.pre-commit-config.yaml +1 -1
  52. {lamindb-0.45a1/sub → lamindb-0.46a1/sub/lamindb-setup}/lnschema-core/CHANGELOG.md +4 -0
  53. {lamindb-0.45a1/sub → lamindb-0.46a1/sub/lamindb-setup}/lnschema-core/lnschema_core/__init__.py +4 -3
  54. {lamindb-0.45a1/sub → lamindb-0.46a1/sub/lamindb-setup}/lnschema-core/lnschema_core/ids.py +27 -17
  55. lamindb-0.46a1/sub/lamindb-setup/lnschema-core/lnschema_core/migrations/0005_alter_run_inputs_delete_runinput.py +24 -0
  56. lamindb-0.46a1/sub/lamindb-setup/lnschema-core/lnschema_core/migrations/0006_feature_dataset.py +65 -0
  57. lamindb-0.46a1/sub/lamindb-setup/lnschema-core/lnschema_core/models.py +571 -0
  58. {lamindb-0.45a1/sub → lamindb-0.46a1/sub/lamindb-setup}/lnschema-core/lnschema_core/types.py +8 -1
  59. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-bionty/docs/changelog.md +6 -0
  60. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-bionty/lnschema_bionty/__init__.py +16 -2
  61. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-bionty/lnschema_bionty/_bionty.py +56 -39
  62. lamindb-0.46a1/sub/lnschema-bionty/lnschema_bionty/dev/__init__.py +9 -0
  63. lamindb-0.46a1/sub/lnschema-bionty/lnschema_bionty/dev/_settings.py +43 -0
  64. lamindb-0.46a1/sub/lnschema-bionty/lnschema_bionty/migrations/0005_rename_short_name_cellline_abbr_and_more.py +137 -0
  65. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-bionty/lnschema_bionty/models.py +157 -121
  66. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-bionty/pyproject.toml +2 -2
  67. lamindb-0.46a1/sub/lnschema-core/.github/workflows/build.yml +34 -0
  68. {lamindb-0.45a1/sub/lnschema-bionty → lamindb-0.46a1/sub/lnschema-core}/.github/workflows/latest-changes.yml +1 -1
  69. {lamindb-0.45a1/sub/lamindb-setup → lamindb-0.46a1/sub}/lnschema-core/.pre-commit-config.yaml +1 -1
  70. lamindb-0.45a1/sub/lamindb-setup/lnschema-core/docs/changelog.md → lamindb-0.46a1/sub/lnschema-core/CHANGELOG.md +33 -5
  71. lamindb-0.46a1/sub/lnschema-core/README.md +5 -0
  72. {lamindb-0.45a1/sub/lamindb-setup → lamindb-0.46a1/sub}/lnschema-core/lnschema_core/__init__.py +9 -10
  73. lamindb-0.46a1/sub/lnschema-core/lnschema_core/_queryset.py +58 -0
  74. lamindb-0.46a1/sub/lnschema-core/lnschema_core/ids.py +94 -0
  75. {lamindb-0.45a1/sub/lamindb-setup → lamindb-0.46a1/sub}/lnschema-core/lnschema_core/migrations/0001_initial.py +40 -65
  76. lamindb-0.46a1/sub/lnschema-core/lnschema_core/migrations/0002_alter_user_name.py +17 -0
  77. lamindb-0.46a1/sub/lnschema-core/lnschema_core/migrations/0003_alter_storage_region_alter_transform_short_name.py +22 -0
  78. lamindb-0.46a1/sub/lnschema-core/lnschema_core/migrations/0004_rename_folder_tag_alter_project_folders.py +62 -0
  79. lamindb-0.46a1/sub/lnschema-core/lnschema_core/migrations/0005_alter_run_inputs_delete_runinput.py +24 -0
  80. lamindb-0.46a1/sub/lnschema-core/lnschema_core/migrations/0006_feature_dataset.py +65 -0
  81. lamindb-0.46a1/sub/lnschema-core/lnschema_core/migrations/0007_feature_synonyms_featureset_field_and_more.py +33 -0
  82. lamindb-0.46a1/sub/lnschema-core/lnschema_core/models.py +824 -0
  83. lamindb-0.46a1/sub/lnschema-core/lnschema_core/types.py +46 -0
  84. lamindb-0.45a1/sub/lamindb-setup/lnschema-core/lnschema_core/_users.py → lamindb-0.46a1/sub/lnschema-core/lnschema_core/users.py +0 -6
  85. lamindb-0.46a1/sub/lnschema-core/noxfile.py +16 -0
  86. {lamindb-0.45a1/sub/lamindb-setup → lamindb-0.46a1/sub}/lnschema-core/pyproject.toml +2 -2
  87. lamindb-0.46a1/sub/lnschema-core/tests/test_integrity.py +13 -0
  88. {lamindb-0.45a1 → lamindb-0.46a1}/tests/conftest.py +7 -2
  89. lamindb-0.46a1/tests/test_dataset.py +64 -0
  90. lamindb-0.46a1/tests/test_feature_set.py +60 -0
  91. lamindb-0.46a1/tests/test_file.py +199 -0
  92. {lamindb-0.45a1 → lamindb-0.46a1}/tests/test_from_values.py +22 -0
  93. {lamindb-0.45a1 → lamindb-0.46a1}/tests/test_hashing.py +5 -2
  94. lamindb-0.46a1/tests/test_orm.py +38 -0
  95. lamindb-0.45a1/tests/test_switch_storage.py → lamindb-0.46a1/tests/test_settings.py +1 -1
  96. {lamindb-0.45a1 → lamindb-0.46a1}/tests/test_storage.py +1 -1
  97. lamindb-0.45a1/lamindb/_baseorm_methods.py +0 -535
  98. lamindb-0.45a1/lamindb/_featureset_methods.py +0 -73
  99. lamindb-0.45a1/lamindb/_file_access.py +0 -48
  100. lamindb-0.45a1/lamindb/_file_methods.py +0 -319
  101. lamindb-0.45a1/lamindb/types.py +0 -10
  102. lamindb-0.45a1/sub/lamindb-setup/lnschema-core/.github/workflows/build.yml +0 -88
  103. lamindb-0.45a1/sub/lamindb-setup/lnschema-core/.gitmodules +0 -0
  104. lamindb-0.45a1/sub/lamindb-setup/lnschema-core/README.md +0 -6
  105. lamindb-0.45a1/sub/lamindb-setup/lnschema-core/docs/guide/core-schema.ipynb +0 -87
  106. lamindb-0.45a1/sub/lamindb-setup/lnschema-core/docs/guide/index.md +0 -7
  107. lamindb-0.45a1/sub/lamindb-setup/lnschema-core/docs/index.md +0 -11
  108. lamindb-0.45a1/sub/lamindb-setup/lnschema-core/lamin-project.yaml +0 -5
  109. lamindb-0.45a1/sub/lamindb-setup/lnschema-core/lnschema_core/_lookup.py +0 -43
  110. lamindb-0.45a1/sub/lamindb-setup/lnschema-core/lnschema_core/_types.py +0 -35
  111. lamindb-0.45a1/sub/lamindb-setup/lnschema-core/lnschema_core/ids.py +0 -142
  112. lamindb-0.45a1/sub/lamindb-setup/lnschema-core/lnschema_core/models.py +0 -666
  113. lamindb-0.45a1/sub/lamindb-setup/lnschema-core/lnschema_core/types.py +0 -12
  114. lamindb-0.45a1/sub/lamindb-setup/lnschema-core/noxfile.py +0 -36
  115. lamindb-0.45a1/sub/lamindb-setup/lnschema-core/tests/test_notebooks.py +0 -16
  116. lamindb-0.45a1/sub/lnschema-core/lnschema_core/models.py +0 -316
  117. lamindb-0.45a1/tests/test_baseorm.py +0 -17
  118. lamindb-0.45a1/tests/test_file_class.py +0 -76
  119. lamindb-0.45a1/tests/test_file_storage.py +0 -60
  120. {lamindb-0.45a1 → lamindb-0.46a1}/.github/workflows/latest-changes.jinja2 +0 -0
  121. {lamindb-0.45a1 → lamindb-0.46a1}/.github/workflows/latest-changes.yml +0 -0
  122. {lamindb-0.45a1 → lamindb-0.46a1}/.gitmodules +0 -0
  123. {lamindb-0.45a1 → lamindb-0.46a1}/.pre-commit-config.yaml +0 -0
  124. {lamindb-0.45a1 → lamindb-0.46a1}/LICENSE +0 -0
  125. {lamindb-0.45a1 → lamindb-0.46a1}/docs/biology/04-samples.ipynb +0 -0
  126. {lamindb-0.45a1 → lamindb-0.46a1}/docs/biology/features.md +0 -0
  127. {lamindb-0.45a1 → lamindb-0.46a1}/docs/biology/test_notebooks.py +0 -0
  128. {lamindb-0.45a1 → lamindb-0.46a1}/docs/faq/index.md +0 -0
  129. {lamindb-0.45a1 → lamindb-0.46a1}/docs/faq/notebooks.ipynb +0 -0
  130. {lamindb-0.45a1 → lamindb-0.46a1}/docs/faq/test_notebooks.py +0 -0
  131. {lamindb-0.45a1 → lamindb-0.46a1}/docs/guide/02-data-lineage.ipynb +0 -0
  132. {lamindb-0.45a1 → lamindb-0.46a1}/docs/guide/03-select.ipynb +0 -0
  133. {lamindb-0.45a1 → lamindb-0.46a1}/docs/guide/04-stream.ipynb +0 -0
  134. {lamindb-0.45a1 → lamindb-0.46a1}/docs/guide/05-schemas.ipynb +0 -0
  135. {lamindb-0.45a1 → lamindb-0.46a1}/docs/guide/06-configure.ipynb +0 -0
  136. {lamindb-0.45a1 → lamindb-0.46a1}/docs/guide/test_notebooks.py +0 -0
  137. {lamindb-0.45a1 → lamindb-0.46a1}/docs/index.md +0 -0
  138. {lamindb-0.45a1 → lamindb-0.46a1}/docs/ref/bionty.md +0 -0
  139. {lamindb-0.45a1 → lamindb-0.46a1}/docs/ref/lamindb.md +0 -0
  140. {lamindb-0.45a1 → lamindb-0.46a1}/docs/ref/lnschema-bionty.md +0 -0
  141. {lamindb-0.45a1 → lamindb-0.46a1}/docs/reference.md +0 -0
  142. {lamindb-0.45a1 → lamindb-0.46a1}/docs/storage/index.md +0 -0
  143. {lamindb-0.45a1 → lamindb-0.46a1}/docs/storage/test-files/iris.csv +0 -0
  144. {lamindb-0.45a1 → lamindb-0.46a1}/docs/storage/test-files/iris.data +0 -0
  145. {lamindb-0.45a1 → lamindb-0.46a1}/docs/storage/test-files/new_iris.csv +0 -0
  146. {lamindb-0.45a1 → lamindb-0.46a1}/docs/storage/test_notebooks.py +0 -0
  147. {lamindb-0.45a1 → lamindb-0.46a1}/lamin-project.yaml +0 -0
  148. {lamindb-0.45a1 → lamindb-0.46a1}/lamindb/_logger.py +0 -0
  149. /lamindb-0.45a1/lamindb/_transform_methods.py → /lamindb-0.46a1/lamindb/_transform.py +0 -0
  150. {lamindb-0.45a1 → lamindb-0.46a1}/lamindb/dev/datasets/_fake.py +0 -0
  151. {lamindb-0.45a1 → lamindb-0.46a1}/lamindb/dev/storage/_anndata_sizes.py +0 -0
  152. {lamindb-0.45a1 → lamindb-0.46a1}/lamindb/dev/storage/_zarr.py +0 -0
  153. {lamindb-0.45a1 → lamindb-0.46a1}/lamindb/schema/__init__.py +0 -0
  154. {lamindb-0.45a1 → lamindb-0.46a1}/lamindb/schema/_core.py +0 -0
  155. {lamindb-0.45a1 → lamindb-0.46a1}/lamindb/setup/__init__.py +0 -0
  156. {lamindb-0.45a1 → lamindb-0.46a1}/lamindb/setup/dev/__init__.py +0 -0
  157. {lamindb-0.45a1 → lamindb-0.46a1}/noxfile.py +0 -0
  158. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/.github/workflows/build.yml +0 -0
  159. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/.github/workflows/latest-changes.jinja2 +0 -0
  160. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/.github/workflows/latest-changes.yml +0 -0
  161. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/.gitignore +0 -0
  162. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/.gitmodules +0 -0
  163. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/.pre-commit-config.yaml +0 -0
  164. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/LICENSE +0 -0
  165. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/README.md +0 -0
  166. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/docs/faq/edge-cases-login-init.ipynb +0 -0
  167. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/docs/faq/index.md +0 -0
  168. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/docs/faq/switch-environment.ipynb +0 -0
  169. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/docs/faq/test-sqlite-sync.ipynb +0 -0
  170. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/docs/guide/01-init-instance.ipynb +0 -0
  171. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/docs/guide/02-load-instance.ipynb +0 -0
  172. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/docs/guide/03-set-storage.ipynb +0 -0
  173. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/docs/guide/04-schema-modules.ipynb +0 -0
  174. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/docs/guide/index.md +0 -0
  175. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/docs/guide/migrate.md +0 -0
  176. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/docs/guide/setup-user.md +0 -0
  177. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/docs/index.md +0 -0
  178. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/docs/reference.md +0 -0
  179. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/docs/test_notebooks.py +0 -0
  180. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamin-project.yaml +0 -0
  181. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/__main__.py +0 -0
  182. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/_close.py +0 -0
  183. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/_delete.py +0 -0
  184. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/_docstrings.py +0 -0
  185. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/_info.py +0 -0
  186. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/_migrate.py +0 -0
  187. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/_register_instance.py +0 -0
  188. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/_schema.py +0 -0
  189. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/_settings.py +0 -0
  190. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/_settings_load.py +0 -0
  191. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/_settings_store.py +0 -0
  192. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/_setup_user.py +0 -0
  193. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/_silence_loggers.py +0 -0
  194. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/dev/__init__.py +0 -0
  195. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/dev/_cloud_sqlite_locker.py +0 -0
  196. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/dev/_deprecated.py +0 -0
  197. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/dev/_docs.py +0 -0
  198. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/dev/_hub_client.py +0 -0
  199. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/dev/_hub_core.py +0 -0
  200. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/dev/_hub_crud.py +0 -0
  201. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/dev/_hub_utils.py +0 -0
  202. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/dev/_settings_load.py +0 -0
  203. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/dev/_settings_save.py +0 -0
  204. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/dev/_settings_store.py +0 -0
  205. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/dev/_settings_user.py +0 -0
  206. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/dev/_setup_bionty_sources.py +0 -0
  207. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/dev/_setup_schema.py +0 -0
  208. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/dev/_storage.py +0 -0
  209. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lamindb_setup/dev/upath.py +0 -0
  210. {lamindb-0.45a1/sub → lamindb-0.46a1/sub/lamindb-setup}/lnschema-core/.github/workflows/build.yml +0 -0
  211. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lnschema-core/.github/workflows/latest-changes.jinja2 +0 -0
  212. {lamindb-0.45a1/sub → lamindb-0.46a1/sub/lamindb-setup}/lnschema-core/.github/workflows/latest-changes.yml +0 -0
  213. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lnschema-core/.gitignore +0 -0
  214. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lnschema-core/LICENSE +0 -0
  215. {lamindb-0.45a1/sub → lamindb-0.46a1/sub/lamindb-setup}/lnschema-core/README.md +0 -0
  216. {lamindb-0.45a1/sub → lamindb-0.46a1/sub/lamindb-setup}/lnschema-core/lnschema_core/_queryset.py +0 -0
  217. {lamindb-0.45a1/sub → lamindb-0.46a1/sub/lamindb-setup}/lnschema-core/lnschema_core/migrations/0001_initial.py +0 -0
  218. {lamindb-0.45a1/sub → lamindb-0.46a1/sub/lamindb-setup}/lnschema-core/lnschema_core/migrations/0002_alter_user_name.py +0 -0
  219. {lamindb-0.45a1/sub → lamindb-0.46a1/sub/lamindb-setup}/lnschema-core/lnschema_core/migrations/0003_alter_storage_region_alter_transform_short_name.py +0 -0
  220. {lamindb-0.45a1/sub → lamindb-0.46a1/sub/lamindb-setup}/lnschema-core/lnschema_core/migrations/0004_rename_folder_tag_alter_project_folders.py +0 -0
  221. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/lnschema-core/lnschema_core/migrations/__init__.py +0 -0
  222. {lamindb-0.45a1/sub → lamindb-0.46a1/sub/lamindb-setup}/lnschema-core/lnschema_core/users.py +0 -0
  223. {lamindb-0.45a1/sub → lamindb-0.46a1/sub/lamindb-setup}/lnschema-core/noxfile.py +0 -0
  224. {lamindb-0.45a1/sub → lamindb-0.46a1/sub/lamindb-setup}/lnschema-core/pyproject.toml +0 -0
  225. {lamindb-0.45a1/sub → lamindb-0.46a1/sub/lamindb-setup}/lnschema-core/tests/test_integrity.py +0 -0
  226. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/noxfile.py +0 -0
  227. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/pyproject.toml +0 -0
  228. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/tests/hub/test_instance.py +0 -0
  229. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/tests/hub/test_signup_signin.py +0 -0
  230. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/tests/hub/test_storage.py +0 -0
  231. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/tests/test_bionty.py +0 -0
  232. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/tests/test_init_instance.py +0 -0
  233. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/tests/test_load_instance.py +0 -0
  234. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/tests/test_login.py +0 -0
  235. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/tests/test_migrate.py +0 -0
  236. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/tests/test_set_storage.py +0 -0
  237. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lamindb-setup/tests/test_signup.py +0 -0
  238. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-bionty/.github/workflows/build.yml +0 -0
  239. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-bionty/.github/workflows/latest-changes.jinja2 +0 -0
  240. {lamindb-0.45a1/sub/lamindb-setup/lnschema-core → lamindb-0.46a1/sub/lnschema-bionty}/.github/workflows/latest-changes.yml +0 -0
  241. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-bionty/.gitignore +0 -0
  242. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-bionty/.pre-commit-config.yaml +0 -0
  243. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-bionty/LICENSE +0 -0
  244. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-bionty/README.md +0 -0
  245. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-bionty/docs/index.md +0 -0
  246. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-bionty/docs/reference.md +0 -0
  247. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-bionty/lamin-project.yaml +0 -0
  248. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-bionty/lnschema_bionty/ids.py +0 -0
  249. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-bionty/lnschema_bionty/migrations/0001_initial.py +0 -0
  250. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-bionty/lnschema_bionty/migrations/0002_rename_gene_type_gene_biotype_and_more.py +0 -0
  251. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-bionty/lnschema_bionty/migrations/0003_alter_biontysource_entity_alter_biontysource_source_and_more.py +0 -0
  252. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-bionty/lnschema_bionty/migrations/0004_alter_cellline_bionty_source_and_more.py +0 -0
  253. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-bionty/lnschema_bionty/migrations/__init__.py +0 -0
  254. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-bionty/noxfile.py +0 -0
  255. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-bionty/tests/test_hash_id.py +0 -0
  256. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-core/.github/workflows/latest-changes.jinja2 +0 -0
  257. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-core/.gitignore +0 -0
  258. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-core/LICENSE +0 -0
  259. {lamindb-0.45a1 → lamindb-0.46a1}/sub/lnschema-core/lnschema_core/migrations/__init__.py +0 -0
  260. {lamindb-0.45a1 → lamindb-0.46a1}/tests/test-files/pbmc68k.h5ad +0 -0
  261. {lamindb-0.45a1 → lamindb-0.46a1}/tests/test_db.py +0 -0
@@ -21,7 +21,7 @@ jobs:
21
21
  - "biology"
22
22
  - "faq"
23
23
  - "storage"
24
- timeout-minutes: 25
24
+ timeout-minutes: 10
25
25
 
26
26
  steps:
27
27
  - uses: actions/checkout@v3
@@ -35,6 +35,7 @@ docs/faq/tostore/
35
35
  docs/faq/mydata_postgres/
36
36
  docs/guide/myobjects/
37
37
  docs/faq/test-run-inputs/
38
+ docs/intro/paradisi05_laminopathic_nuclei.jpg
38
39
 
39
40
  # General
40
41
  .DS_Store
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lamindb
3
- Version: 0.45a1
3
+ Version: 0.46a1
4
4
  Summary: LaminDB: Manage R&D data & analyses.
5
5
  Author-email: Lamin Labs <laminlabs@gmail.com>
6
6
  Requires-Python: >=3.8
@@ -8,9 +8,9 @@ Description-Content-Type: text/markdown
8
8
  Classifier: Programming Language :: Python :: 3.8
9
9
  Classifier: Programming Language :: Python :: 3.9
10
10
  Classifier: Programming Language :: Python :: 3.10
11
- Requires-Dist: lnschema_core==0.36.1
12
- Requires-Dist: lamindb_setup==0.47.11
13
- Requires-Dist: lamin_logger==0.7.1
11
+ Requires-Dist: lnschema_core==0.38.0
12
+ Requires-Dist: lamindb_setup==0.48.1
13
+ Requires-Dist: lamin_logger==0.7.4
14
14
  Requires-Dist: erdiagram>=0.1.2
15
15
  Requires-Dist: rapidfuzz
16
16
  Requires-Dist: pydantic[dotenv]
@@ -24,7 +24,7 @@ Requires-Dist: pandas
24
24
  Requires-Dist: botocore==1.29.76 ; extra == "aws"
25
25
  Requires-Dist: boto3==1.26.76 ; extra == "aws"
26
26
  Requires-Dist: fsspec[s3]==2023.5.0 ; extra == "aws"
27
- Requires-Dist: lnschema_bionty==0.24.0 ; extra == "bionty"
27
+ Requires-Dist: lnschema_bionty==0.25.5 ; extra == "bionty"
28
28
  Requires-Dist: readfcs>=1.1.3 ; extra == "fcs"
29
29
  Requires-Dist: fsspec[gs]==2023.5.0 ; extra == "gcp"
30
30
  Requires-Dist: nbproject>=0.9.0 ; extra == "jupyter"
@@ -57,7 +57,9 @@ Provides-Extra: zarr
57
57
 
58
58
  # LaminDB
59
59
 
60
- Open-source data lake to manage your existing data in your existing infrastructure.
60
+ Open-source data lake, warehouse & feature store for biology.
61
+
62
+ Manage your existing data & analyses in your existing infrastructure.
61
63
 
62
64
  ```{warning}
63
65
 
@@ -69,21 +71,22 @@ Update 2023-06-14:
69
71
  - The last version before the migration is 0.41.2.
70
72
  ```
71
73
 
72
- ## Features
74
+ ## What?
73
75
 
74
- Free:
76
+ LaminDB is a free & open-source Python library allowing you to:
75
77
 
76
- - Track [data lineage](https://lamin.ai/docs/guide/data-lineage) across notebooks, pipelines & apps.
77
- - Manage [biological registries, ontologies & features](https://lamin.ai/docs/biology/registries).
78
- - [Query, search & look up anything](https://lamin.ai/docs/guide/select), [manage & migrate custom schemas](https://lamin.ai/docs/setup/migrate).
79
- - [Persist, load](https://lamin.ai/docs/guide/files-records#in-memory-objects) & [stream data objects](https://lamin.ai/docs/guide/stream) with a single line of code.
80
- - [Idempotent](https://lamin.ai/docs/faq/idempotency) and [ACID](https://lamin.ai/docs/faq/acid) operations.
81
- - Use a mesh of LaminDB instances and [share them in a hub](https://lamin.ai/laminlabs) akin to GitHub.
78
+ - Manage files & datasets while tracking [provenance](https://lamin.ai/docs/guide/data-lineage) across pipelines, notebooks & apps.
79
+ - Manage biological [registries](https://lamin.ai/docs/biology/registries), [ontologies](https://lamin.ai/docs/bionty/) & features.
80
+ - Rely on integrity & quality through largely automated data validation and [idempotent](https://lamin.ai/docs/faq/idempotency) & [ACID](https://lamin.ai/docs/faq/acid) operations.
81
+ - Use a simple API for common tasks like:
82
+ - [Queries, searches & look ups](https://lamin.ai/docs/guide/select).
83
+ - Saving, loading & [streaming](https://lamin.ai/docs/guide/stream) of data objects.
84
+ - Collaborate across a mesh of LaminDB instances ([share them in a hub](https://lamin.ai/laminlabs) akin to GitHub).
82
85
 
83
- Enterprise:
86
+ You can combine LaminDB with LaminApp & consulting services on an enterprise plan:
84
87
 
85
- - Explore, share data & submit samples with LaminApp (deployable in your infrastructure).
86
- - Receive support, code templates & services for a BioTech data & analytics platform.
88
+ - LaminApp: Explore & collaborate on data in a UI (deployable in your infrastructure).
89
+ - Services: Support & code templates for a BioTech data & analytics platform.
87
90
 
88
91
  ## Usage overview
89
92
 
@@ -5,7 +5,9 @@
5
5
 
6
6
  # LaminDB
7
7
 
8
- Open-source data lake to manage your existing data in your existing infrastructure.
8
+ Open-source data lake, warehouse & feature store for biology.
9
+
10
+ Manage your existing data & analyses in your existing infrastructure.
9
11
 
10
12
  ```{warning}
11
13
 
@@ -17,21 +19,22 @@ Update 2023-06-14:
17
19
  - The last version before the migration is 0.41.2.
18
20
  ```
19
21
 
20
- ## Features
22
+ ## What?
21
23
 
22
- Free:
24
+ LaminDB is a free & open-source Python library allowing you to:
23
25
 
24
- - Track [data lineage](https://lamin.ai/docs/guide/data-lineage) across notebooks, pipelines & apps.
25
- - Manage [biological registries, ontologies & features](https://lamin.ai/docs/biology/registries).
26
- - [Query, search & look up anything](https://lamin.ai/docs/guide/select), [manage & migrate custom schemas](https://lamin.ai/docs/setup/migrate).
27
- - [Persist, load](https://lamin.ai/docs/guide/files-records#in-memory-objects) & [stream data objects](https://lamin.ai/docs/guide/stream) with a single line of code.
28
- - [Idempotent](https://lamin.ai/docs/faq/idempotency) and [ACID](https://lamin.ai/docs/faq/acid) operations.
29
- - Use a mesh of LaminDB instances and [share them in a hub](https://lamin.ai/laminlabs) akin to GitHub.
26
+ - Manage files & datasets while tracking [provenance](https://lamin.ai/docs/guide/data-lineage) across pipelines, notebooks & apps.
27
+ - Manage biological [registries](https://lamin.ai/docs/biology/registries), [ontologies](https://lamin.ai/docs/bionty/) & features.
28
+ - Rely on integrity & quality through largely automated data validation and [idempotent](https://lamin.ai/docs/faq/idempotency) & [ACID](https://lamin.ai/docs/faq/acid) operations.
29
+ - Use a simple API for common tasks like:
30
+ - [Queries, searches & look ups](https://lamin.ai/docs/guide/select).
31
+ - Saving, loading & [streaming](https://lamin.ai/docs/guide/stream) of data objects.
32
+ - Collaborate across a mesh of LaminDB instances ([share them in a hub](https://lamin.ai/laminlabs) akin to GitHub).
30
33
 
31
- Enterprise:
34
+ You can combine LaminDB with LaminApp & consulting services on an enterprise plan:
32
35
 
33
- - Explore, share data & submit samples with LaminApp (deployable in your infrastructure).
34
- - Receive support, code templates & services for a BioTech data & analytics platform.
36
+ - LaminApp: Explore & collaborate on data in a UI (deployable in your infrastructure).
37
+ - Services: Support & code templates for a BioTech data & analytics platform.
35
38
 
36
39
  ## Usage overview
37
40
 
@@ -185,7 +185,24 @@
185
185
  "cell_type": "markdown",
186
186
  "metadata": {},
187
187
  "source": [
188
- "Save it to the DB to seed an in-house ontology:"
188
+ "Note that this ontology has `parents`, and therefore the parent records will also be added to the DB upon save:"
189
+ ]
190
+ },
191
+ {
192
+ "cell_type": "code",
193
+ "execution_count": null,
194
+ "metadata": {},
195
+ "outputs": [],
196
+ "source": [
197
+ "gd_tcell.parents"
198
+ ]
199
+ },
200
+ {
201
+ "attachments": {},
202
+ "cell_type": "markdown",
203
+ "metadata": {},
204
+ "source": [
205
+ "Save the record to the DB to seed an in-house ontology:"
189
206
  ]
190
207
  },
191
208
  {
@@ -211,7 +228,25 @@
211
228
  "metadata": {},
212
229
  "outputs": [],
213
230
  "source": [
214
- "lb.CellType.select(name=celltype_record.name).one()"
231
+ "gd_tcell_record = lb.CellType.select(name=celltype_record.name).one()\n",
232
+ "gd_tcell_record"
233
+ ]
234
+ },
235
+ {
236
+ "attachments": {},
237
+ "cell_type": "markdown",
238
+ "metadata": {},
239
+ "source": [
240
+ "Access its direct parents:"
241
+ ]
242
+ },
243
+ {
244
+ "cell_type": "code",
245
+ "execution_count": null,
246
+ "metadata": {},
247
+ "outputs": [],
248
+ "source": [
249
+ "gd_tcell_record.parents.all()"
215
250
  ]
216
251
  },
217
252
  {
@@ -219,7 +254,33 @@
219
254
  "cell_type": "markdown",
220
255
  "metadata": {},
221
256
  "source": [
222
- "You can now work with a lookup object with much less terms: `lb.CellType.lookup()`"
257
+ "Query for all the parents with a specified distance:"
258
+ ]
259
+ },
260
+ {
261
+ "cell_type": "code",
262
+ "execution_count": null,
263
+ "metadata": {
264
+ "tags": [
265
+ "hide-cell"
266
+ ]
267
+ },
268
+ "outputs": [],
269
+ "source": [
270
+ "distance = 5\n",
271
+ "\n",
272
+ "results = []\n",
273
+ "for d in range(1, distance + 1):\n",
274
+ " msg = f\"Depth = {d}\"\n",
275
+ " if d == 1:\n",
276
+ " condition = \"children__name\"\n",
277
+ " else:\n",
278
+ " condition = \"children__\" + condition\n",
279
+ " records = lb.CellType.select(**{condition: gd_tcell_record.name}).list()\n",
280
+ " msg += f\", {len(records)} records found:\"\n",
281
+ " print(msg)\n",
282
+ " print(records)\n",
283
+ " results.append(records)"
223
284
  ]
224
285
  },
225
286
  {
@@ -235,8 +296,6 @@
235
296
  "cell_type": "markdown",
236
297
  "metadata": {},
237
298
  "source": [
238
- "Often, you want to parse records from data and map it onto a reference. {func}`~lamindb.parse` takes any iterable and maps it on your in-house reference.\n",
239
- "\n",
240
299
  "Consider a DataFrame-based example:"
241
300
  ]
242
301
  },
@@ -396,7 +455,7 @@
396
455
  "metadata": {},
397
456
  "outputs": [],
398
457
  "source": [
399
- "ln.save(cell_types);"
458
+ "ln.save(cell_types)"
400
459
  ]
401
460
  },
402
461
  {
@@ -5,7 +5,7 @@
5
5
  "cell_type": "markdown",
6
6
  "metadata": {},
7
7
  "source": [
8
- "# Track features in scRNA-seq data"
8
+ "# Track features in scRNA-seq"
9
9
  ]
10
10
  },
11
11
  {
@@ -38,29 +38,7 @@
38
38
  "cell_type": "markdown",
39
39
  "metadata": {},
40
40
  "source": [
41
- "Consider an scRNA-seq count matrix in form of an `AnnData` object in memory:"
42
- ]
43
- },
44
- {
45
- "cell_type": "code",
46
- "execution_count": null,
47
- "metadata": {
48
- "tags": [
49
- "hide-cell"
50
- ]
51
- },
52
- "outputs": [],
53
- "source": [
54
- "adata = ln.dev.datasets.anndata_mouse_sc_lymph_node()"
55
- ]
56
- },
57
- {
58
- "cell_type": "code",
59
- "execution_count": null,
60
- "metadata": {},
61
- "outputs": [],
62
- "source": [
63
- "adata"
41
+ "## Track"
64
42
  ]
65
43
  },
66
44
  {
@@ -68,7 +46,7 @@
68
46
  "cell_type": "markdown",
69
47
  "metadata": {},
70
48
  "source": [
71
- "The feature identifiers of this dataset are stored in a `DataFrame`:"
49
+ "We're working with mouse data, so let's set a context:"
72
50
  ]
73
51
  },
74
52
  {
@@ -77,7 +55,7 @@
77
55
  "metadata": {},
78
56
  "outputs": [],
79
57
  "source": [
80
- "adata.var.head()"
58
+ "lb.settings.species = \"mouse\""
81
59
  ]
82
60
  },
83
61
  {
@@ -85,51 +63,20 @@
85
63
  "cell_type": "markdown",
86
64
  "metadata": {},
87
65
  "source": [
88
- "## Parse features and create a `featureset`"
89
- ]
90
- },
91
- {
92
- "attachments": {},
93
- "cell_type": "markdown",
94
- "metadata": {},
95
- "source": [
96
- "The features in this data object are genes and indexed by Ensembl gene ids."
97
- ]
98
- },
99
- {
100
- "attachments": {},
101
- "cell_type": "markdown",
102
- "metadata": {},
103
- "source": [
104
- "Let's parse the features from the data into the Gene Ensembl id:"
66
+ "Let's look at a scRNA-seq count matrix in form of an `AnnData` object:"
105
67
  ]
106
68
  },
107
69
  {
108
70
  "cell_type": "code",
109
71
  "execution_count": null,
110
- "metadata": {},
72
+ "metadata": {
73
+ "tags": [
74
+ "hide-cell"
75
+ ]
76
+ },
111
77
  "outputs": [],
112
78
  "source": [
113
- "# Don't forget to specify species here, default is \"human\"\n",
114
- "featureset = ln.FeatureSet.from_values(\n",
115
- " adata.var.index, lb.Gene.ensembl_gene_id, species=\"mouse\"\n",
116
- ")"
117
- ]
118
- },
119
- {
120
- "attachments": {},
121
- "cell_type": "markdown",
122
- "metadata": {},
123
- "source": [
124
- "(Under the hood, this leveraged `ln.parse` to create the records, followed by storing them as a `featureset`.)"
125
- ]
126
- },
127
- {
128
- "attachments": {},
129
- "cell_type": "markdown",
130
- "metadata": {},
131
- "source": [
132
- "Save the featureset to the databse:"
79
+ "adata = ln.dev.datasets.anndata_mouse_sc_lymph_node()"
133
80
  ]
134
81
  },
135
82
  {
@@ -138,15 +85,7 @@
138
85
  "metadata": {},
139
86
  "outputs": [],
140
87
  "source": [
141
- "ln.save(featureset);"
142
- ]
143
- },
144
- {
145
- "attachments": {},
146
- "cell_type": "markdown",
147
- "metadata": {},
148
- "source": [
149
- "Here, all features were successfully (unambiguously) linked against their canonical reference in `bionty.Gene`."
88
+ "adata"
150
89
  ]
151
90
  },
152
91
  {
@@ -154,7 +93,7 @@
154
93
  "cell_type": "markdown",
155
94
  "metadata": {},
156
95
  "source": [
157
- "This creates a feature set of type `gene` linked (indexed by its hash):"
96
+ "The feature identifiers of this matrix are stored in a `DataFrame`:"
158
97
  ]
159
98
  },
160
99
  {
@@ -163,7 +102,7 @@
163
102
  "metadata": {},
164
103
  "outputs": [],
165
104
  "source": [
166
- "featureset"
105
+ "adata.var.head()"
167
106
  ]
168
107
  },
169
108
  {
@@ -171,7 +110,7 @@
171
110
  "cell_type": "markdown",
172
111
  "metadata": {},
173
112
  "source": [
174
- "This feature set links records for 10k genes. Here are the first 3, all of which can be queried:"
113
+ "When we create a file object from an AnnData, we'll automatically link it's FeatureSet:"
175
114
  ]
176
115
  },
177
116
  {
@@ -180,23 +119,16 @@
180
119
  "metadata": {},
181
120
  "outputs": [],
182
121
  "source": [
183
- "featureset.genes.values_list(\"symbol\", flat=True)[:5]"
184
- ]
185
- },
186
- {
187
- "attachments": {},
188
- "cell_type": "markdown",
189
- "metadata": {},
190
- "source": [
191
- "Hence, not just for Ensemble IDs, but also by gene symbol, NCBI ids, gene type, etc."
122
+ "file = ln.File(adata, var_ref=lb.Gene.ensembl_gene_id)"
192
123
  ]
193
124
  },
194
125
  {
195
- "attachments": {},
196
- "cell_type": "markdown",
126
+ "cell_type": "code",
127
+ "execution_count": null,
197
128
  "metadata": {},
129
+ "outputs": [],
198
130
  "source": [
199
- "## Track data with features (genes)"
131
+ "file.save()"
200
132
  ]
201
133
  },
202
134
  {
@@ -204,7 +136,7 @@
204
136
  "cell_type": "markdown",
205
137
  "metadata": {},
206
138
  "source": [
207
- "Now we can track data together with featureset by link them:"
139
+ "The file now has two feature sets linked:"
208
140
  ]
209
141
  },
210
142
  {
@@ -213,7 +145,10 @@
213
145
  "metadata": {},
214
146
  "outputs": [],
215
147
  "source": [
216
- "file = ln.File(adata, name=\"Mouse Lymph Node scRNA-seq\")"
148
+ "feature_sets = file.feature_sets.all()\n",
149
+ "\n",
150
+ "for feature_set in feature_sets:\n",
151
+ " print(feature_set)"
217
152
  ]
218
153
  },
219
154
  {
@@ -222,7 +157,7 @@
222
157
  "metadata": {},
223
158
  "outputs": [],
224
159
  "source": [
225
- "ln.save(file);"
160
+ "ln.Feature.select(feature_sets__in=feature_sets).df().head()"
226
161
  ]
227
162
  },
228
163
  {
@@ -231,7 +166,7 @@
231
166
  "metadata": {},
232
167
  "outputs": [],
233
168
  "source": [
234
- "file.featuresets.add(featureset)"
169
+ "lb.Gene.select(feature_sets__in=feature_sets).df().head(2)"
235
170
  ]
236
171
  },
237
172
  {
@@ -239,24 +174,18 @@
239
174
  "cell_type": "markdown",
240
175
  "metadata": {},
241
176
  "source": [
242
- "The features can now be accessed via relationship to dobejct:"
243
- ]
244
- },
245
- {
246
- "cell_type": "code",
247
- "execution_count": null,
248
- "metadata": {},
249
- "outputs": [],
250
- "source": [
251
- "file.featuresets.values_list()"
252
- ]
253
- },
254
- {
255
- "attachments": {},
256
- "cell_type": "markdown",
257
- "metadata": {},
258
- "source": [
259
- "## Query data by features"
177
+ ":::{dropdown} Annotate an existing file\n",
178
+ "\n",
179
+ "You can annotate an existing file via:\n",
180
+ "\n",
181
+ "```\n",
182
+ "feature_set = ln.FeatureSet.from_values(adata.var.index, lb.Gene.ensembl_gene_id)\n",
183
+ "feature_set.save()\n",
184
+ "file.feature_sets.add(feature_set)\n",
185
+ "file.save()\n",
186
+ "```\n",
187
+ "\n",
188
+ ":::"
260
189
  ]
261
190
  },
262
191
  {
@@ -264,25 +193,7 @@
264
193
  "cell_type": "markdown",
265
194
  "metadata": {},
266
195
  "source": [
267
- "A DB lookup object for autocompletion:"
268
- ]
269
- },
270
- {
271
- "cell_type": "code",
272
- "execution_count": null,
273
- "metadata": {},
274
- "outputs": [],
275
- "source": [
276
- "db_lookup = lb.Gene.lookup()"
277
- ]
278
- },
279
- {
280
- "cell_type": "code",
281
- "execution_count": null,
282
- "metadata": {},
283
- "outputs": [],
284
- "source": [
285
- "db_lookup.actg1"
196
+ "## Query by features"
286
197
  ]
287
198
  },
288
199
  {
@@ -290,7 +201,7 @@
290
201
  "cell_type": "markdown",
291
202
  "metadata": {},
292
203
  "source": [
293
- "Let us query gene records by symbol:"
204
+ "Lookup one the genes in our Gene registry."
294
205
  ]
295
206
  },
296
207
  {
@@ -299,7 +210,7 @@
299
210
  "metadata": {},
300
211
  "outputs": [],
301
212
  "source": [
302
- "ln.select(lb.Gene, symbol=\"Actg1\").df()"
213
+ "genes = lb.Gene.lookup()"
303
214
  ]
304
215
  },
305
216
  {
@@ -316,16 +227,7 @@
316
227
  "metadata": {},
317
228
  "outputs": [],
318
229
  "source": [
319
- "ln.select(ln.FeatureSet).filter(genes=db_lookup.actg1).df()"
320
- ]
321
- },
322
- {
323
- "cell_type": "code",
324
- "execution_count": null,
325
- "metadata": {},
326
- "outputs": [],
327
- "source": [
328
- "ln.select(ln.FeatureSet).filter(genes__symbol=\"Actg1\").df()"
230
+ "ln.FeatureSet.select(genes=genes.actg1).df()"
329
231
  ]
330
232
  },
331
233
  {
@@ -333,7 +235,7 @@
333
235
  "cell_type": "markdown",
334
236
  "metadata": {},
335
237
  "source": [
336
- "Query files whose featuresets contain the gene:"
238
+ "Query files whose features contain the gene:"
337
239
  ]
338
240
  },
339
241
  {
@@ -342,7 +244,7 @@
342
244
  "metadata": {},
343
245
  "outputs": [],
344
246
  "source": [
345
- "ln.select(ln.File).filter(featuresets__genes=db_lookup.actg1).df()"
247
+ "ln.File.select(feature_sets__genes=genes.actg1).df()"
346
248
  ]
347
249
  },
348
250
  {
@@ -159,7 +159,7 @@
159
159
  "metadata": {},
160
160
  "outputs": [],
161
161
  "source": [
162
- "file.featuresets.add(featureset)"
162
+ "file.feature_sets.add(featureset)"
163
163
  ]
164
164
  },
165
165
  {
@@ -194,7 +194,7 @@
194
194
  "metadata": {},
195
195
  "outputs": [],
196
196
  "source": [
197
- "ln.File.select(featuresets__cell_markers=cell_markers.cd14).df()"
197
+ "ln.File.select(feature_sets__cell_markers=cell_markers.cd14).df()"
198
198
  ]
199
199
  },
200
200
  {
@@ -208,7 +208,7 @@
208
208
  "outputs": [],
209
209
  "source": [
210
210
  "# throw error if there is more or less\n",
211
- "ln.File.select(featuresets__cell_markers=cell_markers.cd14).one()\n",
211
+ "ln.File.select(feature_sets__cell_markers=cell_markers.cd14).one()\n",
212
212
  "# clean up test instance\n",
213
213
  "!lamin delete test-flow\n",
214
214
  "!rm -r test-flow"
@@ -1,8 +1,35 @@
1
1
  # Changelog
2
2
 
3
- ## 0.45a1 (2023-06-27)
3
+ - 🎉 Stage 0.46 (refactor features, file description, setup behavior, species setting) [PR826](https://github.com/laminlabs/lamindb/pull/826) [@falexwolf](https://github.com/falexwolf)
4
+ - 🐛 Fix species bug for no-species orms [PR827](https://github.com/laminlabs/lamindb/pull/827) [@sunnyosun](https://github.com/sunnyosun)
5
+ - 🚸 More user-friendly errors if instance not setup [PR825](https://github.com/laminlabs/lamindb/pull/825) [@falexwolf](https://github.com/falexwolf)
6
+ - 🚚 Rename `File.name` to `File.description` [PR824](https://github.com/laminlabs/lamindb/pull/824) [@falexwolf](https://github.com/falexwolf)
7
+ - ♻️ Refactor `FeatureSet` [PR822](https://github.com/laminlabs/lamindb/pull/822) [@falexwolf](https://github.com/falexwolf)
8
+ - 🐛 Fix passing parents to save [PR821](https://github.com/laminlabs/lamindb/pull/821) [@sunnyosun](https://github.com/sunnyosun)
9
+ - 🎨 Allow passing parents=False to ln.save [PR820](https://github.com/laminlabs/lamindb/pull/820) [@sunnyosun](https://github.com/sunnyosun)
10
+ - 🚸 Parse features for `AnnData` [PR818](https://github.com/laminlabs/lamindb/pull/818) [@falexwolf](https://github.com/falexwolf)
11
+ - 🚑️ Handles categorical input for map_synonyms [PR819](https://github.com/laminlabs/lamindb/pull/819) [@sunnyosun](https://github.com/sunnyosun)
12
+ - 🎉 Stage 0.46 (refactor, signatures, fixes) [PR814](https://github.com/laminlabs/lamindb/pull/814) [@falexwolf](https://github.com/falexwolf)
13
+ - 🚑️ Allow bulk saving of parents [PR816](https://github.com/laminlabs/lamindb/pull/816) [@sunnyosun](https://github.com/sunnyosun)
14
+ - 📝 Fix docs [PR817](https://github.com/laminlabs/lamindb/pull/817) [@falexwolf](https://github.com/falexwolf)
15
+ - 🚚 Move `File` signatures [PR815](https://github.com/laminlabs/lamindb/pull/815) [@falexwolf](https://github.com/falexwolf)
16
+ - ♻️ Put things where they should be and test `ORM` signatures [PR813](https://github.com/laminlabs/lamindb/pull/813) [@falexwolf](https://github.com/falexwolf)
17
+ - 🎉 Stage release 0.46 (`Dataset`, `Feature`, hierarchical ORMs) [PR806](https://github.com/laminlabs/lamindb/pull/806) [@falexwolf](https://github.com/falexwolf)
18
+ - ✨ Also enable `Dataset` from `AnnData` [PR812](https://github.com/laminlabs/lamindb/pull/812) [@falexwolf](https://github.com/falexwolf)
19
+ - ✨ Added self-referential parents, renamed abbr and description [PR810](https://github.com/laminlabs/lamindb/pull/810) [@sunnyosun](https://github.com/sunnyosun)
20
+ - ✨ Enable `Dataset` to be sharded [PR809](https://github.com/laminlabs/lamindb/pull/809) [@falexwolf](https://github.com/falexwolf)
21
+ - 🚸 Store hash for remote files on S3 [PR808](https://github.com/laminlabs/lamindb/pull/808) [@falexwolf](https://github.com/falexwolf)
22
+ - ✨ Add `Dataset` & `Feature` ORMs [PR805](https://github.com/laminlabs/lamindb/pull/805) [@falexwolf](https://github.com/falexwolf)
23
+ - 🐛 Fix the variable bug in File.delete [PR811](https://github.com/laminlabs/lamindb/pull/811) [@Koncopd](https://github.com/Koncopd)
24
+
25
+ ## 0.45.0 (2023-06-27)
26
+
27
+ ### Features
4
28
 
5
29
  - ♻️ Replaced `ln.parse` with `ORM.from_values` [PR803](https://github.com/laminlabs/lamindb/pull/803) [@sunnyosun](https://github.com/sunnyosun)
30
+
31
+ ### Refactors
32
+
6
33
  - 🎨 Auto-manage `RunInput` ORM [PR802](https://github.com/laminlabs/lamindb/pull/802) [@falexwolf](https://github.com/falexwolf)
7
34
  - ✅ Add some unit tests for storage [PR801](https://github.com/laminlabs/lamindb/pull/801) [@Koncopd](https://github.com/Koncopd)
8
35
 
@@ -241,7 +241,7 @@
241
241
  "metadata": {},
242
242
  "outputs": [],
243
243
  "source": [
244
- "assert ln.File.select(name=\"conflicting-project\").one_or_none() is None"
244
+ "assert ln.File.select(description=\"conflicting-project\").one_or_none() is None"
245
245
  ]
246
246
  },
247
247
  {
@@ -271,7 +271,7 @@
271
271
  "source": [
272
272
  "filepath = ln.dev.datasets.file_jpg_paradisi05()\n",
273
273
  "file = ln.File(filepath, name=\"My image\")\n",
274
- "files = [file, \"this is not a BaseORM\"]"
274
+ "files = [file, \"this is not an ORM\"]"
275
275
  ]
276
276
  },
277
277
  {