timothygrant80 / cisTEM

Other
32 stars 27 forks source link

Store particle coordinates in starfile #448

Closed jojoelfe closed 1 year ago

jojoelfe commented 1 year ago

Description

This adds two new columns to the cisTEM starfile called cisTEMOriginalXPosition and cisTEMOriginalYPosition. These contain the coordinates of the particle in the image stored in cisTEMOriginalImageFilename. These values are already stored in the cisTEM database, but were not available in the starfiles. We plan to use this for template matching purposes, where they denote very useful information (position of the molecule in the cell). This will also allow for cisTEM starfiles to be an input for refine_template.

This PR only establishes these columns, but they aren't used anywhere yet. This will come in later PRs.

The columns are already used for the blender plugin MolecularNodes to make visualizations like these:

https://github.com/timothygrant80/cisTEM/assets/6081039/cef924ac-8b8f-47d1-839c-9b4fbfce477a

I have rebased my feature branch to be current with the master branch using to minimize conflicts and headaches

Which compilers were tested

These changes are isolated to the

How has the functionality been tested?

Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.

Checklist:

bHimes commented 1 year ago

Hey @jojoelfe, I'm wondering what the advantage is to having another dedicated column name vs just taking an approach similar to relion and having a star file that is for a micrograph?

Part of the pipeline I setup to handle most processing stages without particle stacks does just this, using the existing X/Y shifts to indicate the position in the micrograph. If particle stacks are needed, a new star file is made.

The total shifts are trivial to combine, particularly using the python starfile class, but it would also be easy to add a method in cisTEM directly.

jojoelfe commented 1 year ago

Hey @jojoelfe, I'm wondering what the advantage is to having another dedicated column name vs just taking an approach similar to relion and having a star file that is for a micrograph?

I think it comes down to

Also, I don't think we are hitting the long limit for maximal number of columns yet, so having these columns (which are only written upon request) does not incur too much problems (even though I realize we should be cautious about introducing new stuff).