[Biococoa-dev] New class: BCEntrezController
schristley at mac.com
Mon Oct 3 18:13:38 EDT 2011
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