qpxu007
July 17, 2015
DNA consists of four type of bases (A, T, C and G). Here, we will develop a R server for generating random DNA sequences. We will generate a single strand DNA of length n with a desired base composition (i.e. percentage of pA, pT, pC, pG are given by the user).
We first use a uniform random number generator (runif) to generate a vector r of length n, then, for each r[i] value, we assign A, T, C, G the following scheme:
We calculate the basic melting temperature Tm for each sequence.
We developed and tested the functions (dnaseq, calTm, printDNA etc) in R first. The shiny UI app was then built on top these functions.
dna<-dnaseq(20)
printDNA(dna)
[1] "AGATCTAAGATTACCAGGCC"
print(calTm(dna))
[1] 49.73
plotDNA(dnaseq(200,pcg=90))
plotDNA(dnaseq(1000))
The application is deployed to shinyapps.io.
User can use it to generate random DNA sequences, and explore the Tm changes with regard to GC content and length.