<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Code-itch &#187; linkedin</title>
	<atom:link href="http://www.code-itch.com/blog/tag/linkedin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.code-itch.com/blog</link>
	<description>A non-coders attempts at writing useful code</description>
	<lastBuildDate>Sat, 20 Mar 2010 20:13:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>The Berkeley synchrotron Brandeis Campus: Remote synchrotron data collection courtesy the tubes</title>
		<link>http://www.code-itch.com/blog/2009/02/the-berkeley-synchrotron-brandeis-campus/</link>
		<comments>http://www.code-itch.com/blog/2009/02/the-berkeley-synchrotron-brandeis-campus/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 16:15:04 +0000</pubDate>
		<dc:creator>harijay</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[crystal diffraction]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[nxclient]]></category>
		<category><![CDATA[synchrotron]]></category>
		<category><![CDATA[synchrotron-data]]></category>

		<guid isPermaLink="false">http://www.code-itch.com/blog/?p=93</guid>
		<description><![CDATA[I dont know why I feel so ecstatic at the thought of running an experiment remotely . Maybe its all the NASA TV I watched as a Graduate student or the several telemicroscopy talks I attended next door at the NCMI. This post is a little about the wonders of robotics and the great things [...]]]></description>
			<content:encoded><![CDATA[<p>I dont know why I feel so ecstatic at the thought of running an experiment remotely . Maybe its all the <a href="http://ncmi.bcm.tmc.edu/ncmi/">NASA TV</a> I watched as a Graduate student or the several telemicroscopy talks I attended next door at the <a href="http://ncmi.bcm.tmc.edu/ncmi/">NCMI</a>. This post is a little about the wonders of robotics and the great things engineers do that makes it possible for scientists to do better fundamental research and mostly about little pieces that fit together to enable good science.</p>
<p>Last week we test ran a remote data collection at the Berkeley synchrotron. Normally we would have flown all the way to Berkeley to then manually mount our crystals on the diffraction experiement setup and then spent 24 to 48 hours collecting diffraction data. This time however we shipped our dewar to the synchrotron , had the extremeley helpful beamline scientsists load our crystals which were stored in specially designed pucks onto the crystal mounting robot, after which we controlled the entire experiement remotely sitting in the comfort of our lab at Brandeis or even at home over the weekend.</p>
<p>The amazing part about the experience was the real-time nature of the control . In the video you will see us align a crystal by clicking a window on an <a href="http://www.code-itch.com/blog/2009/01/the-transformative-world-of-nxclient-and-freenx/">nxclient session</a> . The robot responds almost immediately to our click event. The video also shows the robot moving the dewar open and mounting crystals. Its quite something when you realize that the video is a screen capture of our nxclient session. So the video of the crystal moving during centering and the robot motions is all pushed through in near real time. </p>
<p>Now I am sure any network guru or video delivery specialist is saying , this technology has existed for a while, there is nothing magical about this. But somehow I think its nice to recognize technology such as this for its enabling power.  Just as I am amazed when I conduct a three way video conference with my family in three separate countries over ichat , I am even more amazed that I can seemlessly control an experiment all the way across the country from the comfort of my home .</p>
<p>( <a href="http://strucbio.biologie.uni-konstanz.de/ccp4wiki/index.php/Synchrotrons">The ccp4 wiki has a list of synchrotrons offering remote data collection services </a>)<br />
<object width="640" height="390" data="http://www.youtube.com/v/CBMb0yzskmU&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/CBMb0yzskmU&amp;hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.code-itch.com/blog/2009/02/the-berkeley-synchrotron-brandeis-campus/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using git for keeping track of crystallographic refinements</title>
		<link>http://www.code-itch.com/blog/2009/02/using-git-for-keeping-track-of-crystallographic-refinements/</link>
		<comments>http://www.code-itch.com/blog/2009/02/using-git-for-keeping-track-of-crystallographic-refinements/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 04:18:19 +0000</pubDate>
		<dc:creator>harijay</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[git ccp4i]]></category>
		<category><![CDATA[linkedin]]></category>

		<guid isPermaLink="false">http://www.code-itch.com/blog/?p=90</guid>
		<description><![CDATA[The protein crystallization grid project I am undertaking has  convinced me of the virtues of version control. Knowing I can revert back to an older version has ensured that I spend more time being adventurous , than being paranoid of going down the wrong track and not being able to trace my path back. On [...]]]></description>
			<content:encoded><![CDATA[<p>The protein crystallization grid project I am undertaking has  convinced me of the virtues of version control. Knowing I can revert back to an older version has ensured that I spend more time being adventurous , than being paranoid of going down the wrong track and not being able to trace my path back.</p>
<p><a href="http://www.c2cbio.com/2009/01/15/one-coast/">On Coast to Coast Bio , Atom and I</a> have often talked about the many ways people are using git : Blog posts , publication manuscripts and <a href="http://depth-first.com/articles/2009/01/23/github-for-chemistry-revision-controlled-datasets"> database entries to name a few</a>. Since crystallographic refinement occupies a significant portion of a crystallographers time , I decided to see how my personal git workflow would adapt to crystallographic refinement.</p>
<p>In crystallographic refinement , most of the routines are scripted using script files which typically manipulate binary data and asci coordinate  files ( the protein databank format) . Each step  spits out a new coordinate  file  and a text log file which serves as a record of that operation . For eg a partuclar refinement step that calls on the phenix refinement routine would be run as</p>
<p>&#8220;phenix.refine myinput.pdb mydata.mtz &gt; run1_myinput_mydata.log&#8221;</p>
<p>here the input pdb and output log are text files and the data is a binary formatted file ( the mtz format). When finished this analysis would output a pdb file whose name is often automatically &#8220;versionned&#8221;  by the program using a different name say &#8220;myinput_001.pdb&#8221; . Versionning is assured by keeping a series of input, output and pdb files all resident on the project directory. Retracing your path is easy if you knew which version you wanted to go back to based on a file name and say some scribbled notes in a Readme file or log file.</p>
<p>Now you would think this is indeed something that works. But imagine the case when you come back to your refinement directory a few weeks or months later. All you see is a directory full of tens of pdb files and log files and hopefully a single Readme file detailing all the steps along the way. This can be quite difficult to follow along with . Stepping back is posisble using an old model file . But once this is done i have to come up with a new naming system to understand the history of the refinement , or worse still rely on timestamps. Also and very importantly  stepping back to a previous step is only possible for files whose names have changed at every step when their contents changed .</p>
<p>After using git for just one project I am quite convinced that git has a lot to offer for crystallographic refinement. Git  allows me  to return my directory at any point of time to its state at an earlier commit . Say I used a series of refinement steps that generated tens of log files and then suddenly decided i was getting nowwhere. With the non-git setup,  i could revert to an earlier model file . But that still leaves tens of log files around cluttering up my work directory. In the git case checking out a previous snapshot returns my working directory to its  clutter free early stage without deleting a record of all my failed approaches.</p>
<p>Also during most refinements i tend to use similar sounding names for my model files. This can quickly get messy  . With git even if accidentally use the same name like myfinalmodel.pdb. I can always version this file without descriptive suffixes.  Importantly also git preserves the history of commits as commit trees . A flat directory heirachy does not achieve this as well as a commit history. Another big plus is that git allows me to work on multiple machines and merge my work between them.  Without this , i am left with moving files back and forth and making sure their content didnt change while keeping their names the same.</p>
<p>At the presnt moment I use the ccp4 and phenix guis as front ends extensively to manage my refinement &#8220;workflow&#8221; . In the case i am using git . Git sits on top of these files versionning things as they go along. If I had a few months of spare time ( yeah right) I would love to create a backend to ccp4i that builds in sha1 based versionning of all files handled by all the refinement  methods . Its quite nice to use git alongside and watch my commit trees to keep track of my refinement. I have just begun using git in this way and hope to have my screencasts detaling my git workflow soon.</p>
<p>I just realized I need to revert to my pdb files of two build sessions back , so its time to</p>
<p>&#8220;git checkout 3ac94e79552c11025d7bb01f9a98b7afc1637e60 myfinalpdb.pdb&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.code-itch.com/blog/2009/02/using-git-for-keeping-track-of-crystallographic-refinements/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My first object oriented code:A  set of python classes to create dispense lists for the Formulatrix liquid handler robot</title>
		<link>http://www.code-itch.com/blog/2009/01/my-first-object-oriented-codea-set-of-python-classes-to-create-dispense-lists-for-the-formulatrix-liquid-handler-robot/</link>
		<comments>http://www.code-itch.com/blog/2009/01/my-first-object-oriented-codea-set-of-python-classes-to-create-dispense-lists-for-the-formulatrix-liquid-handler-robot/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 23:38:39 +0000</pubDate>
		<dc:creator>harijay</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[crystallization screen dispense list]]></category>
		<category><![CDATA[formulatrix]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[git-hub]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[object oriented]]></category>

		<guid isPermaLink="false">http://www.code-itch.com/blog/?p=82</guid>
		<description><![CDATA[Over my few years writing scripts in Python or Perl ,  I always told myself that the next time I had to solve a problem I would make my code more object oriented and re-useable. Like an addict trying to break a habit , I always failed miserably. It was just too easy to just [...]]]></description>
			<content:encoded><![CDATA[<p>Over my few years writing scripts in Python or Perl ,  I always told myself that the next time I had to solve a problem I would make my code more object oriented and re-useable. Like an addict trying to break a habit , I always failed miserably. It was just too easy to just write one giant script to get the job done. <a href="http://codeitch.wordpress.com/2007/04/11/codeitch-or-the-desire-to-codeify-and-systematize-everything-i-do/">So much so that when I started writing this blog almost two years ago , I once again stated my desire to break this habit</a>. Also along these lines, I always felt I should be using some form of version control. Even for a script it made sense to be able to experiment with code and go back and forth on a source tree. But again I just did not have the time to do any of that!</p>
<p>I am quite happy to say that I have finally managed to write an object oriented set of python classes that create dispense lists for  a liquid handling robot . <a href="http://git-scm.com/">Also I went ahead and used git for version control all along the way. </a></p>
<p>The problem I was solving was fairly routine . I had to create an easy software routine to create dispense lists for the <a href="http://www.formulatrix.com/formulator.shtml">Formulatrix liquid handling robo</a>t in the lab. Each dispense list was a list of volumes of  the robot had to dispense to each well of a 96 well plate.</p>
<p>Crystal screens typically keep some components constant across a 96 well plate while varying some others systematically. Therefore the dispense list creator code had to deal with creating gradients of components along the two axes of the plate and also handle component staying constant . Regardless the <a href="http://github.com/harijay/protein-crystallization-gridmaker/blob/a4c1cb3a39359c9609693bdf5aa744ef836a5aa1/example1.dl.txt">final output</a> is a tab delimited set of volumes that the robot then uses to carry out the dispense. Imagine a 96 character array with volume for each well and one array for each component.</p>
<p>Like all object oriented approaches tell you , it helps to model the problem space appropriately. This involve defining all the actors in the problem you are trying to solve and writing appropriate classes. For me that was the hardest part. Object oriented analysis and design is Hard! But I persisted in the good faith that the object orientation would pay off , and  once I modeled my classes appropriately the code would just write itself .</p>
<p><a href="http://github.com/harijay/protein-crystallization-gridmaker/tree/master">As my code grew</a> . Adding new features became easier than it ever had been when I was writing  imperative linear scripts. Also thanks to some timely and excellent help from Michael Foord and Chris Lasher delivered over <a href="http://twitter.com/voidspace">twitter</a> and a <a href="http://igotgenes.blogspot.com/2009/01/class-attributes-and-scoping-in-python.html">blogpost</a> , I could use the object oriented nature of the code to quite some advantage . Incidentally Michael Foord  writes an excellent pythonic blog at <a href="http://www.voidspace.org.uk/python/weblog/index.shtml">voidspace</a>,is one of the main developers at <a href="http://www.resolversystems.com/about/developers.php">Resolver Systems</a> and the co-author of<a href="http://www.ironpythoninaction.com/"> IronPython in action</a> and <a href="http://biopython.org/wiki/Participants">Chris Lasher is on the Bio-python team</a> and an <a href="http://twitter.com/gotgenes">avid Bioinformatician</a> who I got introduced to thanks to <a href="http://www.mndoci.com/blog">Atom</a>.</p>
<p><a href="http://github.com/harijay/protein-crystallization-gridmaker/tree/master">The code that creates these dispense lists and the examples are posted on github </a>. Take a look and let me know how I did with the design aspect of my classes . The most exciting moments of writing object oriented code is when you realize that adding functionality comes so much easier than procedural code . I am thinking in terms of writing a GUI to wrap the functionality of the code in additon to a web app/form based CGI frontend. Any help and suggestions are welcome.</p>
<p>The icing on the cake was when the code actually worked and I now have a few custom screens with <a href="http://github.com/harijay/protein-crystallization-gridmaker/blob/a4c1cb3a39359c9609693bdf5aa744ef836a5aa1/example1.dl.txt">multiple gradients </a>hopefully growing giant membrane protein crystals.</p>
<p>Now onto writing some GUI code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.code-itch.com/blog/2009/01/my-first-object-oriented-codea-set-of-python-classes-to-create-dispense-lists-for-the-formulatrix-liquid-handler-robot/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
