dclab 0.62.12__tar.gz → 2.18.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.
Potentially problematic release.
This version of dclab might be problematic. Click here for more details.
- {dclab-0.62.12 → dclab-2.18.0}/.readthedocs.yml +2 -2
- {dclab-0.62.12 → dclab-2.18.0}/CHANGELOG +3 -62
- {dclab-0.62.12 → dclab-2.18.0}/MANIFEST.in +1 -1
- {dclab-0.62.12 → dclab-2.18.0}/PKG-INFO +5 -3
- {dclab-0.62.12 → dclab-2.18.0}/dclab/_version.py +2 -2
- {dclab-0.62.12 → dclab-2.18.0}/dclab/definitions/meta_const.py +1 -11
- {dclab-0.62.12 → dclab-2.18.0}/dclab/features/emodulus/viscosity.py +0 -4
- {dclab-0.62.12 → dclab-2.18.0}/dclab/http_utils.py +2 -12
- dclab-2.18.0/dclab/lme4/__init__.py +5 -0
- dclab-2.18.0/dclab/lme4/rlibs.py +93 -0
- dclab-2.18.0/dclab/lme4/rsetup.py +207 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/lme4/wrapr.py +129 -93
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/check.py +6 -74
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/copier.py +19 -73
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/core.py +2 -12
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/export.py +12 -16
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/feat_basin.py +3 -30
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_dcor/tables.py +4 -6
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_hdf5/base.py +2 -7
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_hdf5/events.py +3 -3
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_hierarchy/base.py +1 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_hierarchy/events.py +3 -4
- dclab-2.18.0/dclab/rtdc_dataset/linker.py +124 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/writer.py +11 -30
- {dclab-0.62.12 → dclab-2.18.0}/dclab/util.py +0 -6
- {dclab-0.62.12 → dclab-2.18.0}/dclab.egg-info/PKG-INFO +5 -3
- {dclab-0.62.12 → dclab-2.18.0}/dclab.egg-info/SOURCES.txt +3 -1
- {dclab-0.62.12 → dclab-2.18.0}/dclab.egg-info/requires.txt +4 -1
- {dclab-0.62.12 → dclab-2.18.0}/docs/conf.py +6 -3
- {dclab-0.62.12 → dclab-2.18.0}/docs/requirements.txt +2 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_av_basins/index.rst +36 -97
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_av_lme4.rst +1 -3
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_av_s3.rst +2 -2
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_changelog.rst +0 -1
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_code_reference.rst +5 -0
- {dclab-0.62.12 → dclab-2.18.0}/pyproject.toml +2 -1
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_cli_condense.py +6 -13
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_cli_repack.py +0 -37
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_feat_emodulus_viscosity.py +0 -17
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_lme4.py +30 -10
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_check_dataset.py +10 -86
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_copier.py +0 -175
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_core_feat.py +0 -26
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_export_hdf5.py +0 -21
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_feat_anc_plugin.py +13 -6
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_feat_basin.py +0 -62
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_fmt_dcor_basin.py +0 -2
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_fmt_hdf5_basins_internal.py +0 -105
- dclab-2.18.0/tests/test_rtdc_fmt_hdf5_linker.py +136 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_fmt_http_basin.py +0 -5
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_fmt_tdms.py +1 -5
- dclab-0.62.12/dclab/lme4/__init__.py +0 -5
- dclab-0.62.12/dclab/lme4/lme4_template.R +0 -94
- dclab-0.62.12/dclab/lme4/rsetup.py +0 -204
- {dclab-0.62.12 → dclab-2.18.0}/.gitignore +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/LICENSE +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/README.rst +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/__init__.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/cached.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/cli/__init__.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/cli/common.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/cli/task_compress.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/cli/task_condense.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/cli/task_join.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/cli/task_repack.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/cli/task_split.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/cli/task_tdms2rtdc.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/cli/task_verify_dataset.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/definitions/__init__.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/definitions/feat_const.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/definitions/feat_logic.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/definitions/meta_logic.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/definitions/meta_parse.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/downsampling.pyx +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/external/__init__.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/external/packaging/LICENSE +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/external/packaging/LICENSE.APACHE +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/external/packaging/LICENSE.BSD +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/external/packaging/__init__.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/external/packaging/_structures.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/external/packaging/version.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/external/skimage/LICENSE +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/external/skimage/__init__.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/external/skimage/_find_contours.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/external/skimage/_find_contours_cy.pyx +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/external/skimage/_pnpoly.pyx +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/external/skimage/_shared/__init__.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/external/skimage/_shared/geometry.pxd +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/external/skimage/_shared/geometry.pyx +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/external/skimage/measure.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/external/skimage/pnpoly.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/external/statsmodels/LICENSE +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/external/statsmodels/__init__.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/external/statsmodels/nonparametric/__init__.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/external/statsmodels/nonparametric/_kernel_base.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/external/statsmodels/nonparametric/kernel_density.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/external/statsmodels/nonparametric/kernels.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/features/__init__.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/features/bright.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/features/bright_bc.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/features/bright_perc.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/features/contour.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/features/emodulus/__init__.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/features/emodulus/load.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/features/emodulus/lut_HE-2D-FEM-22.txt +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/features/emodulus/lut_HE-3D-FEM-22.txt +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/features/emodulus/lut_LE-2D-FEM-19.txt +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/features/emodulus/pxcorr.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/features/emodulus/scale_linear.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/features/fl_crosstalk.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/features/inert_ratio.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/features/volume.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/isoelastics/__init__.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/isoelastics/iso_HE-2D-FEM-22-area_um-deform.txt +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/isoelastics/iso_HE-2D-FEM-22-volume-deform.txt +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/isoelastics/iso_HE-3D-FEM-22-area_um-deform.txt +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/isoelastics/iso_HE-3D-FEM-22-volume-deform.txt +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/isoelastics/iso_LE-2D-FEM-19-area_um-deform.txt +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/isoelastics/iso_LE-2D-FEM-19-volume-deform.txt +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/isoelastics/iso_LE-2D-ana-18-area_um-deform.txt +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/kde_contours.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/kde_methods.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/polygon_filter.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/__init__.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/config.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/feat_anc_core/__init__.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/feat_anc_core/af_basic.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/feat_anc_core/af_emodulus.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/feat_anc_core/af_fl_max_ctc.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/feat_anc_core/af_image_contour.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/feat_anc_core/af_ml_class.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/feat_anc_core/ancillary_feature.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/feat_anc_ml/__init__.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/feat_anc_plugin/__init__.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/feat_anc_plugin/plugin_feature.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/feat_temp.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/filter.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_dcor/__init__.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_dcor/access_token.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_dcor/api.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_dcor/base.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_dcor/basin.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_dcor/logs.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_dict.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_hdf5/__init__.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_hdf5/basin.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_hdf5/feat_defect.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_hdf5/logs.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_hdf5/tables.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_hierarchy/__init__.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_hierarchy/hfilter.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_hierarchy/mapper.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_http.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_s3.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_tdms/__init__.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_tdms/event_contour.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_tdms/event_image.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_tdms/event_mask.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_tdms/event_trace.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_tdms/exc.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/fmt_tdms/naming.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/rtdc_dataset/load.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/statistics.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab/warn.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab.egg-info/dependency_links.txt +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab.egg-info/entry_points.txt +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/dclab.egg-info/top_level.txt +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/.gitignore +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/README.md +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/data/example.poly +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/data/example.rtdc +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/data/example_plugin.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/data/example_plugin_metadata.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/data/example_traces.rtdc +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/data/example_video.rtdc +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/dclab.bib +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/extensions/dclab_defs.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/extensions/fancy_include.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/extensions/github_changelog.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/extensions/simple_argparse.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/figures/DCOR_API_Token_website.png +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/index.rst +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/logo/dc_logo.png +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/logo/dc_logo.svg +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/logo/dclab.png +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/logo/dclab.svg +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/logo/dclab_large_white.png +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/logo/dclab_large_white.svg +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/logo/favicon.ico +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/logo/favicon.svg +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_advanced_usage.rst +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_av_dc_io.rst +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_av_dc_usage.rst +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_av_dcor.rst +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_av_emodulus/figures_emodulus/.gitignore +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_av_emodulus/figures_emodulus/emodulus_20um_HE-2D-FEM-22.png +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_av_emodulus/figures_emodulus/emodulus_20um_HE-3D-FEM-22.png +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_av_emodulus/figures_emodulus/emodulus_20um_LE-2D-FEM-19.png +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_av_emodulus/figures_emodulus/plot_emodulus_lut.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_av_emodulus/figures_emodulus/requirements.txt +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_av_emodulus/figures_viscosity/LICENSE +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_av_emodulus/figures_viscosity/buyukurganci_22_fig3a.jpg +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_av_emodulus/figures_viscosity/buyukurganci_22_fig3a.pdf +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_av_emodulus/index.rst +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_av_feat_plugin.rst +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_av_feat_temp.rst +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_av_fluorescence.rst +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_av_notation.rst +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_av_scatter.rst +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_cli.rst +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_examples.rst +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_getting_started.rst +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/docs/sec_z_bib.rst +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/examples/emodulus_dcor.jpg +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/examples/emodulus_dcor.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/examples/generate_example_images.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/examples/isoelastics.jpg +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/examples/isoelastics.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/examples/isoelastics_custom.jpg +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/examples/isoelastics_custom.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/examples/lme4_glmer_diff.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/examples/lme4_lmer.jpg +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/examples/lme4_lmer.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/examples/overview_plot.jpg +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/examples/overview_plot.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/examples/plugin_example.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/examples/plugin_usage.jpg +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/examples/plugin_usage.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/examples/viscosity_models.jpg +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/examples/viscosity_models.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/scripts/.gitignore +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/scripts/README.md +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/scripts/fem2iso_volume.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/scripts/fem2lutiso_std.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/scripts/fem2rtdc.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/scripts/lut_recipes/__init__.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/scripts/lut_recipes/hooks/LUT_analytical_linear-elastic_2Daxis.txt +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/scripts/lut_recipes/hooks/README.md +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/scripts/lut_recipes/hooks/__init__.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/scripts/lut_recipes/hooks/common.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/scripts/lut_recipes/hooks/he_2d_fem_22.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/scripts/lut_recipes/hooks/he_3d_fem_22.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/scripts/lut_recipes/hooks/le_2d_fem_19.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/scripts/lut_recipes/lut_processor.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/scripts/pixelation_correction.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/scripts/pixelation_correction_2020.png +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/scripts/pixelation_correction_2022.png +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/scripts/requirements.txt +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/setup.cfg +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/setup.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/README.md +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/conftest.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/data/README.md +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/data/example_access_token.dcor-access +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/data/example_isoelastics.txt +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/data/feat_anc_plugin_creative.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/data/fmt-hdf5_fl-no-contour_2019.zip +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/data/fmt-hdf5_fl_2017.zip +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/data/fmt-hdf5_fl_2018.zip +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/data/fmt-hdf5_fl_wide-channel_2023.zip +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/data/fmt-hdf5_image-bg_2020.zip +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/data/fmt-hdf5_image-mask-blood_2021.zip +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/data/fmt-hdf5_mask-contour_2018.zip +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/data/fmt-hdf5_polygon_gate_2021.zip +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/data/fmt-hdf5_raw-cytoshot-exported.zip +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/data/fmt-hdf5_segfault-compound_2023.zip +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/data/fmt-hdf5_wide-channel_2023.zip +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/data/fmt-tdms_2fl-no-image_2017.zip +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/data/fmt-tdms_fl-image-bright_2017.zip +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/data/fmt-tdms_fl-image-large-fov_2017.zip +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/data/fmt-tdms_fl-image_2016.zip +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/data/fmt-tdms_fl_2015.zip +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/data/fmt-tdms_minimal_2016.zip +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/data/fmt-tdms_shapein-2.0.1-no-image_2017.zip +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/helper_methods.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/requirements.txt +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_cache.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_cli.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_cli_argparse.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_cli_compress.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_cli_join.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_cli_split.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_config_value_mapping.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_dfn.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_downsampling.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_feat_bright.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_feat_bright_bc.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_feat_bright_perc.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_feat_contour.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_feat_emodulus.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_feat_fl_crosstalk.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_feat_inert_ratio.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_feat_volume.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_http_utils.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_isoelastics.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_kde_contours.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_kde_methods.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_lut_he_2d_fem_22.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_lut_he_3d_fem_22.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_polygon_contains.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_polygon_filter.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_config.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_downsampling.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_export.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_export_avi.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_export_fcs.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_export_tsv.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_feat_anc_core.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_feat_anc_ml.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_feat_basin_mapped.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_feat_temp.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_filter.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_fmt_dcor.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_fmt_dcor_access_token.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_fmt_dict.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_fmt_hdf5.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_fmt_hdf5_basins.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_fmt_hierarchy.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_fmt_http.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_fmt_s3.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_fmt_s3_basin.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_hash.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_kde.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_limit_events.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_rtdc_writer.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_statistics.py +0 -0
- {dclab-0.62.12 → dclab-2.18.0}/tests/test_util.py +0 -0
|
@@ -1,62 +1,3 @@
|
|
|
1
|
-
0.62.12
|
|
2
|
-
- fix: viscosity computation for MP-PBS at zero flow rate should be NaN
|
|
3
|
-
0.62.11
|
|
4
|
-
- enh: support plain `numpy.array` tables
|
|
5
|
-
0.62.10
|
|
6
|
-
- fix: `basin_definition_copy` failed when more than one basins defined
|
|
7
|
-
due to redundant loop
|
|
8
|
-
- fix: JSON logs during export were not sorted and indented
|
|
9
|
-
0.62.9
|
|
10
|
-
- enh: sort basin definition before exporting to JSON; the side-effect
|
|
11
|
-
is that the unique key for a basin changes, possibly resulting in
|
|
12
|
-
duplicated basin definitions for existing datasets
|
|
13
|
-
- enh: make sure every basin can be identified with a key created from
|
|
14
|
-
its definition; important for connecting the basin dictionaries
|
|
15
|
-
with the instantiated basins
|
|
16
|
-
0.62.8
|
|
17
|
-
- fix: metadata of tables not copied by `copier.py`
|
|
18
|
-
- docs: formatting typo (#270)
|
|
19
|
-
0.62.7
|
|
20
|
-
- fix: IntegrityChecker must not load basins
|
|
21
|
-
- fix: KeyError in IntegrityChecker when "basin_events" group missing (#268)
|
|
22
|
-
- fix: warn user about missing internal basin features while still loading
|
|
23
|
-
those that are available (#268)
|
|
24
|
-
- fix: do not copy internal basin definitions for non-existent features (#269)
|
|
25
|
-
- docs: clarify interpretation of [qpi]: "filter size" metadata (#267)
|
|
26
|
-
- tests: avoid architecture and Python-version dependent test
|
|
27
|
-
0.62.6
|
|
28
|
-
- enh: support passing pathlib.Path to lme4.rsetup.set_*_path methods
|
|
29
|
-
- docs: correct keyword arguments for advanced section on S3
|
|
30
|
-
0.62.5
|
|
31
|
-
- enh: make set_r_lib_path available in lme4 submodule
|
|
32
|
-
0.62.4
|
|
33
|
-
- enh: honor R_LIBS_USER environment variable when running R
|
|
34
|
-
0.62.3
|
|
35
|
-
- fix: get_r_version string conversion not necessary
|
|
36
|
-
0.62.2
|
|
37
|
-
- fix: use full path to R executable when running lme4 analysis in rsetup
|
|
38
|
-
- enh: properly catch CalledProcessError in run_command
|
|
39
|
-
- enh: improve search for R executable path
|
|
40
|
-
- ref: replace sp.check_output with run_command in lme4 submodule
|
|
41
|
-
0.62.1
|
|
42
|
-
- fix: numpy-version-specific default for `copy` in `__array__()`
|
|
43
|
-
0.62.0
|
|
44
|
-
- BREAKING: removed the `rtdc_dataset.linker` module, because it is not
|
|
45
|
-
used by any other piece of software and because combining file-like
|
|
46
|
-
objects external links are quirky and their combination finally broke
|
|
47
|
-
with h5py 3.12
|
|
48
|
-
- enh: added integrity check for external links
|
|
49
|
-
- tests: reduce warnings
|
|
50
|
-
0.61.5
|
|
51
|
-
- fix: integrity check failed for empty datasets
|
|
52
|
-
0.61.4
|
|
53
|
-
- docs: update basins section
|
|
54
|
-
- docs: cleanup build process
|
|
55
|
-
0.61.3
|
|
56
|
-
- fix: TypeError when of R_HOME is not set
|
|
57
|
-
0.61.2
|
|
58
|
-
- ref: migrate from rpy2 to custom wrapper around R and Rscript binary
|
|
59
|
-
- setup: remove extra [lme4] and rpy2 requirement
|
|
60
1
|
0.61.1
|
|
61
2
|
- fix: properly catch warnings for determining bad event image for fmt_tdms
|
|
62
3
|
- fix: make sure integer features are always written as uint,
|
|
@@ -72,7 +13,7 @@
|
|
|
72
13
|
- enh: improve availability check for HDF5 basin data
|
|
73
14
|
- enh: cache list of features available via all basins
|
|
74
15
|
- enh: speed up feature retrieval for non-ancillary features
|
|
75
|
-
- ref: replace
|
|
16
|
+
- ref: replace np.string_ with np.bytes_
|
|
76
17
|
0.60.9
|
|
77
18
|
- build: build with macos-latest and macos-13 images
|
|
78
19
|
0.60.8
|
|
@@ -304,7 +245,7 @@
|
|
|
304
245
|
- ref: HDF5Basin gets its own submodule
|
|
305
246
|
- setup: oldest-supported-numpy is not required anymore, since numpy
|
|
306
247
|
is backwards-compatible now
|
|
307
|
-
0.52.3
|
|
248
|
+
0.52.3
|
|
308
249
|
- maintenance release
|
|
309
250
|
0.52.2
|
|
310
251
|
- maintenance release
|
|
@@ -429,7 +370,7 @@
|
|
|
429
370
|
0.47.3
|
|
430
371
|
- fix: np.histrogram2d does not expect broken normed argument
|
|
431
372
|
- docs: fixed GH Actions badge
|
|
432
|
-
- enh: implement
|
|
373
|
+
- enh: implement RTDC_HDF5.__len__
|
|
433
374
|
0.47.2
|
|
434
375
|
- enh: add --version flag to CLI
|
|
435
376
|
0.47.1
|
|
@@ -3,7 +3,7 @@ include CREDITS
|
|
|
3
3
|
include LICENSE
|
|
4
4
|
include README.rst
|
|
5
5
|
include pyproject.toml
|
|
6
|
-
recursive-include dclab *.txt *.md *.pxd
|
|
6
|
+
recursive-include dclab *.txt *.md *.pxd
|
|
7
7
|
recursive-include docs *.py *.md *.txt *.rst *.bib *.gif *.jpg
|
|
8
8
|
recursive-include examples *.py *.jpg *.npy *.npz
|
|
9
9
|
recursive-include tests *.zip *.md *.py *.txt
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: dclab
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.18.0
|
|
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>
|
|
@@ -23,7 +23,7 @@ Requires-Dist: importlib-resources>=6.0
|
|
|
23
23
|
Requires-Dist: numpy<3,>=1.21
|
|
24
24
|
Requires-Dist: scipy<2,>=1.10.0
|
|
25
25
|
Provides-Extra: all
|
|
26
|
-
Requires-Dist: dclab[dcor,export,http,s3,tdms]; extra == "all"
|
|
26
|
+
Requires-Dist: dclab[dcor,export,http,lme4,s3,tdms]; extra == "all"
|
|
27
27
|
Provides-Extra: dcor
|
|
28
28
|
Requires-Dist: requests<3,>=2.31.0; extra == "dcor"
|
|
29
29
|
Provides-Extra: export
|
|
@@ -31,6 +31,8 @@ Requires-Dist: fcswrite>=0.5.0; extra == "export"
|
|
|
31
31
|
Requires-Dist: imageio[ffmpeg]; extra == "export"
|
|
32
32
|
Provides-Extra: http
|
|
33
33
|
Requires-Dist: requests<3,>=2.31.0; extra == "http"
|
|
34
|
+
Provides-Extra: lme4
|
|
35
|
+
Requires-Dist: rpy2>=2.9.4; extra == "lme4"
|
|
34
36
|
Provides-Extra: s3
|
|
35
37
|
Requires-Dist: boto3>=1.34.31; extra == "s3"
|
|
36
38
|
Provides-Extra: tdms
|
|
@@ -161,17 +161,7 @@ CFG_METADATA = {
|
|
|
161
161
|
["subtract mean", fbool, "Subtract mean before processing"],
|
|
162
162
|
# pipeline_kws
|
|
163
163
|
["filter name", str, "Fourier filter used"],
|
|
164
|
-
#
|
|
165
|
-
# for determining the filter size in Fourier space. In DC, we
|
|
166
|
-
# need a well-defined value for the filter size. The most logical
|
|
167
|
-
# choice is to interpret the filter size as "frequency index", which
|
|
168
|
-
# is independent of the image shape and yields a good approximation
|
|
169
|
-
# of the actual resolution one can expect. The default value
|
|
170
|
-
# ("sideband distance") is a good choice for general QPI analysis,
|
|
171
|
-
# but there is no meaningful information one could extract from it
|
|
172
|
-
# by just looking at the number. Thus, the "filter size" that we
|
|
173
|
-
# see here corresponds to a filter size set in qpretrieve where
|
|
174
|
-
# `filter_size_interpretation="frequency index"`.
|
|
164
|
+
# Corresponds to `filter_size_interpretation="frequency index"`
|
|
175
165
|
["filter size", float, "Fourier filter size [1/pix]"],
|
|
176
166
|
["scale to filter", fboolorfloat, "Scale QPI data to filter size"],
|
|
177
167
|
# x, y coordinates, don't set if you wish None to be the default
|
|
@@ -120,10 +120,6 @@ def get_viscosity(medium: str = "0.49% MC-PBS",
|
|
|
120
120
|
if medium == "water":
|
|
121
121
|
# We ignore the `model`, because it's user convenient.
|
|
122
122
|
eta = get_viscosity_water_kestin_1978(temperature=temperature)
|
|
123
|
-
elif not flow_rate:
|
|
124
|
-
# When flow rate is zero, we cannot compute the viscosity for
|
|
125
|
-
# anything other than water above.
|
|
126
|
-
eta = np.nan
|
|
127
123
|
elif medium in ["0.49% MC-PBS", "0.59% MC-PBS", "0.83% MC-PBS"]:
|
|
128
124
|
kwargs = {"medium": medium,
|
|
129
125
|
"temperature": temperature,
|
|
@@ -27,14 +27,6 @@ REGEXP_HTTP_URL = re.compile(
|
|
|
27
27
|
)
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
class ETagNotInResponseHeaderWarning(UserWarning):
|
|
31
|
-
"""Used for cases where the requests.Response does not contain an ETag"""
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class ConnectionTimeoutWarning(UserWarning):
|
|
35
|
-
"""Used when a connection fails or times out"""
|
|
36
|
-
|
|
37
|
-
|
|
38
30
|
class HTTPFile(io.IOBase):
|
|
39
31
|
def __init__(self, url, chunk_size=2**18, keep_chunks=200):
|
|
40
32
|
"""Chunk-cached access to a URL supporting range requests
|
|
@@ -86,8 +78,7 @@ class HTTPFile(io.IOBase):
|
|
|
86
78
|
etag = resp.headers.get("etag", "").strip("'").strip('"')
|
|
87
79
|
if len(etag) < 5:
|
|
88
80
|
etag = None
|
|
89
|
-
warnings.warn(f"Got empty ETag header for {self.url}"
|
|
90
|
-
ETagNotInResponseHeaderWarning)
|
|
81
|
+
warnings.warn(f"Got empty ETag header for {self.url}")
|
|
91
82
|
self._etag = etag
|
|
92
83
|
|
|
93
84
|
@property
|
|
@@ -247,8 +238,7 @@ class ResoluteRequestsSession(requests.Session):
|
|
|
247
238
|
requests.exceptions.ConnectTimeout,
|
|
248
239
|
requests.urllib3.exceptions.ConnectionError,
|
|
249
240
|
requests.urllib3.exceptions.ReadTimeoutError) as e:
|
|
250
|
-
warnings.warn(f"Encountered {e} for {args} {kwargs}"
|
|
251
|
-
ConnectionTimeoutWarning)
|
|
241
|
+
warnings.warn(f"Encountered {e} for {args} {kwargs}")
|
|
252
242
|
continue
|
|
253
243
|
else:
|
|
254
244
|
break
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import importlib
|
|
2
|
+
import os
|
|
3
|
+
import warnings
|
|
4
|
+
|
|
5
|
+
from ..external.packaging import parse as parse_version
|
|
6
|
+
|
|
7
|
+
#: Minimum R version
|
|
8
|
+
#: This is actually a dependency for rpy2, because the API changed then
|
|
9
|
+
#: (ffi.error: symbol 'R_tryCatchError' not found in library).
|
|
10
|
+
R_MIN_VERSION = "3.6.0"
|
|
11
|
+
|
|
12
|
+
#: Minimum rpy2 version
|
|
13
|
+
RPY2_MIN_VERSION = "2.9.4"
|
|
14
|
+
|
|
15
|
+
R_SUBMODULES = [
|
|
16
|
+
"rpy2.robjects.packages",
|
|
17
|
+
"rpy2.situation",
|
|
18
|
+
"rpy2.robjects.vectors",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
R_SUBMODULES_3 = [
|
|
22
|
+
"rpy2.rinterface_lib.callbacks",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class RPY2UnavailableError(BaseException):
|
|
27
|
+
pass
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class RPY2ImportError(RPY2UnavailableError):
|
|
31
|
+
pass
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class RPY2OutdatedError(RPY2UnavailableError):
|
|
35
|
+
pass
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class RUnavailableError(BaseException):
|
|
39
|
+
pass
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class ROutdatedError(RUnavailableError):
|
|
43
|
+
pass
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class MockRPackage:
|
|
47
|
+
def __init__(self, exception):
|
|
48
|
+
self.exception = exception
|
|
49
|
+
|
|
50
|
+
def __getattr__(self, item):
|
|
51
|
+
raise self.exception
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def import_r_submodules():
|
|
55
|
+
importlib.import_module("rpy2.situation")
|
|
56
|
+
r_home = rpy2.situation.get_r_home()
|
|
57
|
+
if r_home is not None:
|
|
58
|
+
if os.environ.get("R_HOME", None) is None:
|
|
59
|
+
# set R_HOME globally (https://github.com/rpy2/rpy2/issues/796)
|
|
60
|
+
os.environ["R_HOME"] = r_home
|
|
61
|
+
if rpy2_is_version_3:
|
|
62
|
+
mods = R_SUBMODULES + R_SUBMODULES_3
|
|
63
|
+
else:
|
|
64
|
+
mods = R_SUBMODULES
|
|
65
|
+
try:
|
|
66
|
+
for sm in mods:
|
|
67
|
+
importlib.import_module(sm)
|
|
68
|
+
except rpy2.rinterface_lib.openrlib.ffi.error as exc:
|
|
69
|
+
# This error happens when the installed R version is too old:
|
|
70
|
+
# "ffi.error: symbol 'R_tryCatchError' not found in library"
|
|
71
|
+
raise ROutdatedError(
|
|
72
|
+
f"Encountered '{exc.__class__.__name__}: {exc}'. "
|
|
73
|
+
f"Please make sure you have 'R>={R_MIN_VERSION}'!")
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
try:
|
|
77
|
+
rpy2 = importlib.import_module("rpy2")
|
|
78
|
+
if parse_version(rpy2.__version__) < parse_version(RPY2_MIN_VERSION):
|
|
79
|
+
raise RPY2OutdatedError(f"Please install 'rpy2>={RPY2_MIN_VERSION}'!")
|
|
80
|
+
except ImportError:
|
|
81
|
+
rpy2 = MockRPackage(
|
|
82
|
+
RPY2ImportError(f"Please install 'rpy2>={RPY2_MIN_VERSION}'!"))
|
|
83
|
+
rpy2_is_version_3 = False
|
|
84
|
+
except BaseException as e:
|
|
85
|
+
rpy2 = MockRPackage(e)
|
|
86
|
+
rpy2_is_version_3 = False
|
|
87
|
+
else:
|
|
88
|
+
rpy2_is_version_3 = parse_version(rpy2.__version__) >= parse_version("3.0")
|
|
89
|
+
try:
|
|
90
|
+
import_r_submodules()
|
|
91
|
+
except RUnavailableError as e:
|
|
92
|
+
warnings.warn("There is an issue with the linked R version: "
|
|
93
|
+
+ f"{e.__class__.__name__}: {e}")
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
import os
|
|
3
|
+
import subprocess as sp
|
|
4
|
+
|
|
5
|
+
from .rlibs import (
|
|
6
|
+
RUnavailableError, rpy2, rpy2_is_version_3, import_r_submodules)
|
|
7
|
+
|
|
8
|
+
# Disable rpy2 logger because of unnecessary prints to stdout
|
|
9
|
+
logging.getLogger("rpy2.rinterface_lib.callbacks").disabled = True
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class RNotFoundError(BaseException):
|
|
13
|
+
pass
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class AutoRConsole(object):
|
|
17
|
+
"""Helper class for catching R console output"""
|
|
18
|
+
lock = False
|
|
19
|
+
perform_lock = rpy2_is_version_3
|
|
20
|
+
|
|
21
|
+
def __init__(self):
|
|
22
|
+
"""
|
|
23
|
+
By default, this console always returns "yes" when asked a
|
|
24
|
+
question. If you need something different, you can subclass
|
|
25
|
+
and override `consoleread` fucntion. The console stream is
|
|
26
|
+
recorded in `self.stream`.
|
|
27
|
+
"""
|
|
28
|
+
self.stream = [["init", "Starting RConsole class\n"]]
|
|
29
|
+
if AutoRConsole.perform_lock:
|
|
30
|
+
if AutoRConsole.lock:
|
|
31
|
+
raise ValueError("Only one RConsole instance allowed!")
|
|
32
|
+
AutoRConsole.lock = True
|
|
33
|
+
self.original_funcs = {
|
|
34
|
+
"consoleread": rpy2.rinterface_lib.callbacks.consoleread,
|
|
35
|
+
"consolewrite_print":
|
|
36
|
+
rpy2.rinterface_lib.callbacks.consolewrite_print,
|
|
37
|
+
"consolewrite_warnerror":
|
|
38
|
+
rpy2.rinterface_lib.callbacks.consolewrite_warnerror,
|
|
39
|
+
}
|
|
40
|
+
rpy2.rinterface_lib.callbacks.consoleread = self.consoleread
|
|
41
|
+
rpy2.rinterface_lib.callbacks.consolewrite_print = \
|
|
42
|
+
self.consolewrite_print
|
|
43
|
+
rpy2.rinterface_lib.callbacks.showmessage = \
|
|
44
|
+
self.consolewrite_print
|
|
45
|
+
|
|
46
|
+
rpy2.rinterface_lib.callbacks.consolewrite_warnerror = \
|
|
47
|
+
self.consolewrite_warnerror
|
|
48
|
+
# Set locale (to get always English messages)
|
|
49
|
+
rpy2.robjects.r('Sys.setlocale("LC_MESSAGES", "C")')
|
|
50
|
+
rpy2.robjects.r('Sys.setlocale("LC_CTYPE", "C")')
|
|
51
|
+
|
|
52
|
+
def __enter__(self):
|
|
53
|
+
return self
|
|
54
|
+
|
|
55
|
+
def __exit__(self, *args):
|
|
56
|
+
if AutoRConsole.perform_lock:
|
|
57
|
+
AutoRConsole.lock = False
|
|
58
|
+
rpy2.rinterface_lib.callbacks.consoleread = \
|
|
59
|
+
self.original_funcs["consoleread"]
|
|
60
|
+
rpy2.rinterface_lib.callbacks.consolewrite_print = \
|
|
61
|
+
self.original_funcs["consolewrite_print"]
|
|
62
|
+
rpy2.rinterface_lib.callbacks.consolewrite_warnerror = \
|
|
63
|
+
self.original_funcs["consolewrite_warnerror"]
|
|
64
|
+
|
|
65
|
+
def close(self):
|
|
66
|
+
"""Remove the rpy2 monkeypatches"""
|
|
67
|
+
self.__exit__()
|
|
68
|
+
|
|
69
|
+
def consoleread(self, prompt):
|
|
70
|
+
"""Read user input, returns "yes" by default"""
|
|
71
|
+
self.write_to_stream("consoleread", prompt + "YES")
|
|
72
|
+
return "yes"
|
|
73
|
+
|
|
74
|
+
def consolewrite_print(self, s):
|
|
75
|
+
self.write_to_stream("consolewrite_print", s)
|
|
76
|
+
|
|
77
|
+
def consolewrite_warnerror(self, s):
|
|
78
|
+
self.write_to_stream("consolewrite_warnerror", s)
|
|
79
|
+
|
|
80
|
+
def write_to_stream(self, topic, s):
|
|
81
|
+
prev_topic = self.stream[-1][0]
|
|
82
|
+
same_topic = prev_topic == topic
|
|
83
|
+
unfinished_line = self.stream[-1][1][-1] not in ["\n", "\r"]
|
|
84
|
+
if same_topic and unfinished_line:
|
|
85
|
+
# append to previous line
|
|
86
|
+
self.stream[-1][1] += s
|
|
87
|
+
else:
|
|
88
|
+
self.stream.append([topic, s])
|
|
89
|
+
|
|
90
|
+
def get_prints(self):
|
|
91
|
+
prints = []
|
|
92
|
+
for line in self.stream:
|
|
93
|
+
if line[0] == "consolewrite_print":
|
|
94
|
+
prints.append(line[1].strip())
|
|
95
|
+
return prints
|
|
96
|
+
|
|
97
|
+
def get_warnerrors(self):
|
|
98
|
+
warnerrors = []
|
|
99
|
+
for line in self.stream:
|
|
100
|
+
if line[0] == "consolewrite_warnerror":
|
|
101
|
+
warnerrors.append(line[1].strip())
|
|
102
|
+
return warnerrors
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def check_r():
|
|
106
|
+
"""Make sure R is installed an R HOME is set"""
|
|
107
|
+
if not has_r():
|
|
108
|
+
raise RNotFoundError("Cannot find R, please set its path with the "
|
|
109
|
+
+ "`set_r_path` function.")
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def get_r_path():
|
|
113
|
+
"""Get the path of the R executable/binary from rpy2"""
|
|
114
|
+
r_home = rpy2.situation.get_r_home()
|
|
115
|
+
return rpy2.situation.get_r_exec(r_home)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def get_r_version():
|
|
119
|
+
check_r()
|
|
120
|
+
ver_string = rpy2.situation.r_version_from_subprocess().strip()
|
|
121
|
+
if ver_string:
|
|
122
|
+
# get the actual version string
|
|
123
|
+
if ver_string.startswith("R version "):
|
|
124
|
+
ver_string = ver_string.split(" ")[2]
|
|
125
|
+
return ver_string
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
def has_lme4():
|
|
129
|
+
"""Return True if the lme4 package is installed"""
|
|
130
|
+
check_r()
|
|
131
|
+
lme4_there = rpy2.robjects.packages.isinstalled("lme4")
|
|
132
|
+
statmod_there = rpy2.robjects.packages.isinstalled("statmod")
|
|
133
|
+
nloptr_there = rpy2.robjects.packages.isinstalled("nloptr")
|
|
134
|
+
return lme4_there and statmod_there and nloptr_there
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def has_r():
|
|
138
|
+
"""Return True if R is available"""
|
|
139
|
+
try:
|
|
140
|
+
hasr = rpy2.situation.get_r_home() is not None
|
|
141
|
+
except RUnavailableError:
|
|
142
|
+
hasr = False
|
|
143
|
+
return hasr
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
def import_lme4():
|
|
147
|
+
check_r()
|
|
148
|
+
if has_lme4():
|
|
149
|
+
lme4pkg = rpy2.robjects.packages.importr("lme4")
|
|
150
|
+
else:
|
|
151
|
+
raise ValueError(
|
|
152
|
+
"The R package 'lme4' is not installed, please install it via "
|
|
153
|
+
+ "`dclab.lme4.rsetup.install_lme4()` or by executing "
|
|
154
|
+
+ "in a shell: R -e " + '"install.packages(' + "'lme4', "
|
|
155
|
+
+ "repos='http://cran.rstudio.org')" + '"')
|
|
156
|
+
return lme4pkg
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
def install_lme4():
|
|
160
|
+
"""Install the lme4 package (if not already installed)
|
|
161
|
+
|
|
162
|
+
The packages are installed to the user data directory
|
|
163
|
+
given in :const:`lib_path`.
|
|
164
|
+
"""
|
|
165
|
+
check_r()
|
|
166
|
+
if not has_lme4():
|
|
167
|
+
# import R's utility package
|
|
168
|
+
utils = rpy2.robjects.packages.importr('utils')
|
|
169
|
+
# select the first mirror in the list
|
|
170
|
+
utils.chooseCRANmirror(ind=1)
|
|
171
|
+
# install lme4 to user data directory (say yes to user dir install)
|
|
172
|
+
with AutoRConsole() as rc:
|
|
173
|
+
# install statmod and nloptr first
|
|
174
|
+
# (Doesn't R have package dependencies?!)
|
|
175
|
+
utils.install_packages(
|
|
176
|
+
rpy2.robjects.vectors.StrVector(["statmod", "nloptr", "lme4"]))
|
|
177
|
+
return rc
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
def set_r_path(r_path):
|
|
181
|
+
"""Set the path of the R executable/binary for rpy2"""
|
|
182
|
+
if hasattr(sp, 'STARTUPINFO'):
|
|
183
|
+
# On Windows, subprocess calls will pop up a command window by
|
|
184
|
+
# default when run from Pyinstaller with the ``--noconsole``
|
|
185
|
+
# option. Avoid this distraction.
|
|
186
|
+
si = sp.STARTUPINFO()
|
|
187
|
+
si.dwFlags |= sp.STARTF_USESHOWWINDOW
|
|
188
|
+
# Windows doesn't search the path by default. Pass it an
|
|
189
|
+
# environment so it will.
|
|
190
|
+
env = os.environ
|
|
191
|
+
else:
|
|
192
|
+
si = None
|
|
193
|
+
env = None
|
|
194
|
+
|
|
195
|
+
tmp = sp.check_output((r_path, 'RHOME'),
|
|
196
|
+
startupinfo=si,
|
|
197
|
+
env=env,
|
|
198
|
+
text=True,
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
r_home = tmp.split(os.linesep)
|
|
202
|
+
if r_home[0].startswith('WARNING'):
|
|
203
|
+
res = r_home[1]
|
|
204
|
+
else:
|
|
205
|
+
res = r_home[0].strip()
|
|
206
|
+
os.environ["R_HOME"] = res
|
|
207
|
+
import_r_submodules()
|