Export-import helical segments cs->Relion and back

Hi again- also- more troubling is that the rlnHelicalTubeIDs don’t seem to be quite right- for example sometimes there are more filaments on a micrograph than rlnHelicalTubeIDs… not sure why this is but it will cause issues in relion’s helical refinement…

Can you clarify? That wording sounds like some of the particles have been rejected at some stage, which is expected?

Hi Daniel-

This is just at the picking stage- and yes- particles have been rejected at the ‘inspect particles’ stage. The issue is- if there is a single long filament with excluded picks in the middle of it, giving two stretches of picks, what I’d need is for that filament to then be divided into two helical IDs, each for one stretch of picks (even if the same filament). This is needed in our case as we are working with relion scripts for processing pseudohelical microtubules where the phi angle is unique and we use information from neighbouring particles (segments) to help alignment- therefore we don’t want particles far away from each other (separated by rejected picks) on the same microtubule to influence each other. We used to just pick separate stretches manually, but want to move away from this with the large amounts of data that can be collected nowadays!

All the best,
Joe

You’re seeing the expected behavior as these particles really do come from the same filament pick.

In general the particle order might not correspond with their sequence along the filament, so it’s not that straightforward to reassign IDs in the way you want. I think the following algorithmic sketch is close.

For each micrograph:

  1. Calculate pairwise distance matrix between picks
  2. Convert distance matrix to graph adjacency matrix via an appropriate distance threshold (e.g. double the particle radius)
  3. Find all disjoint subgraphs using a flood fill
  4. Assign each disjoint subgraph a new unique helical tube ID

See this math exchange Q for example. The first answer is basically describing the row scan flood fill algorithm. The other name for disjoint subgraphs is “connected components” - you can find lots of other examples online. This library call could probably do it in one line:

Thanks Daniel,
Will have a little think about best approaches here!

All the best,
Joe

Hi,@mmclean,we have used your lastest version of pyem, and the output my.star still no information of ‘rlnHelicalTrackLengthAngst’。So,I want to know the infomation of filament/position_A` come from
.Could you tell me? and I can get this information and add it to my.star.

Hi,@mbs, I see you have solved the problem of ‘rlnHelicalTrackLengthAngs’, and may I ask you how to get this information ? I have used the lasted version of pyem, and still no information of ‘rlnHelicalTrackLengthAngs’. T hank you .

Hi all,

Were you able to solve this issue?
Was anyone successful in doing 2D (or 3D) classification in Relion with particles (or coordinates) exported by helical segments picked in cryosparc?

I have been trying to solve this for a while but seem to be stuck.

I was able to export extracted particles (Filament tracer → Inspect picks → Extract Mics) from Cryosparc and import them into Relion (Import → my.star, Node type Particles STAR file).
Note that the particles were extracted using pyem on .cs file in the exported job folder (to make sure I was not missing some files)

If I test a 2D classification without helical segments on the imported file and it runs properly. {this was just a sanity check for me to be sure there was no error in the way I was exporting/converting the .cs file to .star}
But of course I want to run with helical parameters and in this case it fails with the message:

ERROR:
exp_model.cpp: Experiment::read(): Tilt and psi priors of helical segments are missing!

The header of the output of my import job (same as “my.star” file) file is:

data_optics

loop_
_rlnVoltage #1 
_rlnImagePixelSize #2 
_rlnSphericalAberration #3 
_rlnAmplitudeContrast #4 
_rlnOpticsGroup #5 
_rlnImageSize #6 
_rlnImageDimensionality #7 
_rlnOpticsGroupName #8 
300.000000 0.887500 2.700000 0.070000 2 350 2 opticsGroup2

data_particles

loop_
_rlnImageName #1 
_rlnMicrographName #2 
_rlnCoordinateX #3 
_rlnCoordinateY #4 
_rlnDefocusU #5 
_rlnDefocusV #6 
_rlnDefocusAngle #7 
_rlnPhaseShift #8 
_rlnCtfBfactor #9 
_rlnOpticsGroup #10 
_rlnHelicalTubeID #11 
_rlnAnglePsiPrior #12 

I have also tried using images2star.py and in that case I have some additional parameters but they look incorrect and anyway I don’t seem to able to keep working on relion.

Any tips?
Thanks :slight_smile:

1 Like