Shiny Website for Primer Documentation
I am working in a relatively big molecular biology laboratory where sometimes the common stocks and orders documentation can be a hassle. Recently I ran into one of this problem and decided to change the way to maintain a documentation of our oligonucleotide storage.
Since we keep track every single ordered oligonucleotide this laboratory ordered, now there are more then 10.000 records. Until now they deployed to a shared Excel file on a common server. There was several problem with this method, let me highlight a few:
- You have to manually add the unique identifier for the tube (a number, indicating the location to be stored). It resulted duplicated, skipped and even mistyped IDs.
- You have to write the sequence manually or with Copy-Paste.
- You can write any silly abbreviation for your name. Also can cause unidentifiable authors or authors with several types of entry names.
- If someone left it open on their machine, others cannot edit until it is not closed.
- Difficult to run BLAST. If a lab already has 10.000+ primers, sometimes you just look up what you need instead of ordering new ones. BLAST can do this job, but it is not so convenient to update a local BLAST database from excel every time someone deploy some new records (a few times a day).
- It is Excel.
- Again. It is Excel. Anyone easily could delete a few lines or even the whole document. No authorized access for any type of editing.
Considering these, I decided to create a Shiny webpage on our local server to automatically maintain and protect this database with some extra function and a highly user-friendly interface. I also would be able to distribute a backbone from this site on github if anyone has similar problems or just wants to use. Since this is a bigger project to put in one post and also some part is highly personalized to our laboratory, I will cover only some important parts, like some specific plotting and data processing, how to build up a shiny app within several posts.
The basic ideas behind the webpage
I want an interface where people can deploy primers even by manually or uploading a file (which is usually provided by the company we order from). This also should auto generate the unique IDs for the tubes.
Ability to build a BLAST database from the database (probably through a
.fastafile). This also should be triggered every time when new records are submitted (e.g. by button press or by monitoring the database time stamp).
Ability to access the server’s BLAST engine from R/Shiny and to process the output in real time.
A view window for browsing among existing primers.
Following up on availability of the primer. If someone finished a tube, make it possible to indicate it with also a possible reordering option and connecting the unique IDs.
Overcome all of the cons mentioned above.
Here is a diagram (created with the DiagrammeR package) about the core ideas:
- Create new primers using Primer3 (and BLAST) in-app. For this, we have to manipulate the UNIX command line application from R. Luckily it is not so difficult.
Extending this possibility we can even search for gRNAs for our CRISPR experiments with non-model genomes we work with. And also just for keep everything nicely in one place.
In the next post I would like to show how to recreate an interactive graphical output from a BLAST search result, similar as you can see on the BLAST website after performing a search.