brisvag / blik

Python tool for visualising and interacting with cryo-ET and subtomogram averaging data.
https://brisvag.github.io/blik/
GNU General Public License v3.0
23 stars 8 forks source link

Minor issue: expected MRC file extension #156

Closed rdrighetto closed 6 months ago

rdrighetto commented 6 months ago

Hi Lorenzo,

Thanks for releasing blik and the preprint!

Minor issue I noticed, is that it expects files to have the .mrc extension, which is not always the case. Say, we have .rec files from IMOD which is just an MRC file with a different extension. In this case I just trick blik by renaming or linking the file with the .mrc extension and it works fine, but it's kinda annoying.

So, could you make blik pretend that everything is an MRC file no matter how they are called?

Thank you!

brisvag commented 6 months ago

Hi Ricardo, nice to see you here, thanks for stopping by and opening an issue :)

Unfortunately that's not really possible because napari selects the file reader by extensions. There is a whitelist of extensions here:

https://github.com/brisvag/blik/blob/a16e67374876f38f54655a2655ffeae631290a62/src/blik/napari.yaml#L52

as you see, I already added some alternatives like mrcs and st. It's easy to add new ones :) Would you like to make a PR for rec and any other extension you think might be missed? Otherwise I can take care of it.