Icons for Mac OS X - a philosophical view

John Nash
2011-12-14
2013-04-18
  • John Nash

    John Nash - 2011-12-14

    Good afternoon,

    Part of my job is to train and educate lab technicians on how to use the Staden package to check/fix/edit genomes of the pathogens that we sequence.  As head of the bioinformatics facility, I believe that highly qualified bench technicians AND excellent PIs should not waste their time learning Perl, Tcl/Tk, etc., but should work with bioinformaticians like me to utilize our computational expertise and their excellent biological knowledge together. I also have a PhD in genetics so I can sympathize with their point of view. But then, their competence can be used to edit and proof-read genomes, opening up our bioinformaticans' time to do heavy crunching - like run mira or gsAssembler, etc.

    Most of the technicians are highly skilled bench workers who are intimidated by the command line but will happily work with a GUI. Once I can get them to start 'gap5', everything works well. I have tried using several platforms to do this efficiently with varying results. e.g.

    Windows - BIG fail. Technicians love it, but commonly available code is so broken that I spend more time fixing things than working on genetic matters.

    Unix - BIG fail.  The bench staff are absolutely terrified - even with Gnome, and I have no idea why.  I waste a lot of time going over simple concepts again and again. Even "ls" and "more".  I'm not going to fight it or impose something that they hate. I don't get it but I have to be pragmatic.

    Mac OS X - fairly good success.  The bioinformaticians get to compile and run anything Unixy with great success. The institutional IT tech support doesn't impose stringent Windows rules because they don't understand Macs (do I have to put a smiley here?). Mac minis are cheap. The bench technicians get a fairly familiar GUI, programs that they can use (Word, Firefox, Chrome), and we can concentrate on designing workflows. I don't see any huge difference between Aqua and Gnome but if it works, I am happy.

    Avoiding the Terminal:

    Recently, while learning how to make Mac applications using an excellent tool called Platypus, I designed two GUI loaders for gap5. One (dropGap5) is "droppable" so that you can either drop a g5d or g5x file on an icon, and it will launch gap5 with that database, or if you associate the g5d or g5x file types with it, clicking on the gap5 file will launch it. This app is just a wrapper to  /usr/local/staden/share/staden/tcl/gap5/gap5.tcl with added features.

    The other (gap5-loader) is part of a bigger project where launching it will check whether the database has been secured in a git repository, check that gap5 closed properly upon the previous exit, back up the project if it is not backed up, then launch gap5.  Upon exiting properly, it will check the database back in. This latter program is in design stages - the git part is still to be written. It's in bash so that I can move it to other Unixes with few mods. So far, it just opens a dialog box to allow you to select your gap5 database.

    Why am I writing this post?  For several reasons. To solicit practices from other labs. Is git a good way to perform automated temporal back up versions of a gap database?  Have others considered these things before? Am I re-inventing the wheel.

    Also, seeing as I wrote these things, I am happy to make these available to the community because it's how we work.

    Zipped copies are in my public Dropbox folder until the bugfixes are done. then I'll move them to my google project page. So if anybody wants to try them… dropGap5 is at http://dl.dropbox.com/u/3218364/Bioinformatics/dropGap5.zip  and gap5-loader is at http://dl.dropbox.com/u/3218364/Bioinformatics/gap5-loader.zip

    The only issue is that the $STADENROOT has to be /usr/local/staden.  The code is so easy to read that you can modify the app bundle to reflect your own location.  These apps are more of a demo of workflows than fancy-dancy programs.

    I'd love to hear comments.
    John

     
  • James Bonfield

    James Bonfield - 2011-12-15

    Ah wonderful timing.  I've just been experimenting with this myself. Ages ago I did have a Mac binary build for gap4, including drag and drop, file associations, icons, the works. I copied the icons over to the new build (although gap4 and gap5 icons are therefore the same - I can't for the life of me remember how I created a .icns file as nothing at all understands the format, at least not in the unix world).

    The Contents/MacOS/gap4 executable was just that, an executable. It looks like I must have done some objective C coding at some stage, but for the life of me I can't figure out where the source went!  So right now I have a simple shell script which gets executed, parses $0 to figure out the location of STADENROOT relative to the script, sets up the variables and then runs gap5 as before. The only problem is drag and drop doesn't look doable unless there is a command-line bash level interface for decoding the cryptic _pcn_0_* arguments that somehow point to the incoming filenames.

     
  • James Bonfield

    James Bonfield - 2011-12-15

    Ah I found libicns as a sourceforge project, able to go between icns and png. Great.

    As for the gap4 executable before, deeper digging in both file and my memory revealed I used Platypus last time to generate it. I guess I gave up faffing around with Objective C, although it's tempting to figure it out properly this time.

     
  • James Bonfield

    James Bonfield - 2011-12-15

    I just uploaded a .dmg file containing 32-bit and 64-bit intel universal binaries for a MacOS build of 2.0.0b9.

    This contains a few basic icons (they need more work, but I'm open to volunteers), appropriate file associations and .app bundles for Gap4, Gap5, Pregap5, Trev and Spin.  It's experimental, but please let me know how well it works for you. It should work fine from any directory location and hopefully doesn't have any major dependencies on the local system as it contains local builds of the MacPorts libraries I was using.

    Tg_index doesn't have any wrapping atm, but it's non interactive anyway. I'm thinking the appropriate GUI for this really belongs in gap5 itself as an Import option in the file menu, and I should probably rename tg_index to be gap5_import too for the command line version so it mirrors the already existing gap5_export command line tool.

    James

     
  • John Nash

    John Nash - 2011-12-15

    Thanks for the reply.  I use img2icns - stole your stylized S logo and made it into an icon. tg_index is fine as it is, IMO. If you do add it into gap4/5 as an Import menu item, please consider keeping it as a command line app. 

    Between tg_index, gap5_export and Bastien's convert_project (from mira) - it's a conversion goldmine.

    I have to say it - you guys ROCK!
    John

     
  • John Nash

    John Nash - 2011-12-15

    Any comments on using git as a repository for genome sequences. 

    Often i see gap5 database which have been totally screwed up, and there's no recovery if a backup has not been made.  In particular, the Windows version had a habit of losing the association between the consensus and the columns of reads, and we never figured out how to fix it.  Never happened on the Mac and Linux versions.

    No matter how much I nag, people will not think to manually create folder and back up genomes which they are editing.  And if they do, they change the naming conventions from day to day - which is fine and dandy until John writes a script to do something en masse.

    J

     
  • John Nash

    John Nash - 2011-12-15

    Thanks for the 64-bit DMGs for the mac. As mentioned in the other thread, when our batch of minis come in, in Jan, they will be put to good use.

    You mentioned "universal binaries"… I had better test this out on Lion as anything Rosetta-based will not work on Lion.

    J

     
  • James Bonfield

    James Bonfield - 2011-12-15

    There have been lots of bugs with the consensus caching, and I think a few still exist :(. It's hard to track down, but some of our linux users occasionally see nasties still so it's something I'm chasing up.  Now Check Database (when in fix mode) should invalidate any cached consensus for the contigs it is ran on, at least providing a workaround. Also if something is really bad we use gap5_export and tg_index to go from gap5 to sam to gap5 again. It's slow, but pretty bullet proof.

    The universal binary thing isn't a ppc build. It's simply -arch i386 -arch x86_64 on the compilation line. Would that still cause issues for Lion? I tested the binaries on 10.6.8 today and it worked. I thikn it's built on 10.4 or 10.5 (forget which now).

     
  • John Nash

    John Nash - 2011-12-16

    The universal binary thing isn't a ppc build. It's simply -arch i386 -arch x86_64 on the compilation line. Would that still cause issues for Lion? I tested the binaries on 10.6.8 today and it worked. I thikn it's built on 10.4 or 10.5 (forget which now).

    I have a personal Mac which is rarely used for work, except to check that code runs under Lion - I am not ready to change the work Macs from Snow Leopard. Unfortunately with the new shipment of Mac minis, I will have no choice.

    The package works perfectly on my Macbook Pro under Lion (10.7.2).  One caveat - as with a freshly built package, the first time it starts up, it takes ages - 75 seconds or more. I thought that it was broken but waited a bit longer, then bingo.  It takes 2 seconds to start the second time.

    All is good, and you still rock!
    J

     
  • John Nash

    John Nash - 2011-12-16

    There have been lots of bugs with the consensus caching, and I think a few still exist :(. It's hard to track down, but some of our linux users occasionally see nasties still so it's something I'm chasing up.  Now Check Database (when in fix mode) should invalidate any cached consensus for the contigs it is ran on, at least providing a workaround. Also if something is really bad we use gap5_export and tg_index to go from gap5 to sam to gap5 again. It's slow, but pretty bullet proof.

    Good to know.  When I was still fighting with Windows, I tried gap5 to CAF to gap5 and it didn't work. SAM it is.

    J

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks