Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: data_path key is checked even if h5py is supplied #1041

Closed
arielleleon opened this issue Oct 12, 2023 · 2 comments
Closed

BUG: data_path key is checked even if h5py is supplied #1041

arielleleon opened this issue Oct 12, 2023 · 2 comments

Comments

@arielleleon
Copy link
Contributor

arielleleon commented Oct 12, 2023

Describe the issue:

Hello - When an h5 file is supplied to suite2p through the run_s2p command as a list in the h5py input key, the data_path key is still checked in io.utils.find_files_open_binaries and subsequently, searches the data directory. It looks like this can be fixed by re-ordering the logic in the io.utils.find_files_open_binaries which I have created a PR for. I bring this up because in default_ops, it states that the data_path is deactivated if an h5py key is provided and I would like to be able to supply the key without out suite2p looking anywhere else. Thanks!

Reproduce the code example:

import suite2p

s2p_args = {'suite2p_version': '0.13.1', 'look_one_level_down': False, 'fast_disk': [], 'delete_bin': False, 'mesoscan': False, 'bruker': False, 'bruker_bidirectional': False, 'h5py': ['/tmp/nxf.ymdA9tRLDh/capsule/data/965980162.h5'], 'h5py_key': 'data', 'nwb_file': '', 'nwb_driver': '', 'nwb_series': '', 'save_path0': '/scratch/tmpay4zvwhe', 'save_folder': [], 'subfolders': [], 'move_bin': False, 'nplanes': 1, 'nchannels': 1, 'functional_chan': 1, 'tau': 1.0, 'fs': 10.0, 'force_sktiff': False, 'frames_include': -1, 'multiplane_parallel': False, 'ignore_flyback': [], 'preclassify': 0.0, 'save_mat': False, 'save_NWB': False, 'combined': True, 'aspect': 1.0, 'do_bidiphase': False, 'bidiphase': 0, 'bidi_corrected': False, 'do_registration': 1, 'two_step_registration': False, 'keep_movie_raw': False, 'nimg_init': 500, 'batch_size': 500, 'maxregshift': 0.2, 'align_by_chan': 1, 'reg_tif': False, 'reg_tif_chan2': False, 'subpixel': 10, 'smooth_sigma_time': 0.0, 'smooth_sigma': 1.15, 'th_badframes': 1.0, 'norm_frames': True, 'force_refImg': True, 'pad_fft': False, 'nonrigid': True, 'block_size': [128, 128], 'snr_thresh': 1.2, 'maxregshiftNR': 5, '1Preg': False, 'spatial_hp_reg': 42, 'pre_smooth': 0, 'spatial_taper': 40, 'roidetect': False, 'spikedetect': True, 'sparse_mode': True, 'spatial_scale': 0, 'connected': True, 'nbinned': 5000, 'max_iterations': 20, 'threshold_scaling': 1.0, 'max_overlap': 0.75, 'high_pass': 100, 'spatial_hp_detect': 25, 'denoise': False, 'anatomical_only': 0, 'diameter': 0, 'cellprob_threshold': 0.0, 'flow_threshold': 1.5, 'spatial_hp_cp': 0, 'pretrained_model': 'cyto', 'soma_crop': True, 'neuropil_extract': True, 'inner_neuropil_radius': 2, 'min_neuropil_pixels': 350, 'lam_percentile': 50.0, 'allow_overlap': False, 'use_builtin_classifier': False, 'classifier_path': '', 'chan2_thres': 0.65, 'baseline': 'maximin', 'win_baseline': 60.0, 'sig_baseline': 10.0, 'prctile_baseline': 8.0, 'neucoeff': 0.7, 'refImg': array([[247, 243, 263, ..., 244, 225, 254],
         [244, 251, 258, ..., 255, 245, 221],
         [241, 257, 251, ..., 258, 248, 239],
         ...,
         [268, 272, 266, ..., 191, 192, 191],
         [254, 257, 275, ..., 191, 184, 185],
         [297, 285, 263, ..., 193, 192, 185]], dtype=int16)}
suite2p.run_s2p(s2p_args)

Error message:

No error, just a note stating the following coming from the io.utils package:

NOTE: using a list of h5 files:
  ['/tmp/nxf.ymdA9tRLDh/capsule/data/965680907.h5', '/tmp/nxf.ymdA9tRLDh/capsule/data/965980162.h5']

Version information:

0.13.1

Context for the issue:

No response

@arielleleon
Copy link
Contributor Author

Here is a link to the PR #1042

@chriski777
Copy link
Collaborator

Closing since this was addressed with PR #1042. Thanks @arielleleon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants