annotate findDMR/findDMR.R @ 9:bae8d90853b7 draft

Uploaded
author testtool
date Tue, 25 Apr 2017 13:35:53 -0400
parents a0e3f4efb03f
children 7df2b7d79391
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
a0e3f4efb03f Uploaded
testtool
parents: 5
diff changeset
1 require("IlluminaHumanMethylation450kanno.ilmn12.hg19", quietly = TRUE)
9
bae8d90853b7 Uploaded
testtool
parents: 6
diff changeset
2 require("data.table", quietly = TRUE)
0
ca66a1487d4a Uploaded
testtool
parents:
diff changeset
3 require("minfi", quietly = TRUE)
ca66a1487d4a Uploaded
testtool
parents:
diff changeset
4
6
a0e3f4efb03f Uploaded
testtool
parents: 5
diff changeset
5 options(warn = -1)
a0e3f4efb03f Uploaded
testtool
parents: 5
diff changeset
6 options("download.file.method"="wget")
0
ca66a1487d4a Uploaded
testtool
parents:
diff changeset
7
ca66a1487d4a Uploaded
testtool
parents:
diff changeset
8 args <- commandArgs(trailingOnly = TRUE)
ca66a1487d4a Uploaded
testtool
parents:
diff changeset
9
6
a0e3f4efb03f Uploaded
testtool
parents: 5
diff changeset
10 input1 = args[1]
a0e3f4efb03f Uploaded
testtool
parents: 5
diff changeset
11 input2 = args[2]
a0e3f4efb03f Uploaded
testtool
parents: 5
diff changeset
12 output = args[3]
5
715d03e1fd83 Uploaded
testtool
parents: 4
diff changeset
13
6
a0e3f4efb03f Uploaded
testtool
parents: 5
diff changeset
14 GRset <- get(load(input1))
0
ca66a1487d4a Uploaded
testtool
parents:
diff changeset
15
6
a0e3f4efb03f Uploaded
testtool
parents: 5
diff changeset
16 pheno <- fread(input2)
a0e3f4efb03f Uploaded
testtool
parents: 5
diff changeset
17
a0e3f4efb03f Uploaded
testtool
parents: 5
diff changeset
18 designMatrix <- model.matrix(~ pheno$Phenotype)
0
ca66a1487d4a Uploaded
testtool
parents:
diff changeset
19
6
a0e3f4efb03f Uploaded
testtool
parents: 5
diff changeset
20 dmrs <- bumphunter(GRset, design = designMatrix,
a0e3f4efb03f Uploaded
testtool
parents: 5
diff changeset
21 cutoff = 0.2, B=0, type="Beta")
a0e3f4efb03f Uploaded
testtool
parents: 5
diff changeset
22 write.table(dmrs, output)