Support for micrograph star import

Hi,

It’s been brought up a few times over the years so apologies for what might be a futile rehash. Are there plans for supporting star file input as a mechanism for importing movies/micrographs? Not necessarily even with accompanying CTF parameters, if that has been the primary stumbling block.

The rationale being that until TFS refactors how beam-shift parameters can be reflected in filenames/metadata, the most user-friendly way of assigning EPU-AFIS data to sensible optics groups seems to be through Dustin’s script. It would be nice to be able to translate that into exposure groups without either a) manually splitting and then importing each group, or b) working some cmdline magic.

As an aside, I prefer to perform motion-correction and dose-weighting in RELION (RelionCor) because throwing tens of multithreaded MPI tasks at the problem seems to get it done in a fraction of the time compared to a single GPU node. Partly a bandwidth bottleneck? That and Bayesian polishing requires the frame motion metadata in a compatible format anyway. It would be convenient to have the optics groups remain consistent right from the start. (The mics can also be written in float16, but that’s an aside to the aside.)

Cheers,
Yang

PS, it’s been a while since I’ve processed any data for real, so if there’s an easier way of getting the AFIS data out and into cryoSPARC, please do let me know. Thanks.

3 Likes

Seems like it’d be simplest to use the new movies.star to change the file names.

import shutil
from pyem import star

df = star.parse_star('movies.star')
for x, y in df[[star.Relion.MICROGRAPHMOVIE_NAME, star.Relion.OPTICSGROUP]].to_numpy():
    shutil.move(x, x.replace(".tif", "_" + str(y) + ".tif"))

Or, make them symlinks in another directory, if you don’t want to rename the real files.

1 Like

Clever idea! Thanks, Daniel. We can fashion simple awk equivalents to process potential inputs.

Cheers,
Yang