Installing CryoSPARC on Merlin 7
This repository contains the necessary scripts to install CryoSPARC on the Merlin 7 cluster.
For the complete installation guide, please refer to the following page: https://intranet.psi.ch/en/cls/cryosparc-merlin-7-installation
Fixing broken symlinks
When raw data is imported into a CryoSPARC project, rather than copy the data into the project directory, symlinks are created inside the import job directories pointing to the original data files.
If you're moving data that you used an "Import Particles", "Import Micrographs" or "Import Movies" job to bring into CryoSPARC, you will need to repair these jobs. When CryoSPARC imports these three types of data, it creates symlinks to each file inside the job's imported directory. These symlinks may become broken if the original path to the file no longer exists. You can check the status of the symlinks by running ls -l inside the imported directory of the job. Note: The "Import Templates" and "Import Volumes" jobs copy the specified files directly into the job directory.
The script replace_cryosparc_symlinks.py automates the repair of broken symlinks in CryoSPARC jobs by replacing
outdated path prefixes with new ones.
It works as follows:
- Lists available CryoSPARC projects and lets the user select one or all projects.
- Lists jobs within the selected project(s) and allows the user to select specific jobs or all jobs.
- Analyzes current symlink targets in the selected jobs and displays their path prefixes.
- Prompts the user for the old prefix (to be removed) and the new prefix (to be inserted).
- Confirms changes with the user before applying any modifications.
- Uses
cli.job_import_replace_symlinksto update symlinks in the selected jobs. - Reports modified links and any jobs that failed to repair.
This tool is interactive and requires confirmation before making any changes.
Before running the script, you first need to start the CryoSPARC interactive Python session:
/data/user/$USER/cryosparc/cryosparc_master/bin/cryosparcm icli
Once inside the interactive Python shell (indicated by >>>), you can execute the script by running
exec(open("/path/to/script/replace_cryosparc_symlinks.py").read())
⚠️ Important: Replace
/path/to/script/replace_cryosparc_symlinks.pywith the actual path to the script file. This will run the script in the context of the CryoSPARC CLI environment, so the cli object will be available.