Cryosparc tools wrapper & blueprint?

Hi,

We are making increasing use of cryosparc tools in our workflows, it really increases the flexibility of what one can do with cryosparc, particularly with the advent of LLM-coding tools.

One of the main limitations we’ve encountered is that because CS tools scripts are not launchable from the GUI, and external jobs are only created during the running of the script, there is no way to queue CS tools scripts as part of a pipeline - to that end, would it be possible to add a “CS tools wrapper” job, that just launches a CS tools script?

At least this way we could add the CS tools script to the queue, even if we can’t queue up subsequent jobs based on external jobs created by the script. If there were some way to predefine/queue the external jobs that the script will create (maybe some kind of dry run functionality) that would be even better!

Also, would it be possible to create an “official” Skills.md establishing best practices, that folks can use to enhance the performance & consistency of coding agents when writing/editing CS tools scripts?

Cheers

Oli

2 Likes

Hi @olibclarke thanks for the suggestion!

We’ve noted the request for an ability to launch tools scripts from the UI, ideally as jobs with the ability to schedule/chain with other jobs. Thanks!

2 Likes

I would appreciate the functionality too.

At the moment, I run a small python script to create the external job early on in the pipeline and run the main script later to connect to this external job and run the processing.

echo “Waiting for curate exposure job $curate_expo_job to finish running.”
job_dir_id=$(python << start_cryolo_job-py
#!/data/Programs/Anaconda/bin/python

from cryosparc.tools import CryoSPARC

cs = CryoSPARC(license=“$cs_license”, host=“$cs_hostname”, base_port=$cs_port, email=“$cs_email”, password=“$cs_password”)

project = cs.find_project(“$cs_project”)

curate_job = project.find_job(“$curate_expo_job”)

job = project.create_external_job(“$cs_workspace”, title=“crYOLO Picker $threshold $box_size”)

job.connect(“micrographs”, “$curate_expo_job”, “exposures_accepted”, slots=[“micrograph_blob”])

#I would also like to passthrough the exposures as output. Couldn’t figure that out.
job.add_output(“particle”, “predicted_particles”, slots=[“location”, “pick_stats”])

#wait for curate exposure job to get done
curate_job.wait_for_status(‘completed’)

print(project.dir())
print(job.uid)
start_cryolo_job-py
)

1 Like

Just one other thought here - even better would be to have something akin to the ChimeraX toolshed - effectively a package manager, that facilitates download & installation of scripts in the CS tools env, & also manages dependencies for each specific script

1 Like

Thanks for the additional suggestion @olibclarke! We’re aiming to make the installation and launch of scripts as straightforward as possible, so we would definitely consider implementing this as a package manager or something similar.

1 Like

Thanks @nfrasser! It would also be useful if killing an External Job also killed the script that launched it - currently for long-running scripts, I need to kill the external job and then find the PID of the launcher script - it would be convenient if there were some way to streamline this