sl-shared-assets 1.0.0rc20__py3-none-any.whl → 1.0.0rc22__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of sl-shared-assets might be problematic. Click here for more details.
- sl_shared_assets/__init__.py +27 -27
- sl_shared_assets/__init__.pyi +24 -22
- sl_shared_assets/cli.py +266 -40
- sl_shared_assets/cli.pyi +73 -14
- sl_shared_assets/data_classes/__init__.py +23 -20
- sl_shared_assets/data_classes/__init__.pyi +18 -18
- sl_shared_assets/data_classes/configuration_data.py +408 -26
- sl_shared_assets/data_classes/configuration_data.pyi +173 -15
- sl_shared_assets/data_classes/runtime_data.py +49 -43
- sl_shared_assets/data_classes/runtime_data.pyi +37 -40
- sl_shared_assets/data_classes/session_data.py +168 -914
- sl_shared_assets/data_classes/session_data.pyi +55 -350
- sl_shared_assets/data_classes/surgery_data.py +3 -3
- sl_shared_assets/data_classes/surgery_data.pyi +2 -2
- sl_shared_assets/tools/__init__.py +8 -1
- sl_shared_assets/tools/__init__.pyi +11 -1
- sl_shared_assets/tools/ascension_tools.py +27 -26
- sl_shared_assets/tools/ascension_tools.pyi +5 -5
- sl_shared_assets/tools/packaging_tools.py +14 -1
- sl_shared_assets/tools/packaging_tools.pyi +4 -0
- sl_shared_assets/tools/project_management_tools.py +164 -0
- sl_shared_assets/tools/project_management_tools.pyi +48 -0
- {sl_shared_assets-1.0.0rc20.dist-info → sl_shared_assets-1.0.0rc22.dist-info}/METADATA +21 -4
- sl_shared_assets-1.0.0rc22.dist-info/RECORD +36 -0
- sl_shared_assets-1.0.0rc22.dist-info/entry_points.txt +8 -0
- sl_shared_assets/suite2p/__init__.py +0 -8
- sl_shared_assets/suite2p/__init__.pyi +0 -4
- sl_shared_assets/suite2p/multi_day.py +0 -224
- sl_shared_assets/suite2p/multi_day.pyi +0 -104
- sl_shared_assets/suite2p/single_day.py +0 -564
- sl_shared_assets/suite2p/single_day.pyi +0 -220
- sl_shared_assets-1.0.0rc20.dist-info/RECORD +0 -40
- sl_shared_assets-1.0.0rc20.dist-info/entry_points.txt +0 -4
- {sl_shared_assets-1.0.0rc20.dist-info → sl_shared_assets-1.0.0rc22.dist-info}/WHEEL +0 -0
- {sl_shared_assets-1.0.0rc20.dist-info → sl_shared_assets-1.0.0rc22.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
from typing import Any
|
|
2
|
-
from pathlib import Path
|
|
3
|
-
from dataclasses import field, dataclass
|
|
4
|
-
|
|
5
|
-
from _typeshed import Incomplete
|
|
6
|
-
from ataraxis_data_structures import YamlConfig
|
|
7
|
-
|
|
8
|
-
@dataclass
|
|
9
|
-
class Main:
|
|
10
|
-
"""Stores global parameters that broadly define the suite2p single-day processing configuration."""
|
|
11
|
-
|
|
12
|
-
nplanes: int = ...
|
|
13
|
-
nchannels: int = ...
|
|
14
|
-
functional_chan: int = ...
|
|
15
|
-
tau: float = ...
|
|
16
|
-
force_sktiff: bool = ...
|
|
17
|
-
fs: float = ...
|
|
18
|
-
do_bidiphase: bool = ...
|
|
19
|
-
bidiphase: int = ...
|
|
20
|
-
bidi_corrected: bool = ...
|
|
21
|
-
frames_include: int = ...
|
|
22
|
-
multiplane_parallel: bool = ...
|
|
23
|
-
parallel_planes: int = ...
|
|
24
|
-
ignore_flyback: list[int] = field(default_factory=list)
|
|
25
|
-
|
|
26
|
-
@dataclass
|
|
27
|
-
class FileIO:
|
|
28
|
-
"""Stores general I/O parameters that specify input data location, format, and working and output directories."""
|
|
29
|
-
|
|
30
|
-
fast_disk: str = ...
|
|
31
|
-
delete_bin: bool = ...
|
|
32
|
-
mesoscan: bool = ...
|
|
33
|
-
bruker: bool = ...
|
|
34
|
-
bruker_bidirectional: bool = ...
|
|
35
|
-
h5py: list[str] = field(default_factory=list)
|
|
36
|
-
h5py_key: str = ...
|
|
37
|
-
nwb_file: str = ...
|
|
38
|
-
nwb_driver: str = ...
|
|
39
|
-
nwb_series: str = ...
|
|
40
|
-
save_path0: str = ...
|
|
41
|
-
save_folder: str = ...
|
|
42
|
-
data_path: list[str] = field(default_factory=list)
|
|
43
|
-
look_one_level_down: bool = ...
|
|
44
|
-
subfolders: list[str] = field(default_factory=list)
|
|
45
|
-
move_bin: bool = ...
|
|
46
|
-
|
|
47
|
-
@dataclass
|
|
48
|
-
class Output:
|
|
49
|
-
"""Stores parameters for aggregating and saving the processing results of each plane as a unified directory or
|
|
50
|
-
file."""
|
|
51
|
-
|
|
52
|
-
save_nwb: bool = ...
|
|
53
|
-
save_mat: bool = ...
|
|
54
|
-
combined: bool = ...
|
|
55
|
-
aspect: float = ...
|
|
56
|
-
|
|
57
|
-
@dataclass
|
|
58
|
-
class Registration:
|
|
59
|
-
"""Stores parameters for rigid registration, which is used to correct motion artifacts between frames by
|
|
60
|
-
counter-shifting the entire frame."""
|
|
61
|
-
|
|
62
|
-
do_registration: bool = ...
|
|
63
|
-
align_by_chan: int = ...
|
|
64
|
-
nimg_init: int = ...
|
|
65
|
-
batch_size: int = ...
|
|
66
|
-
maxregshift: float = ...
|
|
67
|
-
smooth_sigma: float = ...
|
|
68
|
-
smooth_sigma_time: float = ...
|
|
69
|
-
keep_movie_raw: bool = ...
|
|
70
|
-
two_step_registration: bool = ...
|
|
71
|
-
reg_tif: bool = ...
|
|
72
|
-
reg_tif_chan2: bool = ...
|
|
73
|
-
th_badframes: float = ...
|
|
74
|
-
norm_frames: bool = ...
|
|
75
|
-
force_refImg: bool = ...
|
|
76
|
-
pad_fft: bool = ...
|
|
77
|
-
do_regmetrics: bool = ...
|
|
78
|
-
reg_metric_n_pc: int = ...
|
|
79
|
-
|
|
80
|
-
@dataclass
|
|
81
|
-
class OnePRegistration:
|
|
82
|
-
"""Stores parameters for additional pre-registration processing used to improve the registration of 1-photon
|
|
83
|
-
datasets."""
|
|
84
|
-
|
|
85
|
-
one_p_reg: bool = ...
|
|
86
|
-
spatial_hp_reg: int = ...
|
|
87
|
-
pre_smooth: float = ...
|
|
88
|
-
spatial_taper: float = ...
|
|
89
|
-
|
|
90
|
-
@dataclass
|
|
91
|
-
class NonRigid:
|
|
92
|
-
"""Stores parameters for non-rigid registration, which is used to improve motion registration in complex
|
|
93
|
-
datasets by dividing frames into subregions and shifting each subregion independently of other subregions."""
|
|
94
|
-
|
|
95
|
-
nonrigid: bool = ...
|
|
96
|
-
block_size: list[int] = field(default_factory=Incomplete)
|
|
97
|
-
snr_thresh: float = ...
|
|
98
|
-
maxregshiftNR: float = ...
|
|
99
|
-
|
|
100
|
-
@dataclass
|
|
101
|
-
class ROIDetection:
|
|
102
|
-
"""Stores parameters for cell ROI detection."""
|
|
103
|
-
|
|
104
|
-
preclassify: float = ...
|
|
105
|
-
roidetect: bool = ...
|
|
106
|
-
sparse_mode: bool = ...
|
|
107
|
-
spatial_scale: int = ...
|
|
108
|
-
connected: bool = ...
|
|
109
|
-
threshold_scaling: float = ...
|
|
110
|
-
spatial_hp_detect: int = ...
|
|
111
|
-
max_overlap: float = ...
|
|
112
|
-
high_pass: int = ...
|
|
113
|
-
smooth_masks: bool = ...
|
|
114
|
-
max_iterations: int = ...
|
|
115
|
-
nbinned: int = ...
|
|
116
|
-
denoise: bool = ...
|
|
117
|
-
|
|
118
|
-
@dataclass
|
|
119
|
-
class CellposeDetection:
|
|
120
|
-
"""Stores parameters for the Cellpose algorithm, which can optionally be used to improve cell ROI extraction."""
|
|
121
|
-
|
|
122
|
-
anatomical_only: int = ...
|
|
123
|
-
diameter: int = ...
|
|
124
|
-
cellprob_threshold: float = ...
|
|
125
|
-
flow_threshold: float = ...
|
|
126
|
-
spatial_hp_cp: int = ...
|
|
127
|
-
pretrained_model: str = ...
|
|
128
|
-
|
|
129
|
-
@dataclass
|
|
130
|
-
class SignalExtraction:
|
|
131
|
-
"""Stores parameters for extracting fluorescence signals from ROIs and surrounding neuropil regions."""
|
|
132
|
-
|
|
133
|
-
neuropil_extract: bool = ...
|
|
134
|
-
allow_overlap: bool = ...
|
|
135
|
-
min_neuropil_pixels: int = ...
|
|
136
|
-
inner_neuropil_radius: int = ...
|
|
137
|
-
lam_percentile: int = ...
|
|
138
|
-
|
|
139
|
-
@dataclass
|
|
140
|
-
class SpikeDeconvolution:
|
|
141
|
-
"""Stores parameters for deconvolve fluorescence signals to infer spike trains."""
|
|
142
|
-
|
|
143
|
-
spikedetect: bool = ...
|
|
144
|
-
neucoeff: float = ...
|
|
145
|
-
baseline: str = ...
|
|
146
|
-
win_baseline: float = ...
|
|
147
|
-
sig_baseline: float = ...
|
|
148
|
-
prctile_baseline: float = ...
|
|
149
|
-
|
|
150
|
-
@dataclass
|
|
151
|
-
class Classification:
|
|
152
|
-
"""Stores parameters for classifying detected ROIs as real cells or artifacts."""
|
|
153
|
-
|
|
154
|
-
soma_crop: bool = ...
|
|
155
|
-
use_builtin_classifier: bool = ...
|
|
156
|
-
classifier_path: str = ...
|
|
157
|
-
|
|
158
|
-
@dataclass
|
|
159
|
-
class Channel2:
|
|
160
|
-
"""Stores parameters for processing the second channel in multichannel datasets."""
|
|
161
|
-
|
|
162
|
-
chan2_thres: float = ...
|
|
163
|
-
|
|
164
|
-
@dataclass
|
|
165
|
-
class SingleDayS2PConfiguration(YamlConfig):
|
|
166
|
-
"""Aggregates all user-addressable parameters of the single-day suite2p pipeline used to discover cell ROIs and
|
|
167
|
-
extract their fluorescence data.
|
|
168
|
-
|
|
169
|
-
This class is used during single-day processing to instruct suite2p on how to process the data. This class is based
|
|
170
|
-
on the 'default_ops' from the original suite2p package. As part of the suite2p refactoring performed in sl-suite2p
|
|
171
|
-
package, the 'default_ops' has been replaced with this class instance. Compared to the 'original' ops, it allows
|
|
172
|
-
saving configuration parameters as a .YAML file, which offers a better way of viewing and editing the parameters and
|
|
173
|
-
running suite2p pipeline on remote compute servers.
|
|
174
|
-
"""
|
|
175
|
-
|
|
176
|
-
main: Main = field(default_factory=Main)
|
|
177
|
-
file_io: FileIO = field(default_factory=FileIO)
|
|
178
|
-
output: Output = field(default_factory=Output)
|
|
179
|
-
registration: Registration = field(default_factory=Registration)
|
|
180
|
-
one_p_registration: OnePRegistration = field(default_factory=OnePRegistration)
|
|
181
|
-
non_rigid: NonRigid = field(default_factory=NonRigid)
|
|
182
|
-
roi_detection: ROIDetection = field(default_factory=ROIDetection)
|
|
183
|
-
cellpose_detection: CellposeDetection = field(default_factory=CellposeDetection)
|
|
184
|
-
signal_extraction: SignalExtraction = field(default_factory=SignalExtraction)
|
|
185
|
-
spike_deconvolution: SpikeDeconvolution = field(default_factory=SpikeDeconvolution)
|
|
186
|
-
classification: Classification = field(default_factory=Classification)
|
|
187
|
-
channel2: Channel2 = field(default_factory=Channel2)
|
|
188
|
-
def to_npy(self, output_directory: Path) -> None:
|
|
189
|
-
"""Saves the managed configuration data as an 'ops.npy' file under the target directory.
|
|
190
|
-
|
|
191
|
-
This method is mostly called by internal sl-suite2p functions to translate the user-specified configuration
|
|
192
|
-
file into the format used by suite2p pipelines.
|
|
193
|
-
|
|
194
|
-
Notes:
|
|
195
|
-
If the target output directory does not exist when this method is called, it will be created.
|
|
196
|
-
|
|
197
|
-
Args:
|
|
198
|
-
output_directory: The path to the directory where the 'ops.npy' file should be saved.
|
|
199
|
-
"""
|
|
200
|
-
def to_config(self, output_directory: Path) -> None:
|
|
201
|
-
"""Saves the managed configuration data as a 'single_day_s2p_configuration.yaml' file under the target
|
|
202
|
-
directory.
|
|
203
|
-
|
|
204
|
-
This method is typically used to dump the 'default' configuration parameters to disk as a user-editable
|
|
205
|
-
.yaml file. The user is then expected to modify these parameters as needed, before the class data is loaded and
|
|
206
|
-
used by the suite2p pipeline.
|
|
207
|
-
|
|
208
|
-
Notes:
|
|
209
|
-
If the target output directory does not exist when this method is called, it will be created.
|
|
210
|
-
|
|
211
|
-
Args:
|
|
212
|
-
output_directory: The path to the directory where the 'single_day_s2p_configuration.yaml' file should be
|
|
213
|
-
saved.
|
|
214
|
-
"""
|
|
215
|
-
def to_ops(self) -> dict[str, Any]:
|
|
216
|
-
"""Converts the class instance to a dictionary and returns it to caller.
|
|
217
|
-
|
|
218
|
-
This method is mostly called by internal sl-suite2p functions to translate the default configuration parameters
|
|
219
|
-
to the dictionary format used by suite2p pipelines.
|
|
220
|
-
"""
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
sl_shared_assets/__init__.py,sha256=VASYVzsHnaFykp1xdEjOgQdnfuqwokaKIp387zXyFqA,2080
|
|
2
|
-
sl_shared_assets/__init__.pyi,sha256=jCNSKprv3odCQv30EvLrW0mzxwdljZGWyX03mMajBkQ,2163
|
|
3
|
-
sl_shared_assets/cli.py,sha256=a4Ja2gm4ykOac7QmHen14Jhgu6955IUQDZrysp1RpFM,4207
|
|
4
|
-
sl_shared_assets/cli.pyi,sha256=AhD4v9NgVge9zpGA52L42WWLYHXCbyeFXKB9e2v8Xzk,1849
|
|
5
|
-
sl_shared_assets/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
sl_shared_assets/data_classes/__init__.py,sha256=pq-iyd4eyv1CPVcLcQQJBVAm7XCDWuZqxurrLOMW3e0,1702
|
|
7
|
-
sl_shared_assets/data_classes/__init__.pyi,sha256=gnwx-0wTKxOCuq0yNoF25m63byryyzUPeWJWEcK2jMA,1794
|
|
8
|
-
sl_shared_assets/data_classes/configuration_data.py,sha256=zKZ3cE2pZFDRiQ7off8hu2nV9JsBly9Phc5goY4qCH4,4163
|
|
9
|
-
sl_shared_assets/data_classes/configuration_data.pyi,sha256=HeKJWhkVEyAcwDr2dje_Fs2Mfa41CVl38YSh7js9WRE,2024
|
|
10
|
-
sl_shared_assets/data_classes/runtime_data.py,sha256=GupRuTRnbp-ggLiTeEyX9r12VaWqVHpwU7FxOm3MN3M,14909
|
|
11
|
-
sl_shared_assets/data_classes/runtime_data.pyi,sha256=yetdFz29QQyvMmpGTdWGxKSgWAdBZ9zsPM3fluDeDIY,6808
|
|
12
|
-
sl_shared_assets/data_classes/session_data.py,sha256=NyrDGvvD14VnYvGyW0VS4OUHhUWyJHMQ3KfoZo3JaBY,81887
|
|
13
|
-
sl_shared_assets/data_classes/session_data.pyi,sha256=m5B_W4Nh9Ua-qsUOPtM8IvaPG-alnJnHe8KJiAYllr0,30830
|
|
14
|
-
sl_shared_assets/data_classes/surgery_data.py,sha256=Z4QZAZCz0_w7qrGMMzYn-fwwwycw3ki9SPJU0kD5Ap4,7425
|
|
15
|
-
sl_shared_assets/data_classes/surgery_data.pyi,sha256=jLDK1fMli2yF0RkmQcED_iMZq8XIlbIqLysZZGlEJKY,2602
|
|
16
|
-
sl_shared_assets/server/__init__.py,sha256=nyX6-9ACcrQeRQOCNvBVrWSTHGjRPANIG_u0aq7HPTg,426
|
|
17
|
-
sl_shared_assets/server/__init__.pyi,sha256=7o99f8uf6NuBjMZjNAM1FX69Qbu5uBluRSAyaUWbXOU,263
|
|
18
|
-
sl_shared_assets/server/job.py,sha256=M7ZytqhluEV-YQPM9VQV3SqK-F9egQ3UcLc1SLBH4rA,7885
|
|
19
|
-
sl_shared_assets/server/job.pyi,sha256=cxgHMpuwHsJGf_ZcTSSa2tZNzeR_GxqlICOsYGV_oy0,5655
|
|
20
|
-
sl_shared_assets/server/server.py,sha256=NpqWVjvxdtxHZIooBVaKY2jEBDN3dGohBzrFA0TSKIU,9380
|
|
21
|
-
sl_shared_assets/server/server.pyi,sha256=uu-bs5LBuOF-AL7qroYFbGc1aWgBalm-uHUXzZNxheU,4144
|
|
22
|
-
sl_shared_assets/suite2p/__init__.py,sha256=8N2BQNINBkH7JNODmYACHhvUH_uurTuw7w0PW3rVRYM,411
|
|
23
|
-
sl_shared_assets/suite2p/__init__.pyi,sha256=o2R9hcKuCbzzFwjcHdnkLyG03cMBp-Zpn93P-_A4ZFY,224
|
|
24
|
-
sl_shared_assets/suite2p/multi_day.py,sha256=sjteUROBxx2mAziPv42_qMeP5cqofECvd2HE5WqGjvY,13114
|
|
25
|
-
sl_shared_assets/suite2p/multi_day.pyi,sha256=_kxgHqtsxIG__09YVv-YKEdgClOpTdN0o6fTE1CW4Mo,4315
|
|
26
|
-
sl_shared_assets/suite2p/single_day.py,sha256=v0_WAvXTYVB0RjTmNDaX2dWUKjFrtNM1suwIx8IIKBQ,29983
|
|
27
|
-
sl_shared_assets/suite2p/single_day.pyi,sha256=UxieE15msb-MPsqnPQr_3CdbYvYLRYfx70M_yYHl-98,7924
|
|
28
|
-
sl_shared_assets/tools/__init__.py,sha256=UWrNfseGupOrY4OK2PgDEJ-Q3LbSrPLC2pfaLm8wYBA,468
|
|
29
|
-
sl_shared_assets/tools/__init__.pyi,sha256=HwriMRN-9oZRiyvl5VvP8fm5Um3_YWUB4nqnCLMDayo,314
|
|
30
|
-
sl_shared_assets/tools/ascension_tools.py,sha256=y2w72Czpbw9LwgsbdEx_ckzMKTZ78cgKPTIk6vRYmAk,15877
|
|
31
|
-
sl_shared_assets/tools/ascension_tools.pyi,sha256=AE1buiE-rSLGpSPf4TVOtxUu12u-fXL6tL10RQCsrnQ,3973
|
|
32
|
-
sl_shared_assets/tools/packaging_tools.py,sha256=LOKCKvT6UD_cidCONaI4ctWyej5zEwwdhhgwYrj60Kg,6746
|
|
33
|
-
sl_shared_assets/tools/packaging_tools.pyi,sha256=hlAP9AxF7NHtFIPKjj5ehm8Vr9qIn6xDk4VvL0JuAmk,3055
|
|
34
|
-
sl_shared_assets/tools/transfer_tools.py,sha256=J26kwOp_NpPSY0-xu5FTw9udte-rm_mW1FJyaTNoqQI,6606
|
|
35
|
-
sl_shared_assets/tools/transfer_tools.pyi,sha256=FoH7eYZe7guGHfPr0MK5ggO62uXKwD2aJ7h1Bu7PaEE,3294
|
|
36
|
-
sl_shared_assets-1.0.0rc20.dist-info/METADATA,sha256=fgvVyVByniPRILIqCJO_SF5uG8ICEWGlw9oEi3sIke8,47884
|
|
37
|
-
sl_shared_assets-1.0.0rc20.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
38
|
-
sl_shared_assets-1.0.0rc20.dist-info/entry_points.txt,sha256=bdnmVAcK3nrKi9QEYeNMrCLFH5LQ4BMBfwbLIgLPtq4,222
|
|
39
|
-
sl_shared_assets-1.0.0rc20.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
40
|
-
sl_shared_assets-1.0.0rc20.dist-info/RECORD,,
|
|
File without changes
|
{sl_shared_assets-1.0.0rc20.dist-info → sl_shared_assets-1.0.0rc22.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|