I use a software for my research to do protein-protein docking, its called HADDOCK. It is the best and a state of art software available for the job but for some reason its output files do not come in the way I want or the way it should be. And every time I used that software I had to process the output files manually using a text editor. So being a Computational Biologist and following the rule that anything which is to be done more than three time should be automated, I decided to write a script to automate the process.
As a human tendency I thought that its a big task and I should think of a very clever way to do it and for that I would probably have to write a big and complex script. I searched for the pre written Perl modules which I could use and started thinking in all complex ways to achieve it, but nothing seems to work. I started having thoughts that is it really worth to spend so much time and write a really complex script, why can’t I keep processing them manually.
Well I finally decided to write the script and fired my Perl IDE, which is Padre BTW. I tried a Perl module which made my task more complicated, most of the time when you use somebodies else’s written module you don’t know what is exactly happening at the background, you just have to trust the author. Then I thought I should just write the script as simple as possible and in the steps which I understand. And honestly speaking when I finished the script it was only worth of 10 lines and a simple regular expression.
I realized that many a time (actually most of the times) we over complicate the situation which can be solved with very simple and mind full steps.
PS: What HADDOCK doesn’t do is that it does not add the HETATM flag to the ligand residues instead it flags everything with ATOM flag. Which is fine for many of the purposes but if you visualize the complex in PyMol and switch on the surface view then the whole protein along with the ligand are shown as surface. And what I wanted was the protein should go to surface view and not the ligand. So I wrote the script which ask for the input file name and the ligand name and converts the ATOM flag into the HETATM flag for those atoms. I will share the script soon on my script page.