Cryolo and Imod Particle Picks to WarpTools

179 views
Skip to first unread message

Kyle Messina

unread,
Apr 23, 2025, 3:10:09 PMApr 23
to Warp
Hello,

Back again with a more complicated question this time.  As an alternative for WarpTools particle picking I wanted to incorporate Cryolo as part of the WarpTools pipeline but I realized that it produces CBOX files which are different from the .star files after WarpTools template matching.  Are there any tutorials for converting the CBOX files back into .star files for WarpTools to perform the Export Particles job? 

Also for manual picking in IMOD, as per https://forum.image.sc/t/manual-particle-picking-in-cryo-et-data/95522 how are the .mod files produced by IMOD? I know how to make the models in IMOD, but I do not see an explicit option for .mod files? Unless its the Write Model As->Imod option? 

Thank you again for the help!
Kyle Messina

Daniel Cai

unread,
Apr 23, 2025, 7:03:22 PMApr 23
to Kyle Messina, Warp
Hi Kyle,

In regards to saving IMOD model files with the .mod suffix, you just have to "save model as" "insert_name_here".mod. I've even renamed model files to have the .mod suffix and it works fine down the line.

Not sure about cryolo, someone else should probably have an answer.

Daniel

--
You received this message because you are subscribed to the Google Groups "Warp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to warp-em+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/warp-em/a364e53e-6645-41b0-896b-07c89e9fa7cfn%40googlegroups.com.

thomas.la...@gmail.com

unread,
Apr 23, 2025, 8:27:53 PMApr 23
to Warp
Hi Kyle,

crYOLO has tools to convert .cbox files to .coords files and then .coords to .star which are ultimately compatible with WarpTools.

Snippet of something I did a while back which worked:

'''
# first convert the filtered cbox files to coords
cryolo_boxmanager_tools.py cbox2coords -i ribosome_predict_output/cbox_3d_filtered/ -o filtered_coords/

# then convert the coords to a star file
cryolo_boxmanager_tools.py coords2star -i filtered_coords/COORDS/ -o out_warp/ --scale 1.0 --apix 10 --mag 10000

# extract with WarpTools
WarpTools ts_export_particles --settings warp_tiltseries.settings --input_star cryolo/out_warp/particles_warp.star --coords_angpix 10 --output_angpix 10 --box 48 --diameter 360 --relative_output_paths --2d  --output_star rln5_2d/cryolo_ribo_10Apx_b48.star

'''

FYI,  confidence scores are lost in the conversions, so filtering by confidence score needed be done at the .cbox stage

If anyone has an easier way, then I'd also be happy to know!

Cheers,
-Tom

Kyle Messina

unread,
Apr 24, 2025, 10:22:13 AMApr 24
to Warp
Hello,

Thank you so much! And that doesn't seem to bad.

From,
Kyle

Kyle Messina

unread,
Apr 24, 2025, 3:18:30 PMApr 24
to Warp
Hi Tom,

I was wondering if there were was anything else I had to do to prep the Warp files for cryolo since I keep getting an error when I run the export command.  When I run the WarpTools ts_export_particles it finds the correct number of particles, finds all the tilt series but when it does the extraction, it finds no particles in the tomostar files.   The only error it gives is: "No particles to write out. Check that rlnMicrographName entries match tomostar file for each tilt series."  My lab mate and I thought the issue might be that the tomostar file names in the coords2star star file was wrong (TS_11_10.00Apx.tomostar instead of TS_11.tomostar since I used the binned tomograms). So we tried making that change but we still got the same error.  Neither of us are familiar with how Warp calls the files this far into the pipeline so any advice (or prep steps) would be appreciated.

I'm also using the WarpTools tutorial dataset to test this out so my work up followed that tutorial if that helps.

From,
Kyle 

(You may see this message twice Tom since I think I direct messaged you by accident. Sorry!)

thomas.la...@gmail.com

unread,
Apr 24, 2025, 4:03:41 PMApr 24
to Warp
Hi Kyle,

I forgot that I do make sym-links to the tomograms that exclude the pixel size in the name for cryolo since I didn't know whether the .tomostar name discrepancy would make a difference either 😅.

An example .star file that worked for extraction is:
'''
data_

loop_
_rlnMicrographName #1
_rlnCoordinateX #2
_rlnCoordinateY #3
_rlnCoordinateZ #4
_rlnMagnification #5
_rlnDetectorPixelSize #6
L14_001.tomostar 904.572053167555 174.6651577949524 20.0 10000.0 10.0
L14_001.tomostar 861.2016470248883 158.05220649792597 25.0 10000.0 10.0
L14_001.tomostar 897.8514688677258 158.06580901145935 30.5 10000.0 10.0
...
'''

Sorry I can't be of more help...

Perhaps someone else might have an idea about why particles and the tomostars are recognised but nothing is ultimately extracted?

-Tom

Kyle Messina

unread,
Apr 24, 2025, 5:13:05 PMApr 24
to Warp
Hello,

My labmate just figured out what was wrong but it is the end of the day and I'm going to a conference tomorrow.  I'm not 100% sure what he did, so I'll talk with him next week and promise to post the solution. 

From,
Kyle

Alister Burt

unread,
Apr 27, 2025, 1:26:59 PMApr 27
to Kyle Messina, Warp
Hi Kyle and others,

Try running with the WARP_DEBUG environment variable set to 1 and you should get some more useful debugging output

It sounds like you're struggling with minor incompatibilities between file formats
- cbox files are star files with different headers from RELION/Warp
- .mod is the standard extension (I think?) for IMOD model files

You should be able to script around these incompatibilities with some combination of
- chatGPT/Claude

Cheers,

Alister

Message has been deleted

Madeline Rollins

unread,
Sep 16, 2025, 9:13:31 AMSep 16
to Warp
Hi all,
I was wondering if I could re-open this thread about using star files generated by crYOLO as input for Warp. I am running into a similar issue to what Kyle described in this thread, where I have picked particles in crYOLO and used the coords2star program in crYOLO to generate a star file that I should be able to use in Warp. However, when I run the WarpTools ts_export_particles command, it finds the particles but fails to extract them and I get this message:

Failed to process /beagle3/bkeenan/madeline/practice/warp_tiltseries/particles_warp.star, marked as unselected

I've tried WarpTools change_selection in an attempt to select the particles_warp.star file but I haven't had any success. Has anyone else has run into this issue or have any suggestions on how to troubleshoot this?
Thank you,

Madeline Rollins
Reply all
Reply to author
Forward
0 new messages