CINPLA / expipe-plugin-cinpla

Plugins for expipe command line interface
http://expipe-plugin-cinpla.readthedocs.io/en/latest/
GNU General Public License v3.0
1 stars 3 forks source link

spikesorting issue #74

Open mariapfj opened 1 month ago

mariapfj commented 1 month ago

getting an error when spikesorting \projects\ec109\maria\novel-env-nwb\actions\148-300921-2

Postprocessing Extracting waveforms Computing QC metrics Exporting to phy ERROR: unable to process 148-300921-2 Traceback (most recent call last): File "/fp/projects01/ec109/software/expipe-plugin-cinpla/src/expipe_plugin_cinpla/widgets/process.py", line 296, in on_run process.process_ecephys( File "/fp/projects01/ec109/software/expipe-plugin-cinpla/src/expipe_plugin_cinpla/scripts/process.py", line 274, in process_ecephys shutil.rmtree(phy_folder) File "/projects/ec109/conda-envs/cinpla/lib/python3.11/shutil.py", line 752, in rmtree _rmtree_safe_fd(fd, path, onerror) File "/projects/ec109/conda-envs/cinpla/lib/python3.11/shutil.py", line 672, in _rmtree_safe_fd _rmtree_safe_fd(dirfd, fullname, onerror) File "/projects/ec109/conda-envs/cinpla/lib/python3.11/shutil.py", line 672, in _rmtree_safe_fd _rmtree_safe_fd(dirfd, fullname, onerror) File "/projects/ec109/conda-envs/cinpla/lib/python3.11/shutil.py", line 672, in _rmtree_safe_fd _rmtree_safe_fd(dirfd, fullname, onerror) [Previous line repeated 2 more times] File "/projects/ec109/conda-envs/cinpla/lib/python3.11/shutil.py", line 683, in _rmtree_safe_fd onerror(os.rmdir, fullname, sys.exc_info()) File "/projects/ec109/conda-envs/cinpla/lib/python3.11/shutil.py", line 681, in _rmtree_safe_fd os.rmdir(entry.name, dir_fd=topfd) OSError: [Errno 39] Directory not empty: '_get_correlograms'

mariapfj commented 1 month ago

just tried to process it again and for some reason expipe saved as 148-300921-3 instead, deleting the curation I'd already completed for that recording?

Processing 148-300921-2

Cleaning up existing NWB file Removing LFP Removing RawUnits-kilosort2

Preprocessing recording: Num channels: 32 Duration: 612.59 s Detected bad channels: ['CH4' 'CH30' 'CH57' 'CH59' 'CH60'] Active channels: 27 Saving preprocessed recording

Spike sorting with kilosort2 using installed sorter Usage: which [options] [--] COMMAND [...] Write the full path of COMMAND(s) to standard output.

--version, -[vV] Print version and exit successfully. --help, Print this help and exit successfully. --skip-dot Skip directories in PATH that start with a dot. --skip-tilde Skip directories in PATH that start with a tilde. --show-dot Don't expand a dot to current directory in output. --show-tilde Output a tilde for HOME directory for non-root. --tty-only Stop processing options on the right if not on tty. --all, -a Print all matches in PATH, not just the first --read-alias, -i Read list of aliases from stdin. --skip-alias Ignore option --read-alias; don't read stdin. --read-functions Read shell functions from stdin. --skip-functions Ignore option --read-functions; don't read stdin.

Recommended use is to write the output of (alias; declare -f) to standard input, so that which can show aliases and shell functions. See which(1) for examples.

If the options --read-alias and/or --read-functions are specified then the output can be a full alias or function definition, optionally followed by the full path of each command used inside of those.

Report bugs to which-bugs@gnu.org. Found 45 units!

Postprocessing Extracting waveforms Computing QC metrics Exporting to phy Generating sortingview link https://figurl.org/f?v=npm://@fi-sci/figurl-sortingview@12/dist&d=sha1://aa2aeba2fb5fd03ec745d59a11dc5d79e9911247&label=**148-300921-2**-kilosort2

Writing to NWB Adding units table Adding LFP Cleaning up Saved to NWB: /projects/ec109/maria/novel-env-nwb/actions/148-300921-3/data/main.nwb Total processing time: 516.0s

alejoe91 commented 1 month ago

Oh that doesn't sound right! I'll take a look. Maybe the reference to the new action was held somewhere..

alejoe91 commented 1 month ago

So the nwb_file_path is retrieved from the action metadata: https://github.com/CINPLA/expipe-plugin-cinpla/blob/dev/src/expipe_plugin_cinpla/scripts/process.py#L56

Then it is not updated anywhere in the function. Not sure how this has happened