Converting between file types - cianfrocco-lab/Old-school-processing GitHub Wiki
Home > Getting started > Converting between file types
As you will quickly notice, there are a variety of file types that are used interchangeably within electron microscopy image processing. Many software packages expect specific file formats, which means that you WILL have to be converting your data between different file types.
Scroll down to see an extensive list of possible conversions that you will encounter. Click each link to learn how to convert the file type:
SPIDER:
- SPIDER files .spi can be individual 2D images, 2D stacks, or 3D volumes
IMAGIC
- IMAGIC files are individual 2D images or 2D stacks.
- IMAGIC files have BOTH .img and .hed files that share the same name base name. For instance, a stack would have two files associated with it: stack.img and stack.hed. The .hed file contains the image parameters, while the .img file contains the actual images.
MRC
- MRC images .mrc (and .mrcs) can be 2D images, 2D stacks (.mrcs), or 3D volumes.
- Relion uses .mrc images for all file types: 2D images, stacks, and 3D volumes. Note that Relion uses an extension .mrcs to indicate a stack of .mrc images.
Relion
- Since Relion using .mrc images, you simply follow the conventions for converting into/outof MRC format.
XMIPP
- XMIPP reads the same images as SPIDER, except it does NOT read particle stacks. For particle stacks, you must create a folder containing all individual images that would be within a single stack.
$ proc2d [stack].img [stack].spi spiderswap
$ ./Convert_stack_to_xmippRelion_format.py usage: Convert_stack_to_xmippRelion_format.py -i -o --num=[number of particles in stack] options: -h, --help show this help message and exit -i FILE Particle stack in .img or .spi format -o FILE Output folder name for single particles --num=INT Number of particles in stack -d debug
$ ./Convert_imagicSpider_to_hdf.py -h Usage: Convert_imagicSpider_to_hdf.py raw_images apix Options: --version show program's version number and exit -h, --help show this help message and exit
$ proc2d [stack].spi [stack].img
$ ./Convert_xmippRelionParticles_to_stack.py usage: Convert_xmippRelionParticles_to_stack.py -i -o --num=[num. of particles] --name= options: -h, --help show this help message and exit -i FILE Folder containing the particles for analysis -o FILE Particle stack output name in .spi format --num=INT Number of particles in stack --name=STR Particle basename (e.g. data) -d debug
Converting a Gatan formatted image (.dm3) to mrc:
$ proc2d [micro].dm3 [micro].mrc mrc
This is a bit more complicated, please read more under the [Frealign Refinement] site.