MouseLand / suite2p

cell detection in calcium imaging recordings
http://www.suite2p.org
GNU General Public License v3.0
334 stars 239 forks source link

BUG: Unable to extract dendritic ROIs #1094

Open seethakris opened 4 months ago

seethakris commented 4 months ago

Describe the issue:

I first ran suite2p with the default ops for extracting dendrites, which resulted in the extracted suite2p ROIs looking like cellular structures

Screenshot 2024-02-12 at 8 39 03 PM

I then re ran with some changes to the parameters, and with denoising. This resulted in sparse noisy ROIs being extracted (attached ops and image). I tried a few other parameters which gave everything in between these two examples but never had any of the dendrites picked up.

Screenshot 2024-02-21 at 11 45 01 AM Screenshot 2024-02-21 at 11 48 45 AM

The image does have low SNR which could be the reason for the low pick up of ROIs, but I am still able to view dendritic transients above noise level when I run the video on ImageJ. I am just surprised that none of the ROIs I am extracting overlap around the dendritic components in the image. Is there a specific parameter that I am missing to use, if so can it be included in the ops for axon/dendrite capture.

A sample tiff (1000 frames) can be downloaded here: https://uchicago.box.com/s/13ap0t144uvapq3lneef3apqdcbf6wdm

The whole dataset in h5 format (30000 frames) can be downloaded from here: https://uchicago.box.com/s/pulxnw1h2yekft2sdbbfme6vj2twmag8

Thanks for the support!

Reproduce the code example:

Ops.npy

{'suite2p_version': '0.14.3',
 'look_one_level_down': 0.0,
 'fast_disk': '/Users/seethakrishnan/Library/CloudStorage/Box-Box/DendriticData/Goodsubset/AC13/07032023/apical',
 'delete_bin': True,
 'mesoscan': False,
 'bruker': False,
 'bruker_bidirectional': False,
 'h5py': [],
 'h5py_key': 'data',
 'nwb_file': '',
 'nwb_driver': '',
 'nwb_series': '',
 'save_path0': '/Users/seethakrishnan/Library/CloudStorage/Box-Box/DendriticData/Goodsubset/AC13/07032023/apical',
 'save_folder': 'suite2p',
 'subfolders': [],
 'move_bin': False,
 'nplanes': 1,
 'nchannels': 1,
 'functional_chan': 1,
 'tau': 0.7,
 'fs': 30.0,
 'force_sktiff': False,
 'frames_include': -1,
 'multiplane_parallel': 0.0,
 'ignore_flyback': [],
 'preclassify': 0.0,
 'save_mat': False,
 'save_NWB': 0.0,
 'combined': 1.0,
 'aspect': 1.0,
 'do_bidiphase': False,
 'bidiphase': 0.0,
 'bidi_corrected': False,
 'do_registration': 1,
 'two_step_registration': 0.0,
 'keep_movie_raw': False,
 'nimg_init': 300,
 'batch_size': 500,
 'maxregshift': 0.1,
 'align_by_chan': 1,
 'reg_tif': True,
 'reg_tif_chan2': False,
 'subpixel': 10,
 'smooth_sigma_time': 0.0,
 'smooth_sigma': 1.15,
 'th_badframes': 1.0,
 'norm_frames': True,
 'force_refImg': False,
 'pad_fft': False,
 'nonrigid': True,
 'block_size': [128, 128],
 'snr_thresh': 1.2,
 'maxregshiftNR': 5.0,
 '1Preg': False,
 'spatial_hp_reg': 42.0,
 'pre_smooth': 0.0,
 'spatial_taper': 40.0,
 'roidetect': True,
 '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.0,
 'spatial_hp_detect': 25.0,
 'denoise': 1.0,
 'anatomical_only': 0,
 'diameter': 0,
 'cellprob_threshold': 0.0,
 'flow_threshold': 1.5,
 'spatial_hp_cp': 0.0,
 'pretrained_model': 'cyto',
 'soma_crop': 1.0,
 '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,
 'input_format': 'h5',
}

Error message:

No response

Version information:

0.14.3

Context for the issue:

No response