From koenvanderdrift at gmail.com Mon Oct 3 08:00:44 2011 From: koenvanderdrift at gmail.com (Koen van der Drift) Date: Mon, 3 Oct 2011 08:00:44 -0400 Subject: [Biococoa-dev] test Message-ID: test From koenvanderdrift at gmail.com Mon Oct 3 15:13:46 2011 From: koenvanderdrift at gmail.com (Koen van der Drift) Date: Mon, 3 Oct 2011 15:13:46 -0400 Subject: [Biococoa-dev] New class: BCEntrezController Message-ID: <6CA2C1A9-4CE3-45E1-B737-11D33F4914FB@gmail.com> All, 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. Enjoy, - Koen. From koenvanderdrift at gmail.com Mon Oct 3 18:41:15 2011 From: koenvanderdrift at gmail.com (Koen van der Drift) Date: Mon, 3 Oct 2011 18:41:15 -0400 Subject: [Biococoa-dev] New class: BCEntrezController In-Reply-To: References: <6CA2C1A9-4CE3-45E1-B737-11D33F4914FB@gmail.com> Message-ID: Hi Scott, 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 Cheers, - Koen. 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. > > Scott > > On Oct 3, 2011, at 2:13 PM, Koen van der Drift wrote: > >> All, >> >> 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. >> >> Enjoy, >> >> - Koen. >> >> _______________________________________________ >> Biococoa-dev mailing list >> Biococoa-dev at www.bioinformatics.org >> http://www.bioinformatics.org/mailman/listinfo/biococoa-dev > From schristley at mac.com Mon Oct 3 18:13:38 2011 From: schristley at mac.com (Scott Christley) Date: Mon, 03 Oct 2011 17:13:38 -0500 Subject: [Biococoa-dev] New class: BCEntrezController In-Reply-To: <6CA2C1A9-4CE3-45E1-B737-11D33F4914FB@gmail.com> References: <6CA2C1A9-4CE3-45E1-B737-11D33F4914FB@gmail.com> Message-ID: 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. Scott On Oct 3, 2011, at 2:13 PM, Koen van der Drift wrote: > All, > > 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. > > Enjoy, > > - Koen. > > _______________________________________________ > Biococoa-dev mailing list > Biococoa-dev at www.bioinformatics.org > http://www.bioinformatics.org/mailman/listinfo/biococoa-dev From koenvanderdrift at gmail.com Tue Oct 4 08:20:41 2011 From: koenvanderdrift at gmail.com (Koen van der Drift) Date: Tue, 4 Oct 2011 08:20:41 -0400 Subject: [Biococoa-dev] New class: BCEntrezController In-Reply-To: References: <6CA2C1A9-4CE3-45E1-B737-11D33F4914FB@gmail.com> Message-ID: Thinking a bit more about this, now we're at 10.7, and I don't think everyone uses it yet, we need to decide what is the SDK we're using: 10.5, 10.6, 10.7? I'm leaning towards the "current OS-1" option, so that would be 10.6 in my case. But for those who haven't made the leap to Lion yet, may want to use 10.5. The same for the Xcode version. If I open my project in Xcode 4, make some commits, and then someone else opens it in Xcode3, will that give any problems? I could imagine that the warnings below are caused by such a situation. - Koen. On Mon, Oct 3, 2011 at 6:41 PM, Koen van der Drift wrote: > Hi Scott, > > 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 > > > Cheers, > > - Koen. > > > > > 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. >> >> Scott >> >> On Oct 3, 2011, at 2:13 PM, Koen van der Drift wrote: >> >>> All, >>> >>> 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. >>> >>> Enjoy, >>> >>> - Koen. >>> >>> _______________________________________________ >>> Biococoa-dev mailing list >>> Biococoa-dev at www.bioinformatics.org >>> http://www.bioinformatics.org/mailman/listinfo/biococoa-dev >> > > From schristley at mac.com Tue Oct 4 12:40:48 2011 From: schristley at mac.com (Scott Christley) Date: Tue, 04 Oct 2011 11:40:48 -0500 Subject: [Biococoa-dev] New class: BCEntrezController In-Reply-To: References: <6CA2C1A9-4CE3-45E1-B737-11D33F4914FB@gmail.com> Message-ID: Hi Koen, I went back to revision 193, before you made a bunch of changes to eliminate deprecated messages, and the tests passed fine, so my guess is that one of those changes has slightly different behavior which is causing the problem. I won't get to it today, but I can bring forward the changes one file at a time to see where the issue is, shouldn't be a problem. As for the SDK, I'm not sure it matters much, if somebody checks out the source then they can change it to whatever they want. It really only matters for a binary release which we haven't done in awhile (the recent releases have just been source), but it would be nice to do a binary release sometime in the future (or even just another source release as there have been a bunch of changes). cheers Scott On Oct 4, 2011, at 7:20 AM, Koen van der Drift wrote: > Thinking a bit more about this, now we're at 10.7, and I don't think > everyone uses it yet, we need to decide what is the SDK we're using: > 10.5, 10.6, 10.7? I'm leaning towards the "current OS-1" option, so > that would be 10.6 in my case. But for those who haven't made the leap > to Lion yet, may want to use 10.5. The same for the Xcode version. If > I open my project in Xcode 4, make some commits, and then someone else > opens it in Xcode3, will that give any problems? I could imagine that > the warnings below are caused by such a situation. > > - Koen. > > > > On Mon, Oct 3, 2011 at 6:41 PM, Koen van der Drift > wrote: >> Hi Scott, >> >> 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 >> >> >> Cheers, >> >> - Koen. >> >> >> >> >> 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. >>> >>> Scott >>> >>> On Oct 3, 2011, at 2:13 PM, Koen van der Drift wrote: >>> >>>> All, >>>> >>>> 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. >>>> >>>> Enjoy, >>>> >>>> - Koen. >>>> >>>> _______________________________________________ >>>> Biococoa-dev mailing list >>>> Biococoa-dev at www.bioinformatics.org >>>> http://www.bioinformatics.org/mailman/listinfo/biococoa-dev >>> >> >> From koenvanderdrift at gmail.com Tue Oct 4 13:44:17 2011 From: koenvanderdrift at gmail.com (Koen van der Drift) Date: Tue, 4 Oct 2011 13:44:17 -0400 Subject: [Biococoa-dev] New class: BCEntrezController In-Reply-To: References: <6CA2C1A9-4CE3-45E1-B737-11D33F4914FB@gmail.com> Message-ID: Hi Scott, Sorry if my efforts caused these errors :) I'll look into the error I'm getting if I can find some time inbetween life. - Koen. On Tue, Oct 4, 2011 at 12:40 PM, Scott Christley wrote: > Hi Koen, > > I went back to revision 193, before you made a bunch of changes to eliminate deprecated messages, and the tests passed fine, so my guess is that one of those changes has slightly different behavior which is causing the problem. ?I won't get to it today, but I can bring forward the changes one file at a time to see where the issue is, shouldn't be a problem. > > As for the SDK, I'm not sure it matters much, if somebody checks out the source then they can change it to whatever they want. ?It really only matters for a binary release which we haven't done in awhile (the recent releases have just been source), but it would be nice to do a binary release sometime in the future (or even just another source release as there have been a bunch of changes). > > cheers > Scott > > On Oct 4, 2011, at 7:20 AM, Koen van der Drift wrote: > >> Thinking a bit more about this, now we're at 10.7, and I don't think >> everyone uses it yet, we need to decide what is the SDK we're using: >> 10.5, 10.6, 10.7? ? I'm leaning towards the "current OS-1" option, so >> that would be 10.6 in my case. But for those who haven't made the leap >> to Lion yet, may want to use 10.5. ?The same for the Xcode version. If >> I open my project in Xcode 4, make some commits, and then someone else >> opens it in Xcode3, will that give any problems? ?I could imagine that >> the warnings below are caused by such a situation. >> >> - Koen. >> >> >> >> On Mon, Oct 3, 2011 at 6:41 PM, Koen van der Drift >> wrote: >>> Hi Scott, >>> >>> 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 >>> >>> >>> Cheers, >>> >>> - Koen. >>> >>> >>> >>> >>> 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. >>>> >>>> Scott >>>> >>>> On Oct 3, 2011, at 2:13 PM, Koen van der Drift wrote: >>>> >>>>> All, >>>>> >>>>> 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. >>>>> >>>>> Enjoy, >>>>> >>>>> - Koen. >>>>> >>>>> _______________________________________________ >>>>> Biococoa-dev mailing list >>>>> Biococoa-dev at www.bioinformatics.org >>>>> http://www.bioinformatics.org/mailman/listinfo/biococoa-dev >>>> >>> >>> > > From schristley at mac.com Tue Oct 4 15:14:53 2011 From: schristley at mac.com (Scott Christley) Date: Tue, 04 Oct 2011 14:14:53 -0500 Subject: [Biococoa-dev] New class: BCEntrezController In-Reply-To: References: <6CA2C1A9-4CE3-45E1-B737-11D33F4914FB@gmail.com> Message-ID: Hi Koen, Tests are good, wish I had more of them :-) Anyways, I tracked it down to BCSequenceReader.m, specifically -readFastaFile: method. It is has been awhile but I rewrote that method to be more efficient and I think there might have also been some bugs in the old code. I kept the old code around (using #if) in case there was problems. In your version, the old code has been re-enabled so that is what is triggering the test failure. Do you remember if any specific reason to switch back to old code? Scott On Oct 4, 2011, at 12:44 PM, Koen van der Drift wrote: > Hi Scott, > > Sorry if my efforts caused these errors :) I'll look into the error > I'm getting if I can find some time inbetween life. > > - Koen. > > > > On Tue, Oct 4, 2011 at 12:40 PM, Scott Christley wrote: >> Hi Koen, >> >> I went back to revision 193, before you made a bunch of changes to eliminate deprecated messages, and the tests passed fine, so my guess is that one of those changes has slightly different behavior which is causing the problem. I won't get to it today, but I can bring forward the changes one file at a time to see where the issue is, shouldn't be a problem. >> >> As for the SDK, I'm not sure it matters much, if somebody checks out the source then they can change it to whatever they want. It really only matters for a binary release which we haven't done in awhile (the recent releases have just been source), but it would be nice to do a binary release sometime in the future (or even just another source release as there have been a bunch of changes). >> >> cheers >> Scott >> >> On Oct 4, 2011, at 7:20 AM, Koen van der Drift wrote: >> >>> Thinking a bit more about this, now we're at 10.7, and I don't think >>> everyone uses it yet, we need to decide what is the SDK we're using: >>> 10.5, 10.6, 10.7? I'm leaning towards the "current OS-1" option, so >>> that would be 10.6 in my case. But for those who haven't made the leap >>> to Lion yet, may want to use 10.5. The same for the Xcode version. If >>> I open my project in Xcode 4, make some commits, and then someone else >>> opens it in Xcode3, will that give any problems? I could imagine that >>> the warnings below are caused by such a situation. >>> >>> - Koen. >>> >>> >>> >>> On Mon, Oct 3, 2011 at 6:41 PM, Koen van der Drift >>> wrote: >>>> Hi Scott, >>>> >>>> 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 >>>> >>>> >>>> Cheers, >>>> >>>> - Koen. >>>> >>>> >>>> >>>> >>>> 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. >>>>> >>>>> Scott >>>>> >>>>> On Oct 3, 2011, at 2:13 PM, Koen van der Drift wrote: >>>>> >>>>>> All, >>>>>> >>>>>> 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. >>>>>> >>>>>> Enjoy, >>>>>> >>>>>> - Koen. >>>>>> >>>>>> _______________________________________________ >>>>>> Biococoa-dev mailing list >>>>>> Biococoa-dev at www.bioinformatics.org >>>>>> http://www.bioinformatics.org/mailman/listinfo/biococoa-dev >>>>> >>>> >>>> >> >> From koenvanderdrift at gmail.com Tue Oct 4 16:15:33 2011 From: koenvanderdrift at gmail.com (Koen van der Drift) Date: Tue, 4 Oct 2011 16:15:33 -0400 Subject: [Biococoa-dev] New class: BCEntrezController In-Reply-To: References: <6CA2C1A9-4CE3-45E1-B737-11D33F4914FB@gmail.com> Message-ID: Hi Scott, Thanks for tracking that down. Feel free to enable the newer code. As long as it has the same results, it's fine with me. I probably disabled it because I thought it looked too complicated for a simple fasta file :) - Koen. On Tue, Oct 4, 2011 at 3:14 PM, Scott Christley wrote: > Hi Koen, > > Tests are good, wish I had more of them :-) > > Anyways, I tracked it down to BCSequenceReader.m, specifically -readFastaFile: method. ?It is has been awhile but I rewrote that method to be more efficient and I think there might have also been some bugs in the old code. ?I kept the old code around (using #if) in case there was problems. ?In your version, the old code has been re-enabled so that is what is triggering the test failure. ?Do you remember if any specific reason to switch back to old code? > > Scott > > On Oct 4, 2011, at 12:44 PM, Koen van der Drift wrote: > >> Hi Scott, >> >> Sorry if my efforts caused these errors :) ?I'll look into the error >> I'm getting if I can find some time inbetween life. >> >> - Koen. >> >> >> >> On Tue, Oct 4, 2011 at 12:40 PM, Scott Christley wrote: >>> Hi Koen, >>> >>> I went back to revision 193, before you made a bunch of changes to eliminate deprecated messages, and the tests passed fine, so my guess is that one of those changes has slightly different behavior which is causing the problem. ?I won't get to it today, but I can bring forward the changes one file at a time to see where the issue is, shouldn't be a problem. >>> >>> As for the SDK, I'm not sure it matters much, if somebody checks out the source then they can change it to whatever they want. ?It really only matters for a binary release which we haven't done in awhile (the recent releases have just been source), but it would be nice to do a binary release sometime in the future (or even just another source release as there have been a bunch of changes). >>> >>> cheers >>> Scott >>> >>> On Oct 4, 2011, at 7:20 AM, Koen van der Drift wrote: >>> >>>> Thinking a bit more about this, now we're at 10.7, and I don't think >>>> everyone uses it yet, we need to decide what is the SDK we're using: >>>> 10.5, 10.6, 10.7? ? I'm leaning towards the "current OS-1" option, so >>>> that would be 10.6 in my case. But for those who haven't made the leap >>>> to Lion yet, may want to use 10.5. ?The same for the Xcode version. If >>>> I open my project in Xcode 4, make some commits, and then someone else >>>> opens it in Xcode3, will that give any problems? ?I could imagine that >>>> the warnings below are caused by such a situation. >>>> >>>> - Koen. >>>> >>>> >>>> >>>> On Mon, Oct 3, 2011 at 6:41 PM, Koen van der Drift >>>> wrote: >>>>> Hi Scott, >>>>> >>>>> 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 >>>>> >>>>> >>>>> Cheers, >>>>> >>>>> - Koen. >>>>> >>>>> >>>>> >>>>> >>>>> 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. >>>>>> >>>>>> Scott >>>>>> >>>>>> On Oct 3, 2011, at 2:13 PM, Koen van der Drift wrote: >>>>>> >>>>>>> All, >>>>>>> >>>>>>> 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. >>>>>>> >>>>>>> Enjoy, >>>>>>> >>>>>>> - Koen. >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Biococoa-dev mailing list >>>>>>> Biococoa-dev at www.bioinformatics.org >>>>>>> http://www.bioinformatics.org/mailman/listinfo/biococoa-dev >>>>>> >>>>> >>>>> >>> >>> > > From koenvanderdrift at gmail.com Wed Oct 5 12:55:28 2011 From: koenvanderdrift at gmail.com (Koen van der Drift) Date: Wed, 5 Oct 2011 12:55:28 -0400 Subject: [Biococoa-dev] New class: BCEntrezController In-Reply-To: References: <6CA2C1A9-4CE3-45E1-B737-11D33F4914FB@gmail.com> Message-ID: Sounds good! Feel free to commit it. BTW, when I tried your code in readFastaFile yesterday, the test suite worked fine. Back to BCEntrezController, I've committed some improvements, and plan to add a demo app that shows how to use it. The demo will also be using CoreData and Bindings. And it's not using any BCSequence class :) - Koen. On Wed, Oct 5, 2011 at 12:30 PM, Scott Christley wrote: > You should have seen the original C code :-) ?Actually this is one thing that I don't like about NSString, because it stores Unicode it automatically doubles the size of text files, which is a real waste of memory when reading in big sequences. ?The new code doesn't completely fix that because it reads in the whole sequence file at once, but it does prevent the memory from exploding as that sequence file is chopped up into individual sequences. > > Actually the test failure was not due to reading in the sequence, but actually the BCAnnotation for the FASTA id, the old code and new code where using different key names. ?So I created a new constant string, BCSequenceID, so code uses that instead of hard-coding the key name. > > cheers > Scott > > On Oct 4, 2011, at 3:15 PM, Koen van der Drift wrote: > >> Hi Scott, >> >> Thanks for tracking that down. Feel free to enable the newer code. As >> long as it has the same results, it's fine with me. ?I probably >> disabled it because I thought it looked too complicated for a simple >> fasta file :) >> >> - Koen. >> >> On Tue, Oct 4, 2011 at 3:14 PM, Scott Christley wrote: >>> Hi Koen, >>> >>> Tests are good, wish I had more of them :-) >>> >>> Anyways, I tracked it down to BCSequenceReader.m, specifically -readFastaFile: method. ?It is has been awhile but I rewrote that method to be more efficient and I think there might have also been some bugs in the old code. ?I kept the old code around (using #if) in case there was problems. ?In your version, the old code has been re-enabled so that is what is triggering the test failure. ?Do you remember if any specific reason to switch back to old code? >>> >>> Scott >>> >>> On Oct 4, 2011, at 12:44 PM, Koen van der Drift wrote: >>> >>>> Hi Scott, >>>> >>>> Sorry if my efforts caused these errors :) ?I'll look into the error >>>> I'm getting if I can find some time inbetween life. >>>> >>>> - Koen. >>>> >>>> >>>> >>>> On Tue, Oct 4, 2011 at 12:40 PM, Scott Christley wrote: >>>>> Hi Koen, >>>>> >>>>> I went back to revision 193, before you made a bunch of changes to eliminate deprecated messages, and the tests passed fine, so my guess is that one of those changes has slightly different behavior which is causing the problem. ?I won't get to it today, but I can bring forward the changes one file at a time to see where the issue is, shouldn't be a problem. >>>>> >>>>> As for the SDK, I'm not sure it matters much, if somebody checks out the source then they can change it to whatever they want. ?It really only matters for a binary release which we haven't done in awhile (the recent releases have just been source), but it would be nice to do a binary release sometime in the future (or even just another source release as there have been a bunch of changes). >>>>> >>>>> cheers >>>>> Scott >>>>> >>>>> On Oct 4, 2011, at 7:20 AM, Koen van der Drift wrote: >>>>> >>>>>> Thinking a bit more about this, now we're at 10.7, and I don't think >>>>>> everyone uses it yet, we need to decide what is the SDK we're using: >>>>>> 10.5, 10.6, 10.7? ? I'm leaning towards the "current OS-1" option, so >>>>>> that would be 10.6 in my case. But for those who haven't made the leap >>>>>> to Lion yet, may want to use 10.5. ?The same for the Xcode version. If >>>>>> I open my project in Xcode 4, make some commits, and then someone else >>>>>> opens it in Xcode3, will that give any problems? ?I could imagine that >>>>>> the warnings below are caused by such a situation. >>>>>> >>>>>> - Koen. >>>>>> >>>>>> >>>>>> >>>>>> On Mon, Oct 3, 2011 at 6:41 PM, Koen van der Drift >>>>>> wrote: >>>>>>> Hi Scott, >>>>>>> >>>>>>> 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 >>>>>>> >>>>>>> >>>>>>> Cheers, >>>>>>> >>>>>>> - Koen. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> 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. >>>>>>>> >>>>>>>> Scott >>>>>>>> >>>>>>>> On Oct 3, 2011, at 2:13 PM, Koen van der Drift wrote: >>>>>>>> >>>>>>>>> All, >>>>>>>>> >>>>>>>>> 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. >>>>>>>>> >>>>>>>>> Enjoy, >>>>>>>>> >>>>>>>>> - Koen. >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Biococoa-dev mailing list >>>>>>>>> Biococoa-dev at www.bioinformatics.org >>>>>>>>> http://www.bioinformatics.org/mailman/listinfo/biococoa-dev >>>>>>>> >>>>>>> >>>>>>> >>>>> >>>>> >>> >>> > > From schristley at mac.com Wed Oct 5 13:20:32 2011 From: schristley at mac.com (Scott Christley) Date: Wed, 05 Oct 2011 12:20:32 -0500 Subject: [Biococoa-dev] New class: BCEntrezController In-Reply-To: References: <6CA2C1A9-4CE3-45E1-B737-11D33F4914FB@gmail.com> Message-ID: <83B264A3-B189-4D2F-A6A3-3F9E7898BAAB@mac.com> Committed. I also cleaned up the project a little regarding the SDK and Deployment settings, the project and the targets all had slightly different settings, so I tried to clean that up so there is only a single top-level project setting, which I set to 10.5. If you want to change, just change at the top-level project. BCEntrezController sounds nice. It is actually something I have need of today. I have a number of protein id's from a proteomics dataset that I need to match to gene id's. Pretty much I have the biologist manually doing Entrez queries then pulling out the gene. Doing the query isn't so bad, it's trying to parse the funky format that is on the page: http://www.ncbi.nlm.nih.gov/protein/15599417 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? Do you think it is possible to separate the query/fetching functionality from the gui? That would be great for writing batch programs to work on large datasets. Scott On Oct 5, 2011, at 11:55 AM, Koen van der Drift wrote: > Sounds good! Feel free to commit it. BTW, when I tried your code in > readFastaFile yesterday, the test suite worked fine. > > Back to BCEntrezController, I've committed some improvements, and plan > to add a demo app that shows how to use it. The demo will also be > using CoreData and Bindings. And it's not using any BCSequence class > :) > > - Koen. > > > > On Wed, Oct 5, 2011 at 12:30 PM, Scott Christley wrote: >> You should have seen the original C code :-) Actually this is one thing that I don't like about NSString, because it stores Unicode it automatically doubles the size of text files, which is a real waste of memory when reading in big sequences. The new code doesn't completely fix that because it reads in the whole sequence file at once, but it does prevent the memory from exploding as that sequence file is chopped up into individual sequences. >> >> Actually the test failure was not due to reading in the sequence, but actually the BCAnnotation for the FASTA id, the old code and new code where using different key names. So I created a new constant string, BCSequenceID, so code uses that instead of hard-coding the key name. >> >> cheers >> Scott >> >> On Oct 4, 2011, at 3:15 PM, Koen van der Drift wrote: >> >>> Hi Scott, >>> >>> Thanks for tracking that down. Feel free to enable the newer code. As >>> long as it has the same results, it's fine with me. I probably >>> disabled it because I thought it looked too complicated for a simple >>> fasta file :) >>> >>> - Koen. >>> >>> On Tue, Oct 4, 2011 at 3:14 PM, Scott Christley wrote: >>>> Hi Koen, >>>> >>>> Tests are good, wish I had more of them :-) >>>> >>>> Anyways, I tracked it down to BCSequenceReader.m, specifically -readFastaFile: method. It is has been awhile but I rewrote that method to be more efficient and I think there might have also been some bugs in the old code. I kept the old code around (using #if) in case there was problems. In your version, the old code has been re-enabled so that is what is triggering the test failure. Do you remember if any specific reason to switch back to old code? >>>> >>>> Scott >>>> >>>> On Oct 4, 2011, at 12:44 PM, Koen van der Drift wrote: >>>> >>>>> Hi Scott, >>>>> >>>>> Sorry if my efforts caused these errors :) I'll look into the error >>>>> I'm getting if I can find some time inbetween life. >>>>> >>>>> - Koen. >>>>> >>>>> >>>>> >>>>> On Tue, Oct 4, 2011 at 12:40 PM, Scott Christley wrote: >>>>>> Hi Koen, >>>>>> >>>>>> I went back to revision 193, before you made a bunch of changes to eliminate deprecated messages, and the tests passed fine, so my guess is that one of those changes has slightly different behavior which is causing the problem. I won't get to it today, but I can bring forward the changes one file at a time to see where the issue is, shouldn't be a problem. >>>>>> >>>>>> As for the SDK, I'm not sure it matters much, if somebody checks out the source then they can change it to whatever they want. It really only matters for a binary release which we haven't done in awhile (the recent releases have just been source), but it would be nice to do a binary release sometime in the future (or even just another source release as there have been a bunch of changes). >>>>>> >>>>>> cheers >>>>>> Scott >>>>>> >>>>>> On Oct 4, 2011, at 7:20 AM, Koen van der Drift wrote: >>>>>> >>>>>>> Thinking a bit more about this, now we're at 10.7, and I don't think >>>>>>> everyone uses it yet, we need to decide what is the SDK we're using: >>>>>>> 10.5, 10.6, 10.7? I'm leaning towards the "current OS-1" option, so >>>>>>> that would be 10.6 in my case. But for those who haven't made the leap >>>>>>> to Lion yet, may want to use 10.5. The same for the Xcode version. If >>>>>>> I open my project in Xcode 4, make some commits, and then someone else >>>>>>> opens it in Xcode3, will that give any problems? I could imagine that >>>>>>> the warnings below are caused by such a situation. >>>>>>> >>>>>>> - Koen. >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Mon, Oct 3, 2011 at 6:41 PM, Koen van der Drift >>>>>>> wrote: >>>>>>>> Hi Scott, >>>>>>>> >>>>>>>> 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 >>>>>>>> >>>>>>>> >>>>>>>> Cheers, >>>>>>>> >>>>>>>> - Koen. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> 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. >>>>>>>>> >>>>>>>>> Scott >>>>>>>>> >>>>>>>>> On Oct 3, 2011, at 2:13 PM, Koen van der Drift wrote: >>>>>>>>> >>>>>>>>>> All, >>>>>>>>>> >>>>>>>>>> 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. >>>>>>>>>> >>>>>>>>>> Enjoy, >>>>>>>>>> >>>>>>>>>> - Koen. >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> Biococoa-dev mailing list >>>>>>>>>> Biococoa-dev at www.bioinformatics.org >>>>>>>>>> http://www.bioinformatics.org/mailman/listinfo/biococoa-dev >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>> >>>>>> >>>> >>>> >> >> From schristley at mac.com Wed Oct 5 12:30:12 2011 From: schristley at mac.com (Scott Christley) Date: Wed, 05 Oct 2011 11:30:12 -0500 Subject: [Biococoa-dev] New class: BCEntrezController In-Reply-To: References: <6CA2C1A9-4CE3-45E1-B737-11D33F4914FB@gmail.com> Message-ID: You should have seen the original C code :-) Actually this is one thing that I don't like about NSString, because it stores Unicode it automatically doubles the size of text files, which is a real waste of memory when reading in big sequences. The new code doesn't completely fix that because it reads in the whole sequence file at once, but it does prevent the memory from exploding as that sequence file is chopped up into individual sequences. Actually the test failure was not due to reading in the sequence, but actually the BCAnnotation for the FASTA id, the old code and new code where using different key names. So I created a new constant string, BCSequenceID, so code uses that instead of hard-coding the key name. cheers Scott On Oct 4, 2011, at 3:15 PM, Koen van der Drift wrote: > Hi Scott, > > Thanks for tracking that down. Feel free to enable the newer code. As > long as it has the same results, it's fine with me. I probably > disabled it because I thought it looked too complicated for a simple > fasta file :) > > - Koen. > > On Tue, Oct 4, 2011 at 3:14 PM, Scott Christley wrote: >> Hi Koen, >> >> Tests are good, wish I had more of them :-) >> >> Anyways, I tracked it down to BCSequenceReader.m, specifically -readFastaFile: method. It is has been awhile but I rewrote that method to be more efficient and I think there might have also been some bugs in the old code. I kept the old code around (using #if) in case there was problems. In your version, the old code has been re-enabled so that is what is triggering the test failure. Do you remember if any specific reason to switch back to old code? >> >> Scott >> >> On Oct 4, 2011, at 12:44 PM, Koen van der Drift wrote: >> >>> Hi Scott, >>> >>> Sorry if my efforts caused these errors :) I'll look into the error >>> I'm getting if I can find some time inbetween life. >>> >>> - Koen. >>> >>> >>> >>> On Tue, Oct 4, 2011 at 12:40 PM, Scott Christley wrote: >>>> Hi Koen, >>>> >>>> I went back to revision 193, before you made a bunch of changes to eliminate deprecated messages, and the tests passed fine, so my guess is that one of those changes has slightly different behavior which is causing the problem. I won't get to it today, but I can bring forward the changes one file at a time to see where the issue is, shouldn't be a problem. >>>> >>>> As for the SDK, I'm not sure it matters much, if somebody checks out the source then they can change it to whatever they want. It really only matters for a binary release which we haven't done in awhile (the recent releases have just been source), but it would be nice to do a binary release sometime in the future (or even just another source release as there have been a bunch of changes). >>>> >>>> cheers >>>> Scott >>>> >>>> On Oct 4, 2011, at 7:20 AM, Koen van der Drift wrote: >>>> >>>>> Thinking a bit more about this, now we're at 10.7, and I don't think >>>>> everyone uses it yet, we need to decide what is the SDK we're using: >>>>> 10.5, 10.6, 10.7? I'm leaning towards the "current OS-1" option, so >>>>> that would be 10.6 in my case. But for those who haven't made the leap >>>>> to Lion yet, may want to use 10.5. The same for the Xcode version. If >>>>> I open my project in Xcode 4, make some commits, and then someone else >>>>> opens it in Xcode3, will that give any problems? I could imagine that >>>>> the warnings below are caused by such a situation. >>>>> >>>>> - Koen. >>>>> >>>>> >>>>> >>>>> On Mon, Oct 3, 2011 at 6:41 PM, Koen van der Drift >>>>> wrote: >>>>>> Hi Scott, >>>>>> >>>>>> 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 >>>>>> >>>>>> >>>>>> Cheers, >>>>>> >>>>>> - Koen. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> 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. >>>>>>> >>>>>>> Scott >>>>>>> >>>>>>> On Oct 3, 2011, at 2:13 PM, Koen van der Drift wrote: >>>>>>> >>>>>>>> All, >>>>>>>> >>>>>>>> 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. >>>>>>>> >>>>>>>> Enjoy, >>>>>>>> >>>>>>>> - Koen. >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Biococoa-dev mailing list >>>>>>>> Biococoa-dev at www.bioinformatics.org >>>>>>>> http://www.bioinformatics.org/mailman/listinfo/biococoa-dev >>>>>>> >>>>>> >>>>>> >>>> >>>> >> >> From koenvanderdrift at gmail.com Wed Oct 5 13:48:48 2011 From: koenvanderdrift at gmail.com (Koen van der Drift) Date: Wed, 5 Oct 2011 13:48:48 -0400 Subject: [Biococoa-dev] New class: BCEntrezController In-Reply-To: <83B264A3-B189-4D2F-A6A3-3F9E7898BAAB@mac.com> References: <6CA2C1A9-4CE3-45E1-B737-11D33F4914FB@gmail.com> <83B264A3-B189-4D2F-A6A3-3F9E7898BAAB@mac.com> Message-ID: 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: http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=protein&id=15599417&retmode=xml This url is actually used in BCEntrezController to obtain the sequence for the selected proteins: http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=protein&id=15599417&retmode=xml&format=fasta And you can seperate various id's by a comma to get them all at once: http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=protein&id=15599417, 2344657&retmode=xml&format=fasta 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. From koenvanderdrift at gmail.com Thu Oct 6 08:12:29 2011 From: koenvanderdrift at gmail.com (Koen van der Drift) Date: Thu, 6 Oct 2011 08:12:29 -0400 Subject: [Biococoa-dev] New class: BCEntrezController In-Reply-To: <83B264A3-B189-4D2F-A6A3-3F9E7898BAAB@mac.com> References: <6CA2C1A9-4CE3-45E1-B737-11D33F4914FB@gmail.com> <83B264A3-B189-4D2F-A6A3-3F9E7898BAAB@mac.com> Message-ID: On Wed, Oct 5, 2011 at 1:20 PM, Scott Christley wrote: > Committed. ?I also cleaned up the project a little regarding the SDK and Deployment settings, the project and the targets all had slightly different settings, so I tried to clean that up so there is only a single top-level project setting, which I set to 10.5. Hi Scott, Thanks for all you contributions to the project, I see a lot of new files appear. However, I kind of need to guess what they do, so could you add some Headerdoc documentation to the header files explaining what these classes do? See also here: http://www.bioinformatics.org/biococoa/wiki/pmwiki.php?n=Main.UsingHeaderDoc I tried searching for your protein id in my little demo app, and it indeed spits out the protein, so BCEntrezController can be used for that! I'm struggling a bit to copy my project into the BioCocoa tree, change the name and get it to work, but once that is done, I'll commit it. If you really need it now, I could zip it and mail it to you. - Koen. From koenvanderdrift at gmail.com Fri Oct 7 00:11:27 2011 From: koenvanderdrift at gmail.com (Koen van der Drift) Date: Fri, 7 Oct 2011 00:11:27 -0400 Subject: [Biococoa-dev] New demo app: Entrez Message-ID: All, I have committed a first version of a new demo app to demonstrate how to use the BCEntrezController class. This app currently only searches the protein database, using the Import command: Cmd-Shift-I. The app stores all the fetched sequences in a simple CoreData model and uses bindings to connect the data with the UI. It is still in a early version, with a very rudimentary GUI, but it works. Cheers, - Koen. ps. if anyone knows how to use an iTunes-like source list instead of an NSTableView, feel free to add that ;-)