RMA file technical question

A technical question for the RMA files: Is there a signature or magic number encoded in the first bytes of RMA files?

yes, the first three ints (each 4 bytes) have a special meaning.

The first four bytes are a magic number:

the first byte is ‘R’, the second byte is ‘M’, the third byte is ‘A’ and the fourth byte is ‘R’

int MAGIC_NUMBER = (‘R’ << 3) | (‘M’ << 2) | (‘A’ << 1) | (‘R’);

The second int is the version of the RMA file (e.g. 6 for the most recent).

The third int is the minor version of the RMA file (currently not used for version 6 files)

Thanks for the response,

I tried to convert a daa file to rma with daa-meganizer and get

hexdump -C meganize.rma | head -n1
00000000 6b e3 3e 6d 47 53 0e 3c 01 00 00 00 00 00 00 00 |k.>mGS.<…|

and with daa2rma

hexdump -C diamond_results.rma
00000000 00 00 03 f6 00 00 00 06 00 00 00 00 00 00 00 08 |…|

Since there seems to be a difference in the first bytes I would like to know which is correct. I know that I should use meganizer – just wondering.

As a note: this is for the integration of some of the daa tools into Galaxy which would allow then to postprocess daa data with megan.

I just realized, the first four bytes are supposed to be ‘R’ ‘M’ ‘A’ ‘R’ but because I only shift the letters by 0-3 bits and not 0, 8, 16 and 24 bits, only the third and fourth bits get set, and so the first four bytes are indeed “00 00 03 f6”.

The daa-meganizer program does not “convert” a DAA file to RMA, it only appends additional blocks to the end of the DAA file, so the DAA files stays a DAA file. No new RMA file is generated.