[Biococoa-dev] New class: BCEntrezController
Koen van der Drift
koenvanderdrift at gmail.com
Mon Oct 3 18:41:15 EDT 2011
I just now tested it on my system (Xcode4 and 10.7.1). It compiles fine, but get the following error during the run:
Unknown.m:0: error: -[TestBCSuffixArray testFileConstructSuffixArray] : -[__NSCFDictionary setObject:forKey:]: attempt to insert nil value (key: id)
and a bunch of warnings regarding SDK and OS compatibility:
LLVM GCC 4.2 default Mac OS X deployment target '10.7.1' for architecture 'x86_64' and variant 'normal' is greater than the maximum value '10.7' for the Mac OS X 10.7 SDK.
Unfortunately I don't have much time to look into it right now
On Oct 3, 2011, at 6:13 PM, Scott Christley wrote:
> Thanks Koen!
> Have you tried the test suite lately? I updated from SVN because I have some changes that I want to submit, but now the test suite is failing. Oddly I am able to run the test suite from the command line without any errors, so it makes me wonder if there is a configuration problem.
> On Oct 3, 2011, at 2:13 PM, Koen van der Drift wrote:
>> I have committed a new class BCEntrezController to the trunk. This class is are heavily based on Alexander's EntrezController class that he committed a few years ago to BioCocoa and is used in Mekentosj's program EnzymeX. I choose not to update his class in svn, but to create a new one, so his original entry will still be available for reference. His original class is tied to the Entrez.nib file, and I left that connection intact as well. Interestingly, this class does not use any of the BC classes at all :)
>> The main update is that the code now uses the native NSXMLParser instead of an older/outdated third party framework. I don't know if using NSXMLParser is the most efficient, I read about other parsers such as libxml, but for me it works. The second major change with the original code is that the data are now stored in an NSSDictionary, instead of in an EntrezResult object. The main advantage I think is that by using an NSDictionary, parsing becomes more flexible, and the user can add any info from the search results in their data model. For instance, I have added the url of the sequence as an example. But anything can be added if that info is available and needed: authors, annotations, mutations, references, etc. Finally, multiple records can be fetched at once, and are send to the delegate as an NSArray.
>> Obviously, there are other improvements possible: choosing a different database, choosing whether to search for proteins or nucleotides, etc. But I will leave that up to the reader. The parser code could also be factored out for more flexibility.
>> I will also add a demo application soon that demonstrates the use of this class.
>> - Koen.
>> Biococoa-dev mailing list
>> Biococoa-dev at www.bioinformatics.org
More information about the Biococoa-dev