Skip to content

Pick and extract different particle types separately - #1368

Open
drvanger wants to merge 2 commits into
3dem:ver5.1from
drvanger:select_particle_types
Open

drvanger wants to merge 2 commits into
3dem:ver5.1from
drvanger:select_particle_types

Conversation

@drvanger

Copy link
Copy Markdown

In our research group we often pick amyloid filaments manually. As our filaments are often highly polymorphic, and separating the different polymorphs during 2D/3D classification is not always straightforward, it'd be a huge help if we could separate them during manual picking, then extract different polymorphs separately. This is currently possible for single particles, but not for helices.

In this PR I made it possible for the user to select a "selection type" during manual picking, regardless of the picking method used (single particle or start-end / lines for helices) and to extract particles of different selection types separately.

For this, I used the existing rlnParticleSelectionType metadata label for distinguishing particle types. For helices picked as lines, I added the rlnHelicalLineId label to keep track of individual helical lines separately from their selection type. The manual picking window continues to use the selection type for coloring, so changing the selection type changes the color of subsequently picked lines.

A new option has also been added to the Particle extraction job, under the extract tab to select which selection type should be extracted.

I tested manual picking and extraction of single particles and helices picked using both start-end coordinates and lines. I also tested the new amyloid tracer, including autopicking and extraction.

@scheres

scheres commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

I don't understand this. Why not extract all together and then use the subset selection job to separate into distinct types?

@drvanger

drvanger commented Oct 1, 2026

Copy link
Copy Markdown
Author

Unless I'm missing something, that is currently not possible, because EMDL_PARTICLE_SELECTION_TYPE is disabled during extraction here, so the resulting particles.star does not contain _rlnParticleSelectionType.

I implemented filtering at the extraction stage because relion_preprocess already has the --selection_type option, which works for single particles but not for helices. For start-end coordinates, using it results in "ERROR: cannot find rlnParticleSelectionType in coordinate file, but --selection_type argument was specified.", because EMDL_PARTICLE_SELECTION_TYPE is not retained in convertHelicalTubeCoordsToMetaDataTable(). For helices picked as lines, EMDL_PARTICLE_SELECTION_TYPE is currently used to distinguish individual lines instead.

@scheres

scheres commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Ah, I see. I'm slightly hesitant to merge into ver5.1, which should be more or less stable by now. I've just invited you with read access to our development version, which contains a ver5.2 branch. Could you test inside that one and then make a PR there? We'll go public with that one in the New Year probably, and by then I may remove you again from that repo. Your colleagues might also like the 4x speed-up of relion_refine on modern GPUs. Only run 1 MPI per GPU and as many threads as you have cores on your nodes. :-)

@drvanger

drvanger commented Oct 2, 2026

Copy link
Copy Markdown
Author

Thanks, I'll test this with the ver5.2 branch and make a new PR there. And congratulations on the 4x speed-up, that's very impressive!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants