suite2p
suite2p copied to clipboard
data_chan2.bin not found when manual labeling on another machine
I'm processing my data on a machine with Ubuntu, and then add manually some cells later on, on a different machine (macOS). Everything works well except when I try do manually add a ROI: after drawing my ROI, I click on Extract ROIs and I get this:
Masks made in 1.56 sec.
Extracted fluorescence from 1 ROIs in 841 frames, 0.07 sec.
Traceback (most recent call last):
File "/Users/simo/opt/anaconda3/envs/suite2p/lib/python3.8/site-packages/suite2p/gui/drawroi.py", line 457, in proc_ROI
F, Fneu, F_chan2, Fneu_chan2, spks, ops, stat = masks_and_traces(self.parent.ops, stat0, self.parent.stat)
File "/Users/simo/opt/anaconda3/envs/suite2p/lib/python3.8/site-packages/suite2p/gui/drawroi.py", line 51, in masks_and_traces
F, Fneu, F_chan2, Fneu_chan2, ops = extract_traces_from_masks(ops,
File "/Users/simo/opt/anaconda3/envs/suite2p/lib/python3.8/site-packages/suite2p/extraction/extract.py", line 134, in extract_traces_from_masks
with BinaryFile(Ly=ops['Ly'], Lx=ops['Lx'],
File "/Users/simo/opt/anaconda3/envs/suite2p/lib/python3.8/site-packages/suite2p/io/binary.py", line 33, in __init__
self.read_file = open(read_filename, mode='rb')
FileNotFoundError: [Errno 2] No such file or directory: '/media/simo/Seagate/880 NBTH2B-GCaMP/20022022_NBT_H2B-GCaMP6s_nacre__HRASV12_40ng_4dpf/20022022_NBT_H2B-GCaMP6s_nacre__HRASV12_40ng_4dpf__fish2/fish2/hindbrain1/suite2p/plane0/data_chan2.bin'
with the last line addressing the location of the same data when using the Ubuntu machine (it's on an external SSD). Weirdly enough, this doesn't happen in all the files, and its occurrence seems completely random. This doesn't happen when doing everything on the same machine (either of the two). Unfortunately processing the files on the Mac is 10x slower, so I'd rather not. Any clue?
Cheers
Hi @simo-91, sorry for the late response. Are you able to find that .bin
file on the external SSD? Can you access it through the Mac?
Also, for some of these suite2p runs, do you know if you have ever set ops['delete_bin'] = false
?
Hi @simo-91, sorry for the late response. Are you able to find that
.bin
file on the external SSD? Can you access it through the Mac?
Yes I can.
Also, for some of these suite2p runs, do you know if you have ever set
ops['delete_bin'] = false
?
ops['delete_bin']
is set to 0
I see. Is the path corresponding to the external drive on your Mac machine the same as the path specified in the Ubuntu machine?
If I'm understanding correctly, this error is what you see once you process these files on your Ubuntu and then try to add ROIs on your Mac, right? If so, you may need to change some parameters (e.g., ops[reg_file]
) to contain the correct path for use with your Mac. I believe the /media
path prefix is Ubuntu-specific and Mac might actually use /Volume
or some other prefix when referring to external hard drives.
I see. Is the path corresponding to the external drive on your Mac machine the same as the path specified in the Ubuntu machine?
If I'm understanding correctly, this error is what you see once you process these files on your Ubuntu and then try to add ROIs on your Mac, right? If so, you may need to change some parameters (e.g.,
ops[reg_file]
) to contain the correct path for use with your Mac. I believe the/media
path prefix is Ubuntu-specific and Mac might actually use/Volume
or some other prefix when referring to external hard drives.
I see. That's kind of a drag as I'm using the GUI and I'm not sure I can do that there? Thanks in any case
You might find a workaround by creating shortcuts / hard links / soft links on your Mac to simulate the same file paths as during the original (Ubuntu) run.
@simo-91, with the GUI, there should be an option to save your ops to a .npy
file. You can then also make the manipulation I suggest regarding the ops['reg_file']
. @generalciao's idea is also great if you'd like to avoid working with the ops.npy
file though I won't be able to provide much help on that front.
That's perfect, thank you both for the useful answers (both solved it in my case).