-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmetalonda_test_updates.R
66 lines (48 loc) · 1.88 KB
/
metalonda_test_updates.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
setwd("~/Dropbox/metalonda_work/updateMetalonda/MetaLonDA")
detach("package:MetaLonDA", unload=TRUE)
source("R/CurveFitting.R")
source("R/Visualization.R")
source("R/Permutation.R")
source("R/Normalization.R")
source("R/Metalonda.R")
source("R/metalonda_test_data.R")
library(ggplot2)
library(gss)
library(plyr)
library(caTools)
library(parallel)
library(doParallel)
library(zoo)
data(metalonda_test_data)
View(metalonda_test_data[,1:20])
## Create Group, Time, and ID annotation vectors
n.group = 2
n.sample = 5
n.timepoints = 10
Group = factor(c(rep("A", n.sample*n.timepoints), rep("B",n.sample*n.timepoints)))
Time = rep(rep(1:n.timepoints, times = n.sample), 2)
ID = factor(rep(1:(2*n.sample), each = n.timepoints))
## Define the prediction timeponits
points = seq(1, 10, length.out = 100)
Count= metalonda_test_data[5,]
Time = Time
Group = Group
ID = ID
n.perm = 5
fit.method = "nbinomial"
points = points
text = "testfeature"
parall = FALSE
pvalue.threshold = 0.05
adjust.method = "BH"
time.unit = "pppp"
ylabel = "Normalized Count"
col = c("blue", "firebrick")
output.metalonda.f5 = metalonda(Count = metalonda_test_data[5,], Time = Time, Group = Group,
ID = ID, n.perm = 5, fit.method = "nbinomial", points = points,
text = rownames(metalonda_test_data)[5], parall = FALSE, pvalue.threshold = 0.05,
adjust.method = "BH", col = c("black", "green"))
output.metalonda.all = metalondaAll(Count = metalonda_test_data, Time = Time, Group = Group,
ID = ID, n.perm = 100, fit.method = "nbinomial", num.intervals = 100,
parall = FALSE, pvalue.threshold = 0.05, adjust.method = "BH", time.unit = "hours",
norm.method = "none", prefix = "Test", ylabel = "Read Counts", col = c("black", "green"))