Skip to content

Commit 2016f40

Browse files
Stefan Roedigergaborcsardi
Stefan Roediger
authored andcommitted
version 0.0.6
1 parent e9a9c8a commit 2016f40

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1544
-429
lines changed

CHANGELOG

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Changes from Version 0.0.5 to 0.0.6 [April 24 2013]
2+
3+
* several bug fixes
4+
* imporved some examples
5+
* minor code improvements
6+
* new data sets added

DESCRIPTION

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
Package: chipPCR
22
Type: Package
33
Title: Toolkit of helper functions to pre-process amplification data
4-
Version: 0.0.5
5-
Date: 2013-12-12
4+
Version: 0.0.6
5+
LazyData: true
6+
Date: 2014-04-24
67
Author: Stefan Roediger, Michal Burdukiewicz
78
Maintainer: Stefan Roediger <[email protected]>
89
Description: The chipPCR package is a toolkit of helper functions to pre-process amplification data. Amplification data can be obtained from classical PCR reactions or isothermal amplification reactions. The package contains functions to normalize amplification, a simple routine to detect the start of an amplification reaction and several smoothers for amplification data. The smoothers are based on LOWESS, moving average, cubic splines, Savitzky-Golay and others. In addition contains the chipPCR package data sets of experimental nucleic acid amplification systems including the VideoScan HCU and a capillary convective PCR system. The amplification data were generated by helicase dependent amplification (HDA) or polymerase chain reaction (PCR) under various temperature conditions. As detection system intercalating dyes (EvaGreen, SYBR Green) and hydrolysis probes (TaqMan) were used.
910
License: GPL-3
10-
Depends: R (>= 3.0.0)
11+
Depends: R (>= 3.0.0), qpcR (>= 1.3.0)
12+
Suggests: MBmca (>= 0.0.2)
1113
Imports: outliers, robustbase, signal
12-
Packaged: 2013-12-12 00:06:52 UTC; tux
14+
Packaged: 2014-04-24 11:23:00 UTC; tux
1315
NeedsCompilation: no
1416
Repository: CRAN
15-
Date/Publication: 2013-12-12 01:51:15
17+
Date/Publication: 2014-04-24 15:23:52

MD5

+59-31
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,59 @@
1-
7ab4be42f4d233372486a08b0e028022 *DESCRIPTION
2-
7a453ef7c5fba461266aa85da8d6e490 *NAMESPACE
3-
f06e0088f3c41c1cdee7619007959a1b *R/AmpSim.R
4-
2e91c8c20a399aca17637262e5550bc4 *R/CPP.R
5-
0b6ff8b890a7644e6670b445a5df023e *R/amptester.R
6-
840b9ceae7c7cda93c938622502cf886 *R/bg.max.R
7-
64cb14312725e2061cafd2573ae0ff78 *R/fixNA.R
8-
48277db719799de75a95d4b3afc7e7ab *R/inder.R
9-
de152f1b19b18924a23990dcafe71a2b *R/smoother.R
10-
72eca35c15566482e618134655ddd924 *data/C17.rda
11-
79abe393b0157ca65f86beb870ef9df2 *data/C67.rda
12-
5b986750f739d0e0a938f987a36533c4 *data/C81.rda
13-
00e4acde558e5b4b28818d5175ed23ab *data/C85.rda
14-
38fe7bef8cb83d72a25ae7a5f39d65dd *data/CD74.rda
15-
3516637acd2d5d734a80c2e5135eed87 *data/CD75.rda
16-
41869d6cf623e42d09299f4d16c185f4 *data/capillaryPCR.rda
17-
78e256d0ba9658322c9e705b0ef8aa39 *man/AmpSim.Rd
18-
e1fe4c7413bfc3717c743414cec69a81 *man/C17.Rd
19-
4a00cf13fe2ab76dee2b1a3ee4044086 *man/C67.Rd
20-
8f021eb138410960272055bc70520d16 *man/C81.Rd
21-
03411a90f8acfb3685c154e5c588208d *man/C85.Rd
22-
8d283206b9ec9af9474b091cc6a5d089 *man/CD74.Rd
23-
6f1b5f77305cfe75c9a23f3fe7c28cac *man/CD75.Rd
24-
ae0fc1b82e12c81ac12f3f11f25cb7bd *man/CPP.Rd
25-
42c4a62d3bbdb3ae52ac2b4547efae0e *man/amptester.Rd
26-
963a02bd27fa5236cc6814cc7fd1a7db *man/bg.max.Rd
27-
4323328a5a76e2e5bd823d77321b51a3 *man/capillaryPCR.Rd
28-
a20e946e63193f65af1dc8c08ed02e17 *man/chipPCR-package.Rd
29-
26e313adc405443bde48e5864ac81558 *man/fixNA.Rd
30-
29ee1848c78d2f5a18575f91e0ea30c4 *man/inder.Rd
31-
a0f9ef74a78059e0981677e77626520c *man/smoother.Rd
1+
18044aa6ba7de8a2701985bcaa9c4ac5 *CHANGELOG
2+
c74fc62bd8b82e0cb22864dfee88cef9 *DESCRIPTION
3+
d30ad206d5a7ac682fa5c05964b845fd *NAMESPACE
4+
30a54d0a17a498992b23b042e7d7054f *R/AmpSim.R
5+
ada1a25273687a6afa127a0813e6a2d9 *R/CPP.R
6+
61f6bca3d37af47a2bce9dd76a935d63 *R/amptester.R
7+
abf56dfd781b9896b8b51ebceed08b11 *R/bg.max.R
8+
b200a3ce9a3ef16eadbee8c831c04323 *R/fixNA.R
9+
5f0c61433208b580f47e4a089d29497f *R/inder.R
10+
3acc1d83dab39c173ab559369dc24b3b *R/smoother.R
11+
dd155931d02566b7ff1f287c069d5526 *data/C126EG595.rda
12+
c6ed6d74b7d1411c92426c78412645ef *data/C126EG685.rda
13+
ee918e4edf4a48e199d600240a68f7d9 *data/C127EGHP.rda
14+
d2fcd0367c9422a52285d2a4f3200c0e *data/C17.rda
15+
3ea1cf91968fc09e4e966379440fa0b9 *data/C67.rda
16+
cce9f8dc6fcf0ee80db46ee20276bc56 *data/C81.rda
17+
e859396f6f466346297fd65531ee46f1 *data/C85.rda
18+
204735ae97158e45abcc9cc919fb3260 *data/CD74.rda
19+
1460a6d99e93598450e0e31126f30061 *data/CD75.rda
20+
7acdb0265abfdb06107dfe6596fdaa24 *data/Eff1000.rda
21+
8b2809495799686eb2f3279a07f19562 *data/Eff625.rda
22+
6c9897281ad7d7a401b08b332627e29b *data/Eff750.rda
23+
ef29a453b4ef6cf23fd3a82d367e2119 *data/Eff875.rda
24+
d3fb2edaba440b506c39098e4397e318 *data/VIMCFX96_60.rda
25+
0dcd40442387023632389e39fc27ab5c *data/VIMCFX96_69.rda
26+
6875a45479fd66dc484811933ca6b312 *data/VIMCFX96_meltcurve.rda
27+
cecf00fcd2a95b6ba39bdf3d08879a42 *data/VIMiQ5_595.rda
28+
5cb1f7783d159404e61dd0c12c49d35c *data/VIMiQ5_685.rda
29+
0ee650a3801d02a362c7278e7642f055 *data/VIMiQ5_melt.rda
30+
5491bba3c2fe32f39d67fac51c57da85 *data/capillaryPCR.rda
31+
eeb251b339640de344445024473a83cc *data/datalist
32+
cbe04aa42d2f3bb8b79d7968564cf33a *man/AmpSim.Rd
33+
3b1f417bd0c09d0b026eda7f430fa0ce *man/C126EG595.Rd
34+
4b84f63b33378e815b66862b063a68d7 *man/C126EG685.Rd
35+
1668d692aeb91ccfbdc869165cb1536f *man/C127EGHP.Rd
36+
351b85e55000eb7b9085240593cb0db7 *man/C17.Rd
37+
23ac8d51645ec7caca8756d0d0c6adff *man/C67.Rd
38+
beda2b3f389308d31112add913c7ce87 *man/C81.Rd
39+
67902ec83a3319c06f782b9a43dfffcd *man/C85.Rd
40+
c5b58b89bb654696b43ee69ffa7d2d34 *man/CD74.Rd
41+
d7f2c55cad5a0b5354bd8f5ca5ad3528 *man/CD75.Rd
42+
e32afa21d141beea39b20ded5eaa0ee0 *man/CPP.Rd
43+
ec625497c14b1eb8843b0fd3339b90a5 *man/Eff1000.Rd
44+
be00e37d1db9cc5d0502ed2fd786b03c *man/Eff625.Rd
45+
8cc1d7e81c2ced860d030ba583f66bd8 *man/Eff750.Rd
46+
bdca558ced9cc17900e254e7f605d803 *man/Eff875.Rd
47+
153704858cf460cda1f0b5afc06b2a64 *man/VIMCFX96_60.Rd
48+
c5e02dcefb7ebf9885f90a3ac64bac32 *man/VIMCFX96_69.Rd
49+
17ab2603855e3f975d8d92f5c83ec745 *man/VIMCFX96_meltcurve.Rd
50+
cabf7fe049b6f83d845ff564139ac6ad *man/VIMiQ5_595.Rd
51+
0417a9f9221f58a6600bdaa4170435c5 *man/VIMiQ5_685.Rd
52+
9acb159220371ffc1c87f353d8af48d1 *man/VIMiQ5_melt.Rd
53+
88a92b3febfc42abe2807d5cd1b3d58b *man/amptester.Rd
54+
c1330b042e860b0b8f042d135d0c3d53 *man/bg.max.Rd
55+
5d49f939e1d70da31dcf9316374ace7b *man/capillaryPCR.Rd
56+
28cc7bd274cc3c1282d4fece0a897206 *man/chipPCR-package.Rd
57+
475d2265e2806e38b9ffa5ddae04a404 *man/fixNA.Rd
58+
3167cba3ea91bbaa714bc5c73b015f6d *man/inder.Rd
59+
b1bbbc9f56a7e49a0dd80e0c0fa2cce3 *man/smoother.Rd

NAMESPACE

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
importFrom(outliers, rm.outlier)
22
importFrom(robustbase, lmrob)
33
importFrom(signal, sgolayfilt)
4+
importFrom(qpcR, Cy0)
45

56
export(
67
"AmpSim",

R/AmpSim.R

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ AmpSim <- function(cyc = c(1:35), b.eff = -25, bl = 0.05, ampl = 1,
22
Cq = 20, noise = FALSE, nnl = 0.025,
33
nnl.method = "constant")
44
{
5-
tmp_warn <- getOption("warn")
5+
tmp.warn <- getOption("warn")
66
options(warn = -1)
77
# Test if x and y exist and have identical lengths.
88
if (is.null(cyc))
@@ -11,6 +11,7 @@ AmpSim <- function(cyc = c(1:35), b.eff = -25, bl = 0.05, ampl = 1,
1111
stop("nnl must be within 0 and 0.1.")
1212

1313
fluo <- bl + (ampl - bl)/(1 + exp(b.eff * (log(cyc) - log(Cq))))
14+
1415
if (noise) {
1516
mean.noise <- mean(fluo) * nnl
1617
sd.noise <- sd(fluo) * nnl
@@ -30,8 +31,8 @@ AmpSim <- function(cyc = c(1:35), b.eff = -25, bl = 0.05, ampl = 1,
3031
sd = sd.noise)
3132
}
3233
fluo <- fluo + NOISE
33-
res <- cbind(cyc, fluo)
34-
} else (res <- cbind(cyc, fluo))
35-
options(warn = tmp_warn)
34+
res <- data.frame(cyc, fluo)
35+
} else (res <- data.frame(cyc, fluo))
36+
options(warn = tmp.warn)
3637
res
3738
}

R/CPP.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
CPP <-
22
function(x, y, trans = TRUE, bg.outliers = FALSE, median = FALSE, minmax = FALSE, qnL = 0.1,
33
amptest = FALSE, manual = FALSE, nl = NULL) {
4-
tmp_warn <- getOption("warn")
4+
tmp.warn <- getOption("warn")
55
options(warn = -1)
66
# Test if x and y exist and have identical lengths.
77
if (is.null(x))
@@ -44,6 +44,6 @@ function(x, y, trans = TRUE, bg.outliers = FALSE, median = FALSE, minmax = FALSE
4444
if (amptest) {
4545
amptester(y.norm, manual = manual, background = BG, noiselevel = nl)
4646
}
47-
options(warn = tmp_warn)
47+
options(warn = tmp.warn)
4848
return(list(y.norm = y.norm, BG = BG))
4949
}

R/amptester.R

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
amptester <-
22
function (y, manual = FALSE, noiselevel = 0.08, background = NULL) {
3-
tmp_warn <- getOption("warn")
3+
tmp.warn <- getOption("warn")
44
options(warn = -1)
55
# Test if y exist.
66
if (is.null(y))
@@ -14,7 +14,7 @@ function (y, manual = FALSE, noiselevel = 0.08, background = NULL) {
1414

1515
background <- as.integer(sort(background))
1616

17-
y <- fixNA(1:length(y), y)
17+
y <- fixNA(1L:length(y), y)
1818

1919
if (manual) {
2020
noisebackground <- mean(y[background]) + 5 * sd(y[background])
@@ -28,6 +28,6 @@ function (y, manual = FALSE, noiselevel = 0.08, background = NULL) {
2828
print("negative")
2929
} else print("positive")
3030
)
31-
options(warn = tmp_warn)
31+
options(warn = tmp.warn)
3232
y
3333
}

R/bg.max.R

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
bg.max <-
22
function (x, y, bg.corr = 1.3, bg.start = 3, verbose = FALSE) {
3-
tmp_warn <- getOption("warn")
3+
tmp.warn <- getOption("warn")
44
options(warn = -1)
55
# Test if x and y exist and have identical lengths.
66
if (is.null(x))
77
stop("Enter abscissa value")
8+
89
if (is.null(y))
910
stop("Enter ordinate value")
11+
1012
if (length(x) != length(y))
1113
stop("Use abscissa and ordinate data with same number of elements")
14+
1215
# Test if bg.corr is within a meaningful range.
1316
if (bg.corr < 1 || bg.corr > 8)
1417
stop("bg.corr must be within 1 and 8.")
15-
# Test if bg.corr is within a meaningful range.
18+
19+
# Test if bg.corr is within a meaningful range.
1620
if (bg.start < 0 || bg.start > length(x))
1721
stop("bg.start must be within 0 and the number of x values.")
1822

@@ -21,15 +25,16 @@ function (x, y, bg.corr = 1.3, bg.start = 3, verbose = FALSE) {
2125
yval.d <- supsmu(x, y, span = 0.09)$y
2226
delta <- vector()
2327
deltax <- vector()
24-
for (i in 1:(length(yval.d) - 1)) {
28+
for (i in 1L:(length(yval.d) - 1)) {
2529
delta.t <- yval.d[i+1] - yval.d[i]
2630
delta <- c(delta, delta.t)
2731
delta.tx <- (x[i+1] + x[i]) / 2
2832
deltax <- c(deltax, delta.tx)
2933
}
34+
3035
delta1 <- vector()
3136
deltax1 <- vector()
32-
for (i in 1:(length(delta) - 1)) {
37+
for (i in 1L:(length(delta) - 1)) {
3338
delta.t <- delta[i + 1] - delta[i]
3439
delta1 <- c(delta1, delta.t)
3540
delta.tx <- (deltax[i + 1] + deltax[i]) / 2
@@ -60,7 +65,7 @@ function (x, y, bg.corr = 1.3, bg.start = 3, verbose = FALSE) {
6065
# Test if background range is meaningful.
6166
if (bg.stop <= bg.start)
6267
stop("Start of background must be less than maximal background value.")
63-
options(warn = tmp_warn)
68+
options(warn = tmp.warn)
6469
if (verbose) {
6570
return(list(d = d, d1 = d1, delta = delta, delta1 = delta1, bg.start = bg.start,
6671
bg.stop = bg.stop, bg.corr = bg.corr, fluo = fluo, amp.stop = amp.stop))

R/fixNA.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
fixNA <- function(x, y, spline = TRUE, verbose = FALSE)
22
{
3-
tmp_warn <- getOption("warn")
3+
tmp.warn <- getOption("warn")
44
options(warn = -1)
55
# Test if x and y exist and have identical lengths.
66
if (is.null(x))
@@ -22,6 +22,6 @@ fixNA <- function(x, y, spline = TRUE, verbose = FALSE)
2222
} else {
2323
y[which(is.na(y))] <- 0
2424
}
25-
options(warn = tmp_warn)
25+
options(warn = tmp.warn)
2626
if (length(which(is.na(y) == TRUE)) == 0) y <- y
2727
}

R/inder.R

+10-2
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,24 @@ sec_endpoint0 <- function(y, h)
4040
sec_beginpoint0(rev(y), h)
4141

4242

43-
inder <- function(x, y, Nip = 4) {
43+
inder <- function(x, y, Nip = 4, logy = FALSE) {
4444

4545
if (length(x) != length(y))
4646
stop("Use x and y vectors with same number of elements")
4747

48+
if (Nip < 1)
49+
stop("Use Nip equal or larger to 1")
50+
51+
if (Nip > 10)
52+
warning("Nip larger than 10 may case over-fitting")
53+
4854
tmp.xy <- spline(x, y, n = Nip * length(x))
4955

5056
x <- tmp.xy[["x"]]
5157
y <- tmp.xy[["y"]]
5258

59+
if (logy == TRUE) y <- log10(tmp.xy[["y"]])
60+
5361
#calculate h, naive approach
5462
h <- vapply(2L:length(x), function(i) x[i] - x[i - 1], 0)
5563
#instead of zero, in statement should be the minina
@@ -75,6 +83,6 @@ inder <- function(x, y, Nip = 4) {
7583
SDC <- sqrt(SDM * SDm)
7684

7785
list("x" = x, "y" = y, "1st_der" = first_der, "2nd_der" = sec_der, "SDM" = SDM, "SDm" = SDm,
78-
"SDC" = SDC, "FDM" = FDM)
86+
"SDC" = SDC, "FDM" = FDM, "h" = h)
7987
}
8088

R/smoother.R

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
smoother <-
22
function (x, y, trans = FALSE, bg.outliers = FALSE, spline = TRUE, method = "savgol", ...) {
3-
tmp_warn <- getOption("warn")
3+
tmp.warn <- getOption("warn")
44
options(warn = -1)
55
# Test if x and y exist and have identical lengths.
66
if (is.null(x))
@@ -12,7 +12,7 @@ smoother <-
1212

1313
# Determine the time/cycle resolution of the data
1414
deltaCyc <- vector()
15-
for (i in 1:(length(x) - 1)){
15+
for (i in 1L:(length(x) - 1)){
1616
tmp <- abs(x[i] - x[i + 1])
1717
deltaCyc <- c(deltaCyc,tmp)
1818
}
@@ -73,7 +73,7 @@ smoother <-
7373
)
7474

7575
tmp.CPP <- CPP(x = x, y = y.tmp, trans = trans, bg.outliers = bg.outliers)
76-
options(warn = tmp_warn)
76+
options(warn = tmp.warn)
7777
y.norm <- tmp.CPP$y.norm
7878
attr(y.norm, "method") <- method
7979
y.norm

data/C126EG595.rda

25.5 KB
Binary file not shown.

data/C126EG685.rda

25.4 KB
Binary file not shown.

data/C127EGHP.rda

9.53 KB
Binary file not shown.

data/C17.rda

2 Bytes
Binary file not shown.

data/C67.rda

-2 Bytes
Binary file not shown.

data/C81.rda

1 Byte
Binary file not shown.

data/C85.rda

0 Bytes
Binary file not shown.

data/CD74.rda

0 Bytes
Binary file not shown.

data/CD75.rda

1 Byte
Binary file not shown.

data/Eff1000.rda

271 KB
Binary file not shown.

data/Eff625.rda

266 KB
Binary file not shown.

data/Eff750.rda

265 KB
Binary file not shown.

data/Eff875.rda

266 KB
Binary file not shown.

data/VIMCFX96_60.rda

10.3 KB
Binary file not shown.

data/VIMCFX96_69.rda

9.7 KB
Binary file not shown.

data/VIMCFX96_meltcurve.rda

20.2 KB
Binary file not shown.

data/VIMiQ5_595.rda

29 KB
Binary file not shown.

data/VIMiQ5_685.rda

25.6 KB
Binary file not shown.

data/VIMiQ5_melt.rda

52.1 KB
Binary file not shown.

data/capillaryPCR.rda

-8.49 KB
Binary file not shown.

data/datalist

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
C126EG595
2+
C126EG685
3+
C127EGHP
4+
C17
5+
C67
6+
C81
7+
C85
8+
CD74
9+
CD75
10+
Eff1000
11+
Eff625
12+
Eff750
13+
Eff875
14+
VIMCFX96_60
15+
VIMCFX96_69
16+
VIMCFX96_meltcurve
17+
VIMiQ5_595
18+
VIMiQ5_685
19+
VIMiQ5_melt
20+
capillaryPCR

0 commit comments

Comments
 (0)