1
|
1 log_file=file("Read_Dataset.log", open = "wt")
|
|
2 sink(log_file)
|
|
3 sink(log_file, type = "out")
|
|
4 suppressWarnings(suppressMessages(library("batch")))
|
|
5 suppressWarnings(suppressMessages(library(data.table)))
|
|
6 listArguments = parseCommandArgs(evaluate=FALSE)
|
|
7 datasetsource = listArguments[["datasetsource"]]
|
|
8
|
|
9 training=fread(datasetsource,header = T)
|
|
10 training1=fread(datasetsource,header = T)
|
|
11 training=as.matrix(training)
|
|
12 training=training[,-1]
|
|
13 rownames(training)<-training1$V1
|
|
14 training=t(training)
|
|
15 training=training[,-c(4,7)]
|
3
|
16 tp=training[,4]
|
|
17 tr=training[,5]
|
|
18 tp[tp=="6HR"]<-0
|
|
19 tp[tp=="24HR"]<-1
|
|
20 tr[tr=="DHA"]<-0
|
|
21 tr[tr=="UT"]<-1
|
|
22 training[,4]=tp
|
|
23 training[,5]=tr
|
1
|
24 fwrite(
|
|
25 as.data.frame(training),"Format_Dream.tsv",sep="\t"
|
|
26 )
|
|
27
|
|
28
|
|
29
|
|
30
|
|
31
|
|
32
|
|
33
|
|
34
|