[Biococoa-dev] New class: BCEntrezController

Koen van der Drift koenvanderdrift at gmail.com
Wed Oct 5 13:48:48 EDT 2011

Hi Scott,

Glad you like BCEmntrezController!

> Do Entrez have a query service which returns the data in a good machine-readable format so it is easy to extract
> out relevant bits?

Yes. BCEntrezController is based on the code that Mekentosj uses in
their app EnzymeX, but that's for nucleotides, not for proteins. It
searches Entrez based on a query term, not an id. Although actually, I
think you can enter an id as well, I haven't tried that.

The url you gave is in whatever format that particular protein is
listed, in your case it is in the uniprot/swissprot format.  I think
what you are looking for is this:


This url is actually used in BCEntrezController to obtain the sequence
for the selected proteins:


And you can seperate various id's by a comma to get them all at once:


Again, this is implemented in BCEntrezController. It should not be
that difficult to have the user enter a bunch of id's and then to
extract all the info.

>  Do you think it is possible to separate the query/fetching functionality from the gui?

BCEntrezController already does thit, it returns an NSArray of
NSDictionaries that hold the fetched info for each protein. You can
always subclass it and overwrite the parser delegate methods to
extract what ever info you want.

The scenario that you describe is exactly what BCEntrezController is
intended for, I have a small demo app that stores all the fetched info
in a coredata model, so you don't need to re-query every sequence if
you have already done so. I will commit that in the next few days.

I hope I understood your questions correctly.

- Koen.

More information about the Biococoa-dev mailing list