So I have a script that loops through the LFP files dos stuff and then I delete the files. The server I am on has agreat internet connection and to save space I wipe out the lfp data after I use it. I reintalled the sdk and I realized the version has changed. I think the file structure is different now:
(allensdk) [acampbell@stu allen_visbehave_data]$ ls
_downloaded_data.json visual-behavior-neuropixels-0.5.0
_manifest_last_used.txt visual-behavior-neuropixels_project_manifest_v0.5.0.json
(allensdk) [acampbell@stu allen_visbehave_data]$ ls
_downloaded_data.json visual-behavior-neuropixels-0.5.0
_manifest_last_used.txt visual-behavior-neuropixels_project_manifest_v0.5.0.json
(allensdk) [acampbell@stu allen_visbehave_data]$ ls visual-behavior-neuropixels-0.5.0/
behavior_ecephys_sessions project_metadata
(allensdk) [acampbell@stu allen_visbehave_data]$ ls visual-behavior-neuropixels-0.5.0/behavior_ecephys_sessions/
1064644573
(allensdk) [acampbell@stu allen_visbehave_data]$ ls visual-behavior-neuropixels-0.5.0/behavior_ecephys_sessions/1064644573/
ecephys_session_1064644573.nwb probe_probeC_lfp.nwb
Previously my code to wipe the files was…
if (session_id not in dont_wipe_these_sessions):
remove_from_path_command = "find "+sdk_cache_dir+"/session_"+str(session_id)+" -type f -name '*lfp*' -exec rm {} +"
call_bash_function(remove_from_path_command)
But I guess now it need to be updated to…
if (session_id not in dont_wipe_these_sessions):
remove_from_path_command = "find "+sdk_cache_dir+"visual-behavior-neuropixels-0.5.0/behavior_ecephys_sessions/"+str(session_id)+" -type f -name '*lfp*' -exec rm {} +"
call_bash_function(remove_from_path_command)
Will this strategy screw up the cache in anyway? Are there better alternatives to accomplish what I’m doing?