<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Hi all, since we have people here that came with macvector data, I had to write something to read macvector files and convert them to open format (I'm doing in python since we run on several OS).<DIV>I downloaded biococoa which lacks MV reading capabilities (or simply I couldn't see them looking at BCSequenceReader.m). Unfortunately I have so few time to collaborate, nevertheless I would like to share how to read a MV file (or, at least, what I've found out...), so if you want you can include MV reading capabilities into BioCocoa code.</DIV><DIV>What I'm writing is valid for nucleic acid sequences, I haven't looked into AA sequence files... BTW</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>A hexdump of a MV file is something like:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><FONT class="Apple-style-span" face="Courier New">00000000  00 00 00 01 01 01 43 80  01 06 07 60 00 00 00 00  |......C....`....|</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier New">00000010  00 00 00 01 00 00 11 09  00 00 00 01 00 00 11 09  |................|</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier New">00000020  <B>00 00 11 09</B> 08 08 02 08  02 01 08 04 08 08 08 04  |................|</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier New">00000030  01 02 01 04 02 08 08 01  08 02 01 08 02 04 01 08  |................|</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier New">00000040  01 01 04 02 08 08 08 01  01 08 04 02 04 04 08 01  |................|</FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The first line contains a header but it seems to change among different files, I still have to understand why... only the first 7 bytes are pretty conserved.</DIV><DIV>At byte 32 starts a 4 bytes offset that is the sequence length. Be careful that MV saves files with PPC endianness (big endian), so if you want to build universal binary you should use some foundation class that allows this (I can't recall the name...). After that you are ready to read from byte 36 to byte 36+length, that is the sequence. I've found that every byte is a nucleotide with this encoding:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><FONT class="Apple-style-span" face="Courier New">0x00 => -</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier New">0</FONT><FONT class="Apple-style-span" face="Courier New">x01 => A</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier New">0x</FONT><FONT class="Apple-style-span" face="Courier New">02 => C</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier New">0x</FONT><FONT class="Apple-style-span" face="Courier New">03 => M</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier New">0x</FONT><FONT class="Apple-style-span" face="Courier New">04 => G</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier New">0x</FONT><FONT class="Apple-style-span" face="Courier New">0</FONT><FONT class="Apple-style-span" face="Courier New">5 => R</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier New">0x</FONT><FONT class="Apple-style-span" face="Courier New">06 => S</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier New">0x</FONT><FONT class="Apple-style-span" face="Courier New">07 => V</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier New">0x</FONT><FONT class="Apple-style-span" face="Courier New">08 => T</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier New">0x</FONT><FONT class="Apple-style-span" face="Courier New">09 => W</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier New">0x</FONT><FONT class="Apple-style-span" face="Courier New">0a => Y</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier New">0x</FONT><FONT class="Apple-style-span" face="Courier New">0b => H</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier New">0x</FONT><FONT class="Apple-style-span" face="Courier New">0c => K</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier New">0x</FONT><FONT class="Apple-style-span" face="Courier New">0d => D</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier New">0x</FONT><FONT class="Apple-style-span" face="Courier New">0e => B</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier New">0x</FONT><FONT class="Apple-style-span" face="Courier New">0f => N</FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>So, in the sequence example before you have TTCTCATGTTTGACAGCTTAT....</DIV><DIV>These infos are enough to read at least the sequence.</DIV><DIV>Immediatly after the sequence there is the "features" section. If you are interested I will post another mail for that, even if I still haven't completely undestood it.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Cheers</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>d</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>/*<DIV><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Davide Cittaro</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">HPC and Bioinformatics Systems @ Informatics Core</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">IFOM - Istituto FIRC di Oncologia Molecolare</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">via adamello, 16</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">20139 Milano</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Italy</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">tel.: +39(02)574303007</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">e-mail:<SPAN class="Apple-converted-space"> </SPAN><A href="mailto:davide.cittaro@ifom-ieo-campus.it"><FONT class="Apple-style-span" color="#0011ED"><SPAN class="Apple-style-span" style="color: rgb(0, 17, 237); -khtml-text-decorations-in-effect: underline; "><SPAN class="Apple-style-span" style="color: rgb(0, 17, 237); -khtml-text-decorations-in-effect: underline; ">davide.cittaro@ifom-ieo-campus.it</SPAN></SPAN></FONT></A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">*/</DIV><BR class="Apple-interchange-newline"></SPAN></SPAN> </DIV><BR></DIV></BODY></HTML>