I have followed the guide provided in the cryosparc tools documentation for particle picking with crYOLO. However, I am encountering an issue when trying to inspect my particle picks. Specifically, I am unable to view the power histogram or any picked particles on my micrographs. I am wondering if anyone has experienced similar issues and if there are any solutions to this problem?
(Additionally, I am curious if it is possible to set the prediction threshold to 0 and then adjust it interactively during the inspect picks job)
Thank you in advance for your help and advice.
I was playing around with this and had the same issue, namely not being able to interactively select particles in the Inspect Particles Job.
To work around this I modified the provided script to set values for both “pick_stats/ncc_score” and “pick_stats/power” which then brought up the heat map in the interactive Inspect Particles Job. The value I assigned to “pick_stats/ncc_score” and “pick_stats/power” was the figure of merit provided by cryolo which I took from “boxfiles/CRYOSPARC/cryosparc.star”. Probably it would be smarter to get values from the CBOX files but I did not spend time to parse these files.
Below I paste the code I used but it is not tested so use with caution. I also added a tqdm progress bar so you have to have tqdm installed in your conda enviroment,
from tqdm.notebook import tqdm
from io import StringIO
import numpy as np
from numpy.core import records
from cryosparc import star
output_star_folder = "STAR"
all_predicted = 
starfile_path = "boxfiles/CRYOSPARC/cryosparc.star"
locations = star.read(job.dir() / starfile_path)[""]
all_micrographs = job.load_input("all_micrographs", ["micrograph_blob"])
for mic in tqdm(all_micrographs.rows()):
micrograph_path = mic["micrograph_blob/path"]
micrograph_name = micrograph_path.split("/")[-1]
height, width = mic["micrograph_blob/shape"]
center_x = locations[locations['rlnMicrographName'] == micrograph_name]['rlnCoordinateX'] / width
center_y = locations[locations['rlnMicrographName'] == micrograph_name]['rlnCoordinateY'] / height
fig_merit = locations[locations['rlnMicrographName'] == micrograph_name]['rlnAutopickFigureOfMerit']
predicted = job.alloc_output("predicted_particles", len(locations[locations['rlnMicrographName'] == micrograph_name]))
predicted["location/micrograph_uid"] = mic["uid"]
predicted["location/micrograph_path"] = mic["micrograph_blob/path"]
predicted["location/micrograph_shape"] = mic["micrograph_blob/shape"]
predicted["location/center_x_frac"] = center_x
predicted["location/center_y_frac"] = center_y
predicted["pick_stats/ncc_score"] = fig_merit
predicted["pick_stats/power"] = fig_merit
Hi @Poko18 and @frozenfas ,
Thank you for reporting and apologies for the delay. We’ve made a fix to Inspect Picks such that it is able to display particles even when the input dataset does not contain
pick_stats. This will be released in the next version of CryoSPARC.
Thank you for that. I tried it myself and it works great.
Also, I think that the merit numbers are the same between CBOX and cryosparc.star, so It might not be necessary to parse CBOX files.
This is resolved in v4.3 (August 9, 2023) as you can now run Inspect Picks on a datasets without pick stats.