Wednesday, July 2, 2008

Getting started with GenePython...

Before using GenePython, you should install the latest, stable version of Python (www.python.org/download) which currently happens to be version 2.5.2 (do not download any other version) on your computer. Just run the installer and... thats it! You are now ready to use Python. Check out the help and tutorial files for a detailed introduction to the language... or just read on!

Python is an object-oriented scripting language and as soon as you enter a command the Python interpreter responds. The term ‘object’ refers to an entity that not only contains data, but also contains instructions (called methods or functions) on how to manipulate that data. The word ‘class’ essentially refers to the ‘type’ of the object or, for those with a more philosophical bent of mind, the abstract qualities that define an object!. Let me give a real world analogy to make things clearer… your shiny new car, assuming you are very lucky to own one, is an object of class ‘Ferrari’, or maybe class ‘BMW’ or maybe even class ‘Fiat’.

All car objects present you, the driver, with interfaces to manipulate them in a specific way. The steering-wheel, brake pedal and door-handle are some such interfaces that offer a simple way of doing pretty complicated things. For instance, if you turn the steering wheel to the right, the car turns (oddly enough) to the right! Unbeknownst to you, turning the steering wheel right actually ends up turning a shaft with a geared end, which, in turn, displaces a ratchet which in turn moves another thing, and another…., that finally turns the wheels which in turn transmit the frictional forces between them and the road to the rest of the car that ends up turning (like I said, oddly enough!). The great part about being a driver is that you never needed to know all this! You just turn the wheel and the car turns… simple! As in the real world, well-designed objects in the programming world offer a simple and easy to use interface to ‘drivers’ so that they can get on with their driving.

You may have noticed that regardless of the classes of car, there are a set of common interfaces with brake-pedal, steering-wheel etc. One can imagine that each particular class of car has ‘inherited’ some of its common properties from a parent class… class ‘Car’! So, in object-oriented programming, if one intends to create a lot of classes which have common properties, all one need do is creating one ‘parent’ class which encapsulates all those common properties. Then one just creates different classes, each inheriting these common properties from the parent class! This saves you a whole lot of typing and helps you organize your thoughts and you’re coding. Of course, one can tweak the properties of each different daughter class as required. For instance, all cars have steering-wheels, but some have power steering while others don’t.

Python offers a set of standard classes so that programmers might while away their time productively. These classes are used to store and manipulate commonly required data types such as numbers, strings of characters, ordered lists of stuff etc. So for instance, in Python, the number ‘5’ is an object of type ‘int’ (integer), the word ‘five’ is an object of type ‘str’ (string of characters) and one could, if one wished, create a ‘list’ object in which the first element could be ‘5’, second element ‘five’ and so on. Most useful code consists of creating ‘variables’ of these classes that change their values according to your rules.

GenePython offers an additional set of classes that drive biologists, bioinformaticians or anyone interested to make sense out of biological information such as sequences or strings. In this context, the concept of inheritance is used extensively in GenePython. For instance, classes representing information-holding sequences like DNA, RNA and protein, inherit from the parent class ‘Sequence’ that holds all the common properties that one would like any information-holding sequence to have, something we’ll deal with the next time.

Labels: , , ,

Monday, June 16, 2008

GenePython - What’s the Big Idea?

GenePython is exactly what its name suggests! It is the use of Python (www.python.org), a popular and simple, open-source programming language to simulate gene expression in silico. Python has a way to depict real objects in what Pythonspeak is called ‘classes’. Classes can also be formed from other classes thereby inheriting their properties and behavior.

GenePython uses Python classes to depict molecular objects and define their behavior. This allows the flexibility of not just exploring the behavior of a mixture of different objects in-silico but also redefining the response of individual objects to different stimuli.

So in GenePython we have a class defining a sequence, for instance a genome comprising of either DNA or RNA. Similarly, sequences involved in the central dogma of molecular biology as well as the adjunct can all be represented using the class ‘Sequence’ or classes that inherit from class Sequence.

This architecture allows GenePython to facilitate the rapid construction of a virtual cell capable of simulating processes within and similar to the central dogma. This means that it can be used to rapidly create and explore in silico gene expression, understand bio-molecules that can be derived, classify them, create metabolic networks and systems and even design a-life.

In our next blog, we will look at how class ‘Sequence’ works. We’ll get you to use this class and explore the different behavioral patterns possible with the class. Those of you who are new to Python need not fear… we’ll run you through the code in Englishspeak and guide you through installing Python on your computer.

Labels: , , , , , ,

Saturday, May 17, 2008

About Gene Python...

After thirty years of the central dogma we are now in an age where we can create an in silico cell and simulate the whole of the central dogma!

Ever wanted to do gene engineering and thought it took weeks? Ever wanted to figure out gene expression and found the painful wet labs to drive you nuts? Ever wondered what peptides could be generated from a molecule of mRNA? Or just plain wanted to have fun putting together genomes and having them generate peptides and proteins? Wanted to create an automatic gene annotater?

What fun it would be if we could assign a gene to a computer variable and simply let the computer behave as if it were the central dogma and generate the RNA molecules and convert those with reading frames into peptides! If only we could explore the wonders of nature in minutes and map the proteins or peptides to known ones from published databases! What if we could use such designs to genetically re-engineer real genes in organisms?

GenePython initiates a journey to make this exploration fun. It is the result of intense dialogue on the central dogma and an effort to create genetic objects in python over a few weeks in November and December of 2007.

This blog and this site are our effort to get you to join the fun and come and build a virtual cell together with us. Over the next blogs we will expose the code of genetic objects to help you understand and begin use of these objects as building blocks of the cell.

Labels: , , , , , , ,