From koenvanderdrift at gmail.com Mon Jun 8 09:26:52 2009 From: koenvanderdrift at gmail.com (Koen van der Drift) Date: Mon, 8 Jun 2009 09:26:52 -0400 Subject: [Biococoa-dev] BioCocoa and CoreData Message-ID: <5cba6b9f0906080626q5383d8f9ifba00baef07d543d@mail.gmail.com> Hi, I haven't been doing a lot of programming in a while, but with the WWDC starting and all the news and twittering around it, I couldn't resist to open up Xcode. One thing I read a lot about recently is Core Data (yes, I know, I'm slow, it's been out for a few years now :-), and at first glance it looks like a very useful technique. So I thought to write a small demo app like a simple sequence editor for BioCocoa that uses CoreData, just as an exercise. The excellent tutorial at MacResearch.org also deals with molecules, so that was promising. But when I thought more about it, I came to the conclusion that an editor is actually not a good example to use with CoreData (please correct me if I'm wrong). It get's more interesting when the app deals with more than one sequence at a time, eg when aligning them, or when dealing with digests from a main sequence. On top of that, if I use BCSequence as an attribute for my Sequence entity, I still need to go to all the BioCocoa classes for I/O, use all the accessors, etc. So, just out of curiosity, I was wondering if anyone has used CoreData in combination with BioCocoa? Should/can BioCocoa be adapted to be more CoreData friendly? cheers, - Koen. From kvddrift at earthlink.net Sat Jun 13 18:45:07 2009 From: kvddrift at earthlink.net (Koen van der Drift) Date: Sat, 13 Jun 2009 18:45:07 -0400 Subject: [Biococoa-dev] Displaying protein sequences and alignments in a NSTextView In-Reply-To: <00CF2CBB-AC76-447B-913B-EAF3DC7E813E@dias.kvl.dk> References: <00CF2CBB-AC76-447B-913B-EAF3DC7E813E@dias.kvl.dk> Message-ID: Dear Peter, Thanks for your message. I will try to answer your questions. I also CC'ed the mailinglist so other developers get a chance to respond. > I am tinkering a bit with adding GUI front ends to some of my own > scripts as well as bioinformatics command-line tools using NSTask, > and the basic machinery now works. Then there is the task of > displaying protein sequences in a nice way and here I have just > found out that NSTextView cannot easily me made to not wrap the > lines. I have found various work-arounds rather than good solutions > for this by Googling, so rather unhappy about it I now think that I > should go all the way as you have done in Biococa 2. >> > Firstly, I suppose that your NSTextView will allow for a non- > columnar view as is used for (aligned) protein sequences? That should be possible, right now the BCSequenceView is only included as an example and is not very flexible. You could subclass it to add the text display behavior that you are looking for. > Secondly, I wanted to take a look at one of your examples and chose > Peptides. I created a new project in XCode, threw out plists that > were already in the Peptides example as well as the main menu nib > and replaced it with the files of the example. Added the Biococoa2 > framework and hit "Build". Exit with status 5. This does not mean > anything to me, I am sorry to say. I get the same error too, it looks like the project is missing a build phase. This is how you can solve it: In Xcode, open the Targets in the left column, and right-click on Peptides. Then choose Add -> New Build Phase -> New Copy Files Build Phase. This will add an extra gray rectangle under Peptides. Look again in the left column, open Frameworks and drag the BioCocoa icon to the copy build phase you just added. You should now see the BioCocoa toolbox icon in both places. Now try to rebuild and run it. Can anyone with svn commit access fix this in SVN, and maybe in the release that Peter is using? > Thirdly I tried the command-line entries to build the documentation. > It does not work, no matter where I cd to. It invariably says > "HeaderDoc: file/directory not found: BCFoundation". What is it that > I do not get here? Why not just include the html-files themselves > rather than these extra hoops to jump through? Building the documentation from Xcode does not give me any errors with the most recent realeae of BioCocoa on my system. BioCocoa uses Headerdoc to generate the docs, so comments in the code will be converted to html. > So basically I have to admit that probably is something quite basic > about BioCocoa that I have missed, and wonder if you would get me on > the right track? Probably :) What system and BioCocoa version are you using? Hopefully this answers some of your questions - feel free to ask more if thing are unclear. - Koen.