Modifying symlinks in session folders

Hi all,

I have been trying to modify symlinks for a project which are stored in a folder from a previous live session named “S1”. I tried to use the cli.job_import_replace_symlinks(project_uid, job_uid, prefix_cut, prefix_new) command, with ‘S1’ being the job_uid. This resulted in an error: ServerError: P84 S1 does not exist. When I tried this command with other jobs in the project with “Jxx” being the job_uid, the output for the command is zero for the number of symlinks changed.

Is there a way to modify symlinks stored in folders from live sessions with “Sxx” being the name of the job folder?

Thanks!
Kate

Solved the problem by:

  1. mounting the disc containing movies to the GPU worker
  2. On the worker, replacing the broken symlinks in the Sxx/import_movies with links pointing to the mounted movies.
  3. Run subsequent jobs using the GPU worker where the disc is mounted on.

Is there actually another official solution for this?

Like the modify one or many links part in this documentation seems to be outdated and for the <3.3 version? How do I use the output of cli.get_project_symlinks(’P1’) ?

@KiSchnelle Were you able to select the v4.0+ tab on that subsection of the guide?


Are you specifically trying to change symbolic links that are associated with a CryoSPARC Live session?

I moved project folders and also rawdata folders and need to update the symlinks for import and live sessions. (i detached and attached the projects to a new instance also)

For import jobs i could just follow Step one of <3.3 and then the step two but for live sessions i dont know, can i just change the symlinks in the SX/imported folder?

I can acess the 4.0 tab but that just changes step one of the guide not step two and in step two
you loop over “jobs” which is not defined if you do v4.0. Like there is no real guide on how to use the output of this to change the links then or atleast changing the tab does not change Step Two for me.

>>> cli.get_project_symlinks(’P1’)

or

>>> cli.get_job_symlinks(’P1’, ‘J3’)

[{'exists': True,
'link_path': '/bulk8/data/dev_nwong_projects/P1/J2/imported/004525579726026751633_14sep05c_c_00003gr_00014sq_00011hl_00003es.frames.tif',
'link_target': '/bulk8/data/dev_nwong_projects/testdata/empiar_10025_subset/14sep05c_c_00003gr_00014sq_00011hl_00003es.frames.tif'},
…]

In CryoSPARC v4.7, one can modify symbolic links inside a Live session using the commands

cryosparcm icli # from the Linux shell to the interactive icli
rtp.session_replace_symlinks('PX', 'SY', '/old/prefix/', '/new/prefix')
exit() # exit the interactive cli

or, on the Linux shell:

cryosparcm rtpcli "session_replace_symlinks('PX', 'SY', '/old/prefix/', '/new/prefix')"

Note that these commands do not work in versions below v4.7 and are subject to change in a future CryoSPARC release.

1 Like

A post was split to a new topic: Project_json project_dir does not match the actual project dir