From d91655c10ac21428dc0ed6514fd12ba6484cfcd3 Mon Sep 17 00:00:00 2001 From: dchakro <35454738+dchakro@users.noreply.github.com> Date: Thu, 6 May 2021 11:59:13 +0300 Subject: [PATCH] add instructions --- PCR_formula.R | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/PCR_formula.R b/PCR_formula.R index cfa4b31..0dbd415 100644 --- a/PCR_formula.R +++ b/PCR_formula.R @@ -1,7 +1,18 @@ +#### DESCRIPTION: # These functions use the PCR equation to calculate # the number of PCR products after N cycles starting # from x molecules of the template. + +#### HOW TO USE: +# source('https://github.com/dchakro/shared_Rscripts/raw/master/PCR_formula.R') +# prettyNum(PCRamp(1,30),big.mark = " ") +# +# print(paste("Cycle",1:30,"=", +# prettyNum(PCRamp.steps(1,30), +# big.mark = " ")), +# width = 40) + PCRamp = function(x, n){ # calculates number of amplicons starting from x initial DNA molecules in n cycles. x*((2^n)-2*n)