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 .