DegeneratePrimerTools (DPT) comes with facilities to design degenerate primers against target sequences. The initial workflow involved a user within R walking through the process of generating a multiple sequence alignment, running the primer-design software and picking primers that correspond to the most conserved portions of the target sequences. However, if we assume a few default parameters will be used we can simply run the entire pipeline and display the output. We can do this using Shiny framework.
This section deals with how to use and interpret the DPT shiny app. To see how to get the app up and running see the Configuring the App
section below.
DPT requires an input fasta. The shiny version of DPT requires that you specify the fasta input. This fasta will be uploaded and processed and the resulting MSA and primers will be displayed. In addition to the fasta file you are also presented with the following options, each of which can be changed:
The output from the DPT shiny app will look like the following image. This containing three primary features:
The output from the DPT shiny app will degenerate primers across a range of degeneracies at the most conserved regions of the alignment. You must now use this information to generate primer-pairs. There are a few factors we typically consider when designing primers:
G
or C
at the 3' position is preferred due to stabilizing effect of the extra base-pair at this position.Once you have looked at the output you should be well on your way to designing primer pairs. The output will
# install DPT library(DegeneratePrimerTools) # run shiny from the file shiny::runGitHub("esnapd/DegeneratePrimerTools", subdir = "shiny") # or run locally if in the DPT project directory shiny::runApp(appDir = "shiny")
Rstudio provides the shiny-server as a means of running/distributing shiny-apps. DPT can effectively be used this way on a local cluster. To setup shiny-server it is best to peruse the docs. To setup DPT there are a few considerations - most notably that the sequence alignment steps will require write access to the directory in which the shiny app is run. This means that the default setup will not work and you must configure the DPT shiny app to run as a local user. This is the config file that we use:
```{bash, eval=FALSE}
server { listen 3838;
# note we run as the home user and set the user_dirs
location / {
run_as :HOME_USER:;
user_dirs;
}
}
To setup your local apps you would use the following app and log structure. Note how the app structure will map to the URL.
└── zachcp └── ShinyApps ├── log │ └── primerdesign-zcharlop-20161122-152237-39540.log └── primerdesign └── app.R
To update the shiny-server app you need to replace your app.R file and restart shiny-server:
sudo systemctl status shiny-server
sudo stop shiny-server ```
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.