dclab 0.62.8__cp39-cp39-win_amd64.whl → 0.62.10__cp39-cp39-win_amd64.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.
Potentially problematic release.
This version of dclab might be problematic. Click here for more details.
- dclab/_version.py +2 -2
- dclab/downsampling.cp39-win_amd64.pyd +0 -0
- dclab/external/skimage/_find_contours_cy.cp39-win_amd64.pyd +0 -0
- dclab/external/skimage/_pnpoly.cp39-win_amd64.pyd +0 -0
- dclab/external/skimage/_shared/geometry.cp39-win_amd64.pyd +0 -0
- dclab/rtdc_dataset/copier.py +40 -31
- dclab/rtdc_dataset/core.py +12 -2
- dclab/rtdc_dataset/export.py +15 -12
- dclab/rtdc_dataset/feat_basin.py +9 -0
- dclab/rtdc_dataset/writer.py +2 -2
- {dclab-0.62.8.dist-info → dclab-0.62.10.dist-info}/METADATA +1 -1
- {dclab-0.62.8.dist-info → dclab-0.62.10.dist-info}/RECORD +16 -16
- {dclab-0.62.8.dist-info → dclab-0.62.10.dist-info}/WHEEL +1 -1
- {dclab-0.62.8.dist-info → dclab-0.62.10.dist-info}/LICENSE +0 -0
- {dclab-0.62.8.dist-info → dclab-0.62.10.dist-info}/entry_points.txt +0 -0
- {dclab-0.62.8.dist-info → dclab-0.62.10.dist-info}/top_level.txt +0 -0
dclab/_version.py
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
dclab/rtdc_dataset/copier.py
CHANGED
|
@@ -178,42 +178,51 @@ def basin_definition_copy(src_h5file, dst_h5file, features_iter):
|
|
|
178
178
|
relevant for the internal basin.
|
|
179
179
|
"""
|
|
180
180
|
dst_h5file.require_group("basins")
|
|
181
|
-
|
|
181
|
+
# Load the basin information
|
|
182
|
+
basin_dicts = RTDC_HDF5.basin_get_dicts_from_h5file(src_h5file)
|
|
183
|
+
for bn in basin_dicts:
|
|
184
|
+
b_key = bn["key"]
|
|
185
|
+
|
|
182
186
|
if b_key in dst_h5file["basins"]:
|
|
183
|
-
#
|
|
187
|
+
# already stored therein
|
|
184
188
|
continue
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
189
|
+
|
|
190
|
+
# sanity check
|
|
191
|
+
if b_key not in src_h5file["basins"]:
|
|
192
|
+
raise ValueError(
|
|
193
|
+
f"Failed to parse basin information correctly. Source file "
|
|
194
|
+
f"{src_h5file} does not contain basin {b_key} which I got "
|
|
195
|
+
f"from `RTDC_HDF5.basin_get_dicts_from_h5file`.")
|
|
196
|
+
|
|
197
|
+
if bn["type"] == "internal":
|
|
198
|
+
# Make sure we define the internal features selected
|
|
199
|
+
feat_used = [f for f in bn["features"] if f in features_iter]
|
|
200
|
+
if len(feat_used) == 0:
|
|
201
|
+
# We don't have any internal features, don't write anything
|
|
202
|
+
continue
|
|
203
|
+
elif feat_used != bn["features"]:
|
|
204
|
+
bn["features"] = feat_used
|
|
205
|
+
rewrite = True
|
|
199
206
|
else:
|
|
200
|
-
# We do not have an internal basin, just copy everything
|
|
201
207
|
rewrite = False
|
|
208
|
+
else:
|
|
209
|
+
# We do not have an internal basin, just copy everything
|
|
210
|
+
rewrite = False
|
|
202
211
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
212
|
+
if rewrite:
|
|
213
|
+
# Convert edited `bn` to JSON and write feature data
|
|
214
|
+
b_lines = json.dumps(bn, indent=2).split("\n")
|
|
215
|
+
key = hashobj(b_lines)
|
|
216
|
+
if key not in dst_h5file["basins"]:
|
|
217
|
+
with RTDCWriter(dst_h5file) as hw:
|
|
218
|
+
hw.write_text(dst_h5file["basins"], key, b_lines)
|
|
219
|
+
else:
|
|
220
|
+
# copy only
|
|
221
|
+
h5ds_copy(src_loc=src_h5file["basins"],
|
|
222
|
+
src_name=b_key,
|
|
223
|
+
dst_loc=dst_h5file["basins"],
|
|
224
|
+
dst_name=b_key,
|
|
225
|
+
recursive=False)
|
|
217
226
|
|
|
218
227
|
|
|
219
228
|
def h5ds_copy(src_loc, src_name, dst_loc, dst_name=None,
|
dclab/rtdc_dataset/core.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""RT-DC dataset core classes and methods"""
|
|
2
2
|
import abc
|
|
3
3
|
import hashlib
|
|
4
|
+
import json
|
|
4
5
|
import os.path
|
|
5
6
|
import pathlib
|
|
6
7
|
import traceback
|
|
@@ -15,6 +16,7 @@ from .. import definitions as dfn
|
|
|
15
16
|
from .. import downsampling
|
|
16
17
|
from ..polygon_filter import PolygonFilter
|
|
17
18
|
from .. import kde_methods
|
|
19
|
+
from ..util import hashobj
|
|
18
20
|
|
|
19
21
|
from .feat_anc_core import AncillaryFeature, FEATURES_RAPID
|
|
20
22
|
from . import feat_basin
|
|
@@ -825,14 +827,20 @@ class RTDCBase(abc.ABC):
|
|
|
825
827
|
# Sort basins according to priority
|
|
826
828
|
bdicts_srt = sorted(self.basins_get_dicts(),
|
|
827
829
|
key=feat_basin.basin_priority_sorted_key)
|
|
828
|
-
|
|
830
|
+
# complement basin "key"s (we do the same in writer)
|
|
831
|
+
for bdict in bdicts_srt:
|
|
832
|
+
if "key" not in bdict:
|
|
833
|
+
b_dat = json.dumps(bdict, indent=2, sort_keys=True).split("\n")
|
|
834
|
+
bdict["key"] = hashobj(b_dat)
|
|
835
|
+
|
|
836
|
+
bd_keys = [bd["key"] for bd in bdicts_srt]
|
|
829
837
|
bd_keys += self._basins_ignored
|
|
830
838
|
for bdict in bdicts_srt:
|
|
831
839
|
if bdict["format"] not in bc:
|
|
832
840
|
warnings.warn(f"Encountered unsupported basin "
|
|
833
841
|
f"format '{bdict['format']}'!")
|
|
834
842
|
continue
|
|
835
|
-
if
|
|
843
|
+
if bdict["key"] in self._basins_ignored:
|
|
836
844
|
warnings.warn(
|
|
837
845
|
f"Encountered cyclic basin dependency '{bdict['key']}'",
|
|
838
846
|
feat_basin.CyclicBasinDependencyFoundWarning)
|
|
@@ -853,6 +861,8 @@ class RTDCBase(abc.ABC):
|
|
|
853
861
|
"measurement_identifier": self.get_measurement_identifier(),
|
|
854
862
|
# allow to ignore basins
|
|
855
863
|
"ignored_basins": bd_keys,
|
|
864
|
+
# basin key
|
|
865
|
+
"key": bdict["key"],
|
|
856
866
|
}
|
|
857
867
|
|
|
858
868
|
# Check whether this basin is supported and exists
|
dclab/rtdc_dataset/export.py
CHANGED
|
@@ -319,18 +319,21 @@ class Export(object):
|
|
|
319
319
|
|
|
320
320
|
# write export log
|
|
321
321
|
hw.store_log(time.strftime("dclab-export_%Y-%m-%d_%H.%M.%S"),
|
|
322
|
-
json.dumps(
|
|
323
|
-
"dclab version": version_tuple,
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
322
|
+
json.dumps(
|
|
323
|
+
{"dclab version": version_tuple,
|
|
324
|
+
"kwargs": {
|
|
325
|
+
"features": features,
|
|
326
|
+
"filtered": filtered,
|
|
327
|
+
"logs": logs,
|
|
328
|
+
"tables": tables,
|
|
329
|
+
"basins": basins,
|
|
330
|
+
"meta_prefix": meta_prefix,
|
|
331
|
+
"skip_checks": skip_checks
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
indent=2,
|
|
335
|
+
sort_keys=True,
|
|
336
|
+
).split("\n"))
|
|
334
337
|
|
|
335
338
|
if logs:
|
|
336
339
|
# write logs
|
dclab/rtdc_dataset/feat_basin.py
CHANGED
|
@@ -9,6 +9,7 @@ import abc
|
|
|
9
9
|
import numbers
|
|
10
10
|
import threading
|
|
11
11
|
from typing import Dict, List, Literal
|
|
12
|
+
import uuid
|
|
12
13
|
import warnings
|
|
13
14
|
import weakref
|
|
14
15
|
|
|
@@ -74,6 +75,7 @@ class Basin(abc.ABC):
|
|
|
74
75
|
] = "same",
|
|
75
76
|
mapping_referrer: Dict = None,
|
|
76
77
|
ignored_basins: List[str] = None,
|
|
78
|
+
key: str = None,
|
|
77
79
|
**kwargs):
|
|
78
80
|
"""
|
|
79
81
|
|
|
@@ -109,6 +111,10 @@ class Basin(abc.ABC):
|
|
|
109
111
|
:class:`.RTDCBase`.
|
|
110
112
|
ignored_basins: list of str
|
|
111
113
|
List of basins to ignore in subsequent basin instantiations
|
|
114
|
+
key: str
|
|
115
|
+
Unique key to identify this basin; normally computed from
|
|
116
|
+
a JSON dump of the basin definition. A random string is used
|
|
117
|
+
if None is specified.
|
|
112
118
|
kwargs:
|
|
113
119
|
Additional keyword arguments passed to the `load_dataset`
|
|
114
120
|
method of the `Basin` subclass.
|
|
@@ -124,6 +130,8 @@ class Basin(abc.ABC):
|
|
|
124
130
|
self.name = name
|
|
125
131
|
#: lengthy description of the basin
|
|
126
132
|
self.description = description
|
|
133
|
+
# defining key of the basin
|
|
134
|
+
self.key = key or str(uuid.uuid4())
|
|
127
135
|
# features this basin provides
|
|
128
136
|
self._features = features
|
|
129
137
|
#: measurement identifier of the referencing dataset
|
|
@@ -367,6 +375,7 @@ class BasinProxy:
|
|
|
367
375
|
dataset to the downstream dataset
|
|
368
376
|
"""
|
|
369
377
|
self.ds = ds
|
|
378
|
+
self.basins_get_dicts = ds.basins_get_dicts
|
|
370
379
|
self.basinmap = basinmap
|
|
371
380
|
self._features = {}
|
|
372
381
|
|
dclab/rtdc_dataset/writer.py
CHANGED
|
@@ -389,7 +389,7 @@ class RTDCWriter:
|
|
|
389
389
|
flocs.append(str(pp.resolve()))
|
|
390
390
|
# Also store the relative path for user convenience.
|
|
391
391
|
# Don't use pathlib.Path.relative_to, because that
|
|
392
|
-
#
|
|
392
|
+
# only has `walk_up` since Python 3.12.
|
|
393
393
|
# Also, just look in subdirectories which simplifies
|
|
394
394
|
# path resolution.
|
|
395
395
|
this_parent = str(self.path.parent) + os.sep
|
|
@@ -408,7 +408,7 @@ class RTDCWriter:
|
|
|
408
408
|
else:
|
|
409
409
|
raise ValueError(f"Unknown basin type '{basin_type}'")
|
|
410
410
|
|
|
411
|
-
b_lines = json.dumps(b_data, indent=2).split("\n")
|
|
411
|
+
b_lines = json.dumps(b_data, indent=2, sort_keys=True).split("\n")
|
|
412
412
|
basins = self.h5file.require_group("basins")
|
|
413
413
|
key = hashobj(b_lines)
|
|
414
414
|
if key not in basins:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dclab
|
|
3
|
-
Version: 0.62.
|
|
3
|
+
Version: 0.62.10
|
|
4
4
|
Summary: Library for real-time deformability cytometry (RT-DC)
|
|
5
5
|
Author: Benedikt Hartmann, Eoghan O'Connell, Maik Herbig, Maximilian Schlögel, Nadia Sbaa, Paul Müller, Philipp Rosendahl, Raghava Alajangi
|
|
6
6
|
Maintainer-email: Paul Müller <dev@craban.de>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
dclab/__init__.py,sha256=7_y6YtYcoL_a5M6Q9PiwZPzHSxS66yCTgs_uuK5C1dg,835
|
|
2
|
-
dclab/_version.py,sha256=
|
|
2
|
+
dclab/_version.py,sha256=24GJ4WG-lYF3ho697oXBQgdaa52ggyKu0hOZMiA4lV8,431
|
|
3
3
|
dclab/cached.py,sha256=t01BYTf43VEsBYa0c-bMxgceF5vKoGV73b42UlLH6Lo,3014
|
|
4
|
-
dclab/downsampling.cp39-win_amd64.pyd,sha256=
|
|
4
|
+
dclab/downsampling.cp39-win_amd64.pyd,sha256=M2HpYHQmcWc-BSswv93slyWZDyWnzZkW9FUZ9mrVv-Y,187904
|
|
5
5
|
dclab/downsampling.pyx,sha256=Ez6MbNbzCUzs2IXXKtAYsjtYqP22kI8hdA1IE-3mqvY,7488
|
|
6
6
|
dclab/http_utils.py,sha256=nneq9Cx8dw8ChQx5oIg2pN0xGkvNWCMSY5VYmttqyXA,11232
|
|
7
7
|
dclab/kde_contours.py,sha256=k0Y1UsJNtuYY8iqYmfQ-Nml-dFpJAcigd3vmt9U6zsY,6967
|
|
@@ -35,14 +35,14 @@ dclab/external/packaging/version.py,sha256=NgEgv7me4UCvFMyiNYD-nc_28b9UHUvBVh8RD
|
|
|
35
35
|
dclab/external/skimage/LICENSE,sha256=Tdv08zzxYV32WRdYnco9P3nVyS5w17OTxIAFeRSd1wc,1480
|
|
36
36
|
dclab/external/skimage/__init__.py,sha256=icOIlThkyn_hxmnM_i7OpbU7fhvqYWNpGdNGD38qthU,74
|
|
37
37
|
dclab/external/skimage/_find_contours.py,sha256=auRMNfZg7B73DX7kPXxgD8gMXXB3Lk9QDWt4wlQnUWg,9556
|
|
38
|
-
dclab/external/skimage/_find_contours_cy.cp39-win_amd64.pyd,sha256=
|
|
38
|
+
dclab/external/skimage/_find_contours_cy.cp39-win_amd64.pyd,sha256=9NGAQ_vlN6Ol2huZJLO9oxYHvu2hwtagDlXikgi_t0I,142848
|
|
39
39
|
dclab/external/skimage/_find_contours_cy.pyx,sha256=c-EobLhKjZNCpuqWxmvrcH35uAY_Bu-_hZiUHbXODms,7349
|
|
40
|
-
dclab/external/skimage/_pnpoly.cp39-win_amd64.pyd,sha256=
|
|
40
|
+
dclab/external/skimage/_pnpoly.cp39-win_amd64.pyd,sha256=1w_8E7qR3bXJIO1Wld6Ltr-3pQYGWHaplJuEvWHEt7k,159232
|
|
41
41
|
dclab/external/skimage/_pnpoly.pyx,sha256=eHV3DlIGcBhAQ12-Y58EYq8xcq0Sibyc4xTxzX9NJsk,2603
|
|
42
42
|
dclab/external/skimage/measure.py,sha256=rzyI0HCr9O9GJNieVW8pcqDjTGRAdSehDUawD8QkIAE,254
|
|
43
43
|
dclab/external/skimage/pnpoly.py,sha256=zB4rSxjHJyY1OsGZ7QfFQqxIEDLGK8CWPehwutoFqm4,1400
|
|
44
44
|
dclab/external/skimage/_shared/__init__.py,sha256=q29esTsNh0HfQxcd2EuwdYNbEBJwo_qY4dfv7RihzoA,38
|
|
45
|
-
dclab/external/skimage/_shared/geometry.cp39-win_amd64.pyd,sha256=
|
|
45
|
+
dclab/external/skimage/_shared/geometry.cp39-win_amd64.pyd,sha256=7oIlbpGgB1Dm13DHRI6IAO3KbjrSJ93PNUQIfrLVJq4,21504
|
|
46
46
|
dclab/external/skimage/_shared/geometry.pxd,sha256=3gJ7fbXXsxJunSN4biE0dzEbZpX9ZqzR4cUDDN0JnAU,352
|
|
47
47
|
dclab/external/skimage/_shared/geometry.pyx,sha256=b6hADE8chse63haO1Kdt13_oQ54J9tkBf7dVA22-s-M,1722
|
|
48
48
|
dclab/external/statsmodels/LICENSE,sha256=8D7nwukc6YgsZCdN9mG0psM3I9j-z8fuUgFyVhnMXpU,1672
|
|
@@ -82,17 +82,17 @@ dclab/lme4/wrapr.py,sha256=tZYvUy5LUM7sM3d8NiOIlxbrtu89LAihG4hqI6MSv2Q,15403
|
|
|
82
82
|
dclab/rtdc_dataset/__init__.py,sha256=BuWKEUm7QUe-Kj1wMR0AXON_XN2mzXlbOgouHdnvAw4,501
|
|
83
83
|
dclab/rtdc_dataset/check.py,sha256=l2QoIL3gno_Z2-e8RvYHAurHZP_oLGtZk8l6jUDiuTA,35908
|
|
84
84
|
dclab/rtdc_dataset/config.py,sha256=HVJiqKlqd-SpYqnNTKSr1yUsq2Bkfq5s5zluT-8PUc0,17965
|
|
85
|
-
dclab/rtdc_dataset/copier.py,sha256=
|
|
86
|
-
dclab/rtdc_dataset/core.py,sha256=
|
|
87
|
-
dclab/rtdc_dataset/export.py,sha256=
|
|
88
|
-
dclab/rtdc_dataset/feat_basin.py,sha256=
|
|
85
|
+
dclab/rtdc_dataset/copier.py,sha256=imD0ijAz9BY0nksF2zUBeoGmeo_dUTUnBgY9TqRaD4g,14528
|
|
86
|
+
dclab/rtdc_dataset/core.py,sha256=7pQOcFGEO2AnI7r8rJLjXkAi8mXkY4GCQ41eXfBHMx0,38999
|
|
87
|
+
dclab/rtdc_dataset/export.py,sha256=gdcg8FSacFBdIfCPbquEOV7J96FlHAvWu9PpK2KTdkc,30351
|
|
88
|
+
dclab/rtdc_dataset/feat_basin.py,sha256=nDMMkjBmVrH26_lhSJ4pmgUfcwdV1wDON-Hu-864is8,21622
|
|
89
89
|
dclab/rtdc_dataset/feat_temp.py,sha256=5QiF8Nc8MVoTtinYlvfoSuoopND-uvWVWKjMggBTHLw,3796
|
|
90
90
|
dclab/rtdc_dataset/filter.py,sha256=IRaEUt0tWtZGLKYvtqzfYO2kN5yhqx9eLoHd3VOLCTE,10286
|
|
91
91
|
dclab/rtdc_dataset/fmt_dict.py,sha256=-tlzOwsOCh4Vt3rSiBUvMKW7vBgrRNubU7ZHdGMB3gE,3112
|
|
92
92
|
dclab/rtdc_dataset/fmt_http.py,sha256=XzcgvJ4lm-eWbveBraBc5PPJeGWeUGC35p8ptnxBycc,3476
|
|
93
93
|
dclab/rtdc_dataset/fmt_s3.py,sha256=35ZNCSbfpn75QHqrciMur2MUAiViddCAZsXkzql6uv0,10962
|
|
94
94
|
dclab/rtdc_dataset/load.py,sha256=IKRtlZbHGAHNCNaZQPRXFxJjnnMH5HXnhNuIwqYmHzo,2545
|
|
95
|
-
dclab/rtdc_dataset/writer.py,sha256=
|
|
95
|
+
dclab/rtdc_dataset/writer.py,sha256=f4xU55FvxJEoxwzjqEQzXrlr1eZe3PFaprh_8g4qyf8,41417
|
|
96
96
|
dclab/rtdc_dataset/feat_anc_core/__init__.py,sha256=j7vtbQGJid3hchXryo19cxnwanepdDQ_RuJVf740mZs,488
|
|
97
97
|
dclab/rtdc_dataset/feat_anc_core/af_basic.py,sha256=7pM6Gn1ZkuttHNfkaLijPudddAu0jMDPGJS9HzKh8rE,2268
|
|
98
98
|
dclab/rtdc_dataset/feat_anc_core/af_emodulus.py,sha256=lsJpQ409EsxnMtyhO7igquWnJxIhXz_w9f8vtIq7F1M,6830
|
|
@@ -129,9 +129,9 @@ dclab/rtdc_dataset/fmt_tdms/event_mask.py,sha256=cW-Tw2PIe6X1Hc4UZJ22-mI_qFaIMWA
|
|
|
129
129
|
dclab/rtdc_dataset/fmt_tdms/event_trace.py,sha256=ktWnXfMir1v5Wfeo7tOd0txSOe1bgsXotf9Ul5T5-B4,5361
|
|
130
130
|
dclab/rtdc_dataset/fmt_tdms/exc.py,sha256=FfxUY4LGIMPGJTYmGITmEm7X5iu8GBsj7OfZR8Zb-IE,850
|
|
131
131
|
dclab/rtdc_dataset/fmt_tdms/naming.py,sha256=SFeWiwIN7sg0qNe0Aya2bZshN1Zbw4YcOKunZ6kfIGM,5524
|
|
132
|
-
dclab-0.62.
|
|
133
|
-
dclab-0.62.
|
|
134
|
-
dclab-0.62.
|
|
135
|
-
dclab-0.62.
|
|
136
|
-
dclab-0.62.
|
|
137
|
-
dclab-0.62.
|
|
132
|
+
dclab-0.62.10.dist-info/LICENSE,sha256=ayjnuJcdf_kpkDyD61tUcVqVAQaNSYXJ73m5HVB4G8s,18474
|
|
133
|
+
dclab-0.62.10.dist-info/METADATA,sha256=BK3yCJmIW35QfOANM9-gPElFn5cnwWw7Tqj_Mm3D70Q,4901
|
|
134
|
+
dclab-0.62.10.dist-info/WHEEL,sha256=F4Gwseysu0orsWha5ii3stWN2C03NSU54-GIdk79KZs,99
|
|
135
|
+
dclab-0.62.10.dist-info/entry_points.txt,sha256=eOpjgznu-eW-9utUpLU-77O5098YyUEgGF3ksGMdtec,273
|
|
136
|
+
dclab-0.62.10.dist-info/top_level.txt,sha256=irvwZMgs1edY1Zj60ZFk7Almb9Zhk4k6E6aC4YPFnnM,6
|
|
137
|
+
dclab-0.62.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|