[Biococoa-dev] New Structure for BioCocoa
Philipp Seibel
biococoa at bioworxx.com
Sun Jul 3 08:06:18 EDT 2005
Am 03.07.2005 um 13:45 schrieb Koen van der Drift:
> On Jul 3, 2005, at 6:12 AM, Philipp Seibel wrote:
>
>
>>> I like the parser idea, particularly if it is already written by
>>> you ;-)
>>> I won't be of any help with C++, though!
>>>
>> this is no problem, because there is no much need of c++ except
>> from expression templates.
>> The parser isn't allready written by me sorry ;-), but i'm working
>> on it.
>>
>> I'd like to know the different sequence formats i should
>> implement, that i can finish the parsers for the sequence io first.
>>
>
> Check out BCSequenceReader and BCReader (deprecated, but still in
> the project for reference) for some formats, just note that these
> methods still need a lot of work, annotations and features are
> still not completely implemented. Note that there a re already
> various parsers out there that could be of help, eg lucegene,
> bioperl and more.
>
> What I don't understand yet is why the sequence parser framework is
> at the bottom of your picture. This implies to me that it is the
> basis for all the other frameworks? Why not put BCFoundation with
> BCSymbol and BCSequence there, that seems much more logical to me.
In terms of importance you are right, but i wanted to show that you
can't use BCFoundation without BCParser, because the BCFoundation-IO
depends on the parsers. The same with all other BCXXXFrameworks.
>
>> Very good summary of the discussion.
>> I think we should try to implement the string thing in different
>> ways and test the performance, to see which one is the best.
>>
>>
>
> Maybe you can already post some sample code here, so we can get an
> idea what you have in mind.
Just give me one more week. I started the project a couple of days
before.
Here is a short description:
The base class is a BCParser, that can be instantiated with NSData or
contentsOfURL etc. (just like NSXMLParser). The parser has a event
driven architecture, which means that it calls delegate methods
whenever it founds specific information in the parsed data
(NSXMLParser ;-)). Errors are reported with the NSError class. Here
is a first unfinished example of the BCGenBankParser delegate methods:
@interface NSObject (BCGenBankParserDelegateMethods)
- (void)parserDidBeginSequence:(BCParser *)parser;
// General Information
- (void)parser:(BCParser *)parser foundDefinition:(NSString *)
definition;
- (void)parser:(BCParser *)parser foundAccession:(NSString *)accession;
- (void)parser:(BCParser *)parser foundKeywords:(NSArray *)keywords;
// References
- (void)parser:(BCParser *)parser didBeginReferenceForRange:(NSRange)
range;
- (void)parser:(BCParser *)parser foundReferenceAuthors:(NSArray *)
keywords;
- (void)parser:(BCParser *)parser foundReferenceTitle:(NSString *)title;
- (void)parser:(BCParser *)parser foundReferenceJournal:(NSString *)
journal;
- (void)parserDidEndReference:(BCParser *)parser;
- (void)parser:(BCParser *)parser foundSequence:(NSString *)sequence;
- (void)parserDidEndSequence:(BCParser *)parser;
@end
thats it for the moment.
feel free to comment the concept.
cheers,
Phil
> cheers,
>
> - Koen.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.bioinformatics.org/pipermail/biococoa-dev/attachments/20050703/5732a8d6/attachment.html>
More information about the Biococoa-dev
mailing list