Automating mrc --> tiff?
Added by Patrick Goetz over 6 years ago
Most of the processing software we're using can work with tiff files in addition to mrc. The advantage of using tiff images is that it appears they only about 1/4 of the space of mrc images, which would be a pretty huge savings and would allow us to put off purchasing a second petabyte for quite a while.
So, question: I'm wondering if there is any way to insert something into the processing sequence so that raw data mrc files are automatically converted to raw data tiff files? It would be nice for this to be a rawtransfer optional flag.
Replies (4)
RE: Automating mrc --> tiff? - Added by Sargis Dallakyan about 6 years ago
Good idea. Someone needs to implement and test this. Will you be able to implement and test this on your site and then commit back changes if it works? Thanks.
RE: Automating mrc --> tiff? - Added by Patrick Goetz about 6 years ago
Hi Sargis -
I'm willing to give it a try, but could use a little guidance. I think it makes most sense to implement this in rawtransfer.py as an optional command line flag -- does this make sense to you?
Second question. We've tested a couple of different standalone mrc-->tiff conversion utilities. Presumably these could be called from a python script, but it would perhaps be more elegant to get something which can be invoked through a native python library. Are you aware of a python library which could be used for this or should I just start googling?
Thanks.
RE: Automating mrc --> tiff? - Added by Sargis Dallakyan about 6 years ago
Hi Patrick,
Our pyami module can do it in python - http://emg.nysbc.org/projects/leginon/repository/changes/pyami/mrc2any
Eman2 would have similar functionality. I've recently used mrc2tif - IMOD - https://bio3d.colorado.edu/imod/doc/man/mrc2tif.html.
If you have to load IMOD module first, you can do so like in the code below:
import subprocess
cmd = os.popen("csh -c 'modulecmd python load imod'")
subprocess.call("mrc2tif "+ mrc_file +" " +dest,shell=True)
Best.