-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo2.R
46 lines (38 loc) · 877 Bytes
/
demo2.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
library("sageseqr")
# Set up data ----
metadata <- data.frame(
batch = c("1", "2", "1", "2"),
diagnosis = c("dx", "dx", "ct", "ct"),
stringsAsFactors = TRUE,
row.names = c("S1", "S2", "S3", "S4")
)
counts <- matrix(
sample(0:100, size = 12),
ncol = 4,
dimnames = list(
c("ENSG1", "ENSG2", "ENSG5"),
c("S1", "S2", "S3", "S4")
)
)
biomart_results <- data.frame(
length = c(400, 400, 400),
row.names = c("ENSG1", "ENSG2", "ENSG5")
)
# Differential expression ----
de <- differential_expression(
counts,
counts,
md = metadata,
model_variables = c("batch"),
primary_variable = c("diagnosis"),
biomart_results = biomart_results
)
library("variancePartition")
de <- differential_expression(
counts,
counts,
md = metadata,
model_variables = c("batch"),
primary_variable = c("diagnosis"),
biomart_results = biomart_results
)