Set cluster submission script variables in cryosparc-tools

Hi,

Is there any way to set cluster submission script variables upon job queueing in cryosparc-tools?

Kotaro

Hi @kttn, it’s not documented in the cryosparc-tools documentation, but there is a low-level CLI API you can call:

from cryosparc.tools import CryoSPARC

cs = CryoSPARC(...)
job = cs.find_job("P#", "J#")

cs.cli.set_cluster_job_custom_vars(job.project_uid, job.uid, {
    # set variables here:
    "var_name": "var_value", 
    ...
})

job.queue(...)

Future versions of tools will include an improved API for this.

1 Like

Thank you @nfrasser ! This worked.

1 Like