<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><BR><DIV><DIV>On 11-mrt-2006, at 13:14, Koen van der Drift wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">On Mar 11, 2006, at 4:44 AM, Alexander Griekspoor wrote:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV> <BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Both the GCK and the Strider files are inherited from the good old MacOS9 period. In those days you would identify files using a type/creator code, and that's what I check for in this code. You will never see these 4 character codes unless you use a program like resedit, and they are not the same as file extensions, in fact under MacOS9 you would never use file extensions unless you wanted your Windows buddies to open your word file as well. So NSHFSTypeOfFile is not the same as [filepath pathExtension].</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">The problem is that both filetypes are in binary format compared to the other formats which are ASCII based. Trying to read in the file as a string with ascii encoding creates some garbage which is impossible to interpret, let alone determine the filetype from. So the options were to either read all files in as data and check if it would fit the header of either filetype, and try to make anything out of that (quite tricky!) or simply to the filetype check. As a result I changed the code to have it pass the filepath instead of the raw text to the reader class. It better isolates code (no more reading at all in the delegate class), but we sacrifice the possibility to work with remote files. Guess this could be easily added to through a readFileFromURL method.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Now that I think of it, perhaps we should also check for the file extensions that are added to GCK files if you create them on the windows platform. I'm not sure if in those files the creator/type codes are added, I could check that on monday...</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Hope this clears things up?</DIV> </BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Yes, thanks!<SPAN class="Apple-converted-space">  </SPAN>I was trying to test your code in the framework using the Translation example. So I found some strider test file and read that in with the current code in Translation. The file works fine with your demo app. However in Translation it doesn't. Right now I use:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">BCSequenceArray *sequenceArray = [sequenceReader readFileUsingText: [[NSBundle mainBundle] pathForResource: @"Strider" ofType:@"seq"]];</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">But that doesn't work. Maybe that should be changed to:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">BCSequenceArray *sequenceArray = [sequenceReader readFileUsingPath: [[NSBundle mainBundle] pathForResource: @"Strider" ofType:@"seq"]];</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I agree with you that passing the filepath is a better way of doing things. I will look into that this weekend.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">cheers,</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">- Koen.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Biococoa-dev mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:Biococoa-dev@bioinformatics.org">Biococoa-dev@bioinformatics.org</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="https://bioinformatics.org/mailman/listinfo/biococoa-dev">https://bioinformatics.org/mailman/listinfo/biococoa-dev</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV> </BLOCKQUOTE></DIV><BR><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; ">***********************************</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Mek (Alexander Griekspoor)</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">    <SPAN class="Apple-converted-space"> </SPAN><FONT class="Apple-style-span" size="5"><SPAN class="Apple-style-span" style="font-size: 18px;"><B style="font-size: 18px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-size: 18px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-size: 18px; font-weight: bold; ">Mek</SPAN></SPAN></B></SPAN></FONT><FONT class="Apple-style-span" color="#7F7F7F" size="5"><SPAN class="Apple-style-span" style="font-size: 18px;; color: rgb(127, 127, 127); "><B style="color: rgb(127, 127, 127); font-size: 18px; font-weight: bold; "><SPAN class="Apple-style-span" style="color: rgb(127, 127, 127); font-size: 18px; font-weight: bold; "><SPAN class="Apple-style-span" style="color: rgb(127, 127, 127); font-size: 18px; font-weight: bold; ">en</SPAN></SPAN></B></SPAN></FONT><FONT class="Apple-style-span" size="5"><SPAN class="Apple-style-span" style="font-size: 18px;"><B style="font-size: 18px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-size: 18px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-size: 18px; font-weight: bold; ">Tosj</SPAN></SPAN></B></SPAN></FONT><FONT class="Apple-style-span" color="#7E7E7E" size="5"><SPAN class="Apple-style-span" style="font-size: 18px;; color: rgb(126, 126, 126); "><B style="color: rgb(126, 126, 126); font-size: 18px; font-weight: bold; "><SPAN class="Apple-style-span" style="color: rgb(126, 126, 126); font-size: 18px; font-weight: bold; "><SPAN class="Apple-style-span" style="color: rgb(126, 126, 126); font-size: 18px; font-weight: bold; ">.</SPAN></SPAN></B></SPAN></FONT><FONT class="Apple-style-span" size="5"><SPAN class="Apple-style-span" style="font-size: 18px;"><B style="font-size: 18px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-size: 18px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-size: 18px; font-weight: bold; ">com</SPAN></SPAN></B></SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Web: <A href="http://www.mekentosj.com">http://www.mekentosj.com</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Mail:  <A href="mailto:mek@mekentosj.com">mek@mekentosj.com</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>