ts_particles_export crash with Relion .star file

31 views
Skip to first unread message

Karine Mazmanian

unread,
May 14, 2026, 6:12:56 AMMay 14
to Warp

hi all,

I am running particle extraction with WarpTools ts_export_particles after Relion5 3D refinement, and it keeps crashing on me. I used run_data.star from relion 5 refine3d to re-extract my particles at a different pixel size with ts_export_particles. it worked before but stopped working after our admin updated warptools (my current version is 2.0.0dev39).

In the terminal i get a c# duplicate-key error, but if i check the worker log for the same tilt series, no error is reported and the particles look like they were successfully exported. (see the error messages below). I did some troubleshooting with Claude and Deepwiki, and workaround that worked for me was removing 10 columns from data_particles (rlnTomoParticleId, rlnTomoParticleName, rlnImageName, rlnTomoVisibleFrames, rlnGroupNumber, rlnClassNumber, rlnNormCorrection, rlnLogLikeliContribution, rlnMaxValueProbDistribution, rlnNrOfSignificantSamples). I want to check if anybody had met this error before and if I am doing something wrong.

command: WarpTools ts_export_particles \ --settings warp_tiltseries.settings \ --input_star relion_5.72Apx/Refine3D/job023/run_data.star \ --output_star relion_2.9Apx/extracted_proteasome_2.9Apx_224.star \ --coords_angpix 5.72 \ --output_angpix 2.86 \ --box 224 \ --diameter 450 \ --relative_output_paths \ --2d terminal

error: Failed to process /data/.../warp_tiltseries/Position_8.tomostar, marked as unselected
System.ArgumentException: An item with the same key has already been added. Key: rlnTomoParticleId at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value) at Warp.Star.AddColumn(String name, String[] values) in .../WarpLib/Star.cs:line 591 at WarpTools.Commands.ExportParticlesTiltseries.<>c__DisplayClass0_0.<Run>b__1(WorkerWrapper worker, TiltSeries tiltSeries) in .../WarpTools/Commands/Tiltseries/ExportParticlesTiltseries.cs:line 341

worker log for the same tilt series, no error: 2026-05-14 03:21:39.837 Received "TomoExportParticleSeries", with 6 arguments, for GPU #2, 11022 MB free: 2026-05-14 03:22:08.243 Exported 486 particles for /data/.../warp_tiltseries/Position_8.tomostar 2026-05-14 03:22:08.243 Execution took 28.405 seconds 

I am happy to share the input star if needed.
Thanks!
Karine

Warp Bot

unread,
May 18, 2026, 1:15:27 AMMay 18
to Warp, Karine Mazmanian
Hi Karine,

This is a real bug — your workaround is correct. Here is what is happening:

For 2D output, the worker first writes a temporary per-tilt-series particle table that already contains rlnTomoParticleId, rlnTomoParticleName, rlnImageName and rlnTomoVisibleFrames (see WarpLib/TiltSeries/TiltSeries.ReconstructParticleSeries.cs:74-91). After the worker returns, ts_export_particles tries to add every column from your input star that is not in a small "known columns" set (WarpTools/Commands/Tiltseries/ExportParticlesTiltseries.cs:172-188), and that set does not list those four columns. So when your run_data.star already has them, AddColumn throws "An item with the same key has already been added" at Star.cs:591, and the host marks the tilt-series unselected.

This also explains why the worker log shows a clean success: the particle images and the temp star are written, then the crash happens in the host while assembling the final output table.

The four columns that actually collide are rlnTomoParticleId, rlnTomoParticleName, rlnImageName, rlnTomoVisibleFrames. The other columns you removed (rlnGroupNumber, rlnClassNumber, rlnNormCorrection, rlnLogLikeliContribution, rlnMaxValueProbDistribution, rlnNrOfSignificantSamples) are not in the temp star and do not strictly need to be dropped, but it is harmless to do so.

I have filed a GitHub issue to track the fix:
{{ISSUE_URL}}

Until that lands, your workaround of stripping the colliding columns from data_particles before passing the star to ts_export_particles is the right thing to do.

— Warp Bot
THIS IS AN AUTOMATED MESSAGE GENERATED BY AN LLM. IT MAY OR MAY NOT SOLVE YOUR PROBLEM. IF YOU'D LIKE TO SPEAK TO A HUMAN, SAY SO IN YOUR MESSAGE.

--
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/861a0bea-834b-4f8e-ad45-5025c29ce763n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages