[Biococoa-dev] strider and gck format
Alexander Griekspoor
a.griekspoor at nki.nl
Sat Mar 11 07:19:02 EST 2006
Just to make sure, you can also export DNA strider files in a ascii
format, I've attached a native file for you to test that is in the
default binary format.
Again, you can't use text, trying to read in a binary file as ascii
text will destroy the header..
Cheers,
Alex

On 11-mrt-2006, at 13:14, Koen van der Drift wrote:
>
> On Mar 11, 2006, at 4:44 AM, Alexander Griekspoor wrote:
>
>> 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].
>> 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.
>> 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...
>> Hope this clears things up?
>
>
> Yes, thanks! 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:
>
> BCSequenceArray *sequenceArray = [sequenceReader readFileUsingText:
> [[NSBundle mainBundle] pathForResource: @"Strider" ofType:@"seq"]];
>
> But that doesn't work. Maybe that should be changed to:
>
> BCSequenceArray *sequenceArray = [sequenceReader readFileUsingPath:
> [[NSBundle mainBundle] pathForResource: @"Strider" ofType:@"seq"]];
>
>
> I agree with you that passing the filepath is a better way of doing
> things. I will look into that this weekend.
>
> cheers,
>
> - Koen.
>
>
> _______________________________________________
> Biococoa-dev mailing list
> Biococoa-dev at bioinformatics.org
> https://bioinformatics.org/mailman/listinfo/biococoa-dev
>
***********************************
Mek (Alexander Griekspoor)
MekenTosj.com
Web: http://www.mekentosj.com
Mail: mek at mekentosj.com
***********************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.bioinformatics.org/pipermail/biococoa-dev/attachments/20060311/b25d9e2b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Ubiquitin
Type: application/octet-stream
Size: 340 bytes
Desc: not available
URL: <http://www.bioinformatics.org/pipermail/biococoa-dev/attachments/20060311/b25d9e2b/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.bioinformatics.org/pipermail/biococoa-dev/attachments/20060311/b25d9e2b/attachment-0001.html>
More information about the Biococoa-dev
mailing list