[Biococoa-dev] strider and gck format
Koen van der Drift
kvddrift at earthlink.net
Fri Mar 10 20:41:49 EST 2006
Hi,
I am still a bit confused about the strider and gck formats. In his
code, Alex uses the following snippet to determine if a file is one
of both formats:
- (NSDictionary *)readFile:(NSString *)textFile
{
NSMutableDictionary *theContents;
NSString *lineBreak;
// BINARY
// Strider?
if([NSHFSTypeOfFile(textFile) isEqualToString: @"'xDNA'"]){
theContents = (NSMutableDictionary*) [self readStriderFile:textFile];
// GCK?
}else if([NSHFSTypeOfFile(textFile) isEqualToString: @"'GCKc'"] ||
[NSHFSTypeOfFile(textFile) isEqualToString: @"'GCKs'"]){
theContents = (NSMutableDictionary*) [self readGCKFile:textFile];
// TEXT
}else {
So it's based on the file type. However, looked on the net for some
sample files to test the code, and found those, but almost none of
them have the xDNA, GCKc, or GCKs extension. So those files will be
skipped by the code. For all other formats we use a recognition
string within the file, eg > for fasta or HEADER for PDB's. I think
that is a better approach, since we are not dependent on file types
but on file content.
Is there a typical recognition string for these data formats that we
can use for file recognition? If not, is there another way we can
make sure we catch all Strider and/or GCK files?
cheers,
- Koen.
More information about the Biococoa-dev
mailing list