It is possible that the map is just too big. You might run into
"problems" with file I/O in general if it is bigger than 2 GB. If you
have a 64-bit machine with CCP4 completely re-compiled in 64-bit mode,
then it "should" be able to read the large files (but I have not had
much luck with this).
As for re-formatting the header, the CCP4 map header format is laid out
(byte by byte) here:
http://www.ccp4.ac.uk/html/maplib.html#description
I have no idea where the FREALIGN map format is documented. Note that I
use "FREALIGN map format" because (based on your experience) it may not
actually be an "MRC" map format.
If I were you, I would create a "dummy" CCP4 map that has the same
"grid", "start and end" values, axis order, unit cell, space group, etc.
as your FREALIGN map (using sfall, fft, or mapman?), and then
concatenate its header with the data from the FREALIGN map. Like this:
head -c 4416 dummy_ccp4.map > new.map
tail -c $fourXvoxels frealign.map >> new.map
where $fourXvoxels is four times the number of voxels (columns * rows *
sections) in the map. In CCP4 maps, these are stored as "floats", which
are four bytes each. You may need to "tune" the 4416 header bytes for
the map to look right. I have never seen a FREALIGN map. But hopefully
they store data as "floats".
You then want to run new.map through mapman with something like a "scale
factor 1 0" command to "sanitize" it and re-compute the map statistics
(which are stored in the header).
Make sure that you create the "dummy" CCP4 map on the same machine that
created the FREALIGN map, as different OSes store "floats" with
different byte ordering (just to make life more fun).
-James Holton
MAD Scientist
James Whittle wrote:
Hi all-
I'm trying to convert a cryoEM map from FREALIGN for use with various
CCP4 programs, or with MAPMAN. Even though the MRC format is derived
from the CCP4 map file format, every program I've tried fails to open
it, (except for Chimera which displays the map but cannot save it to
another format for lack of memory).
For example, in MAPMASK I get the error:
>>>>>> CCP4 library signal ccp4_map:No associated header (Error)
raised in ccp4_cmap_open <<<<<<
>>>>>> CCP4 library signal ccp4_map:Cannot open file (Error)
raised in MRDHDS <<<<<<
or with MAPMAN:
**CCPOPN ERROR** FORMATTED OLD file open failure on unit 1
Logical name: DLP_100.map, File name: DLP_100.map
Cannot send after transport endpoint shutdown
ERROR --- While reading map header. Sorry !
ERROR --- While opening map file
Is there a way to re-write the header to be compatible with CCP4?
--James