Restoring a compacted session after migrating raw movies

Dear CryoSPARC users,

I am currently working with the ‘Compact Session’ utility in cryoSPARC Live. I had to relocate the folder containing the raw data so I have updated the symbolic links in the import_movies folder (within the session folder) and modified the ‘exposures.bson’ file to reflect the new location of the movies. Despite these changes, upon restoring the session, cryoSPARC continues to search for the movies in their original location.

Additionally, I have attempted using cli.job_import_replace_symlinks(project_uid, job_uid, prefix_cut, prefix_new). However, as my intention is to modify the session (not a specific job), this approach has not been effective for me.

Would anyone have any suggestion?

Thank you for your help.

Jorge

Hi @jplopez,

Each exposure in the database stores its own path.
You can retrieve the paths to your exposures with these commands (replace the session and project ids):

cryosparcm icli

exposures = list(db.exposures.find({"session_uid": "S1", "project_uid": "P1"}))
for exposure in exposures:
    print(exposure["abs_file_path"])

Symlinking the parent directory(s) of the exposure paths to your new location should allow you to restore.

Hope this helps!

2 Likes

Thank you @nwong for your help. It worked perfectly!