Team:Heidelberg/Templates/NRPS-W-15b

From 2013.igem.org

Database redesign

Working with Django models rather than MySQL tables made it a lot easier to get a better grasp of the structure of our database and possible shortcomings. In particular, we noticed that our original idea of an "Origin" representing a large DNA sequence was problematic, as it would life a lot harder in regards to automated prediction: For example, coding sequences would have to be extracted out of the DNA sequence using a tool like Glimmer or by running through all 6 reading frames as Pfam does. Also it was not immediately obvious how big a DNA sequence in the database could or should be (for example, a biosynthetic cluster for NRPS might be split into two or more "Origins" depending on who added the entries).

Thus, we decided to change the models (which was very easy with Django) as follows: The "Origin" table now represented an actual source of DNA, out of which a domain could be amplified by PCR, such as a particular species or a biobrick. The DNA sequence were now saved in the new "Cds" (Coding sequence) table. The foreign key of the domain table entries also pointed at "Cds" entries rather than "Origins".

PFAM integration

Having learned a lot about one of the core concepts of Django, namely the models, we also started experimenting with the views and template systems, which basically are responsible for the rendering of the actual web pages. Thus, we tried to integrate the Pfam scripts we had previously written into Django views. Pfam actually includes a very nice help page (with gems such as: " IE, being IE, needs extra help [..] ")for its [http://pfam.sanger.ac.uk/help#tabview=tab9 domain graphics], which basically beautifully render JSON documents using Prototype.js and other JS libraries. The JSON representation of the different domains is also calculated by the Pfam server after the domain prediction. Therefore, we adapted the original Pfam script in order to actually extract this JSON file and then it was passed on to the Pfam domain graphics javascript. This had to be done asynchronously (user enters DNA sequence, presses button, then the sequence is passed to the server, the Django function which queries Pfam API is executed and finally the Pfam JSON File is returned to the user's browser). Here, the extensibility of Django via reusable apps came in handy, because the [http://www.dajaxproject.com/dajaxice/ Dajaxice] app made the AJAX requests a matter of a few lines of code.

Database entries

In order to fill the database with the standard monomers, the L- and D-conformation of the 20 proteinogenic amino acids, as well as those of ornithine were taken from pubchem and entered into the database via the standard admin page. To allow for displaying the structures in the user interface the 3D-SDF formatted text files were also copied to the database.