-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprocess_HD_stats.r
More file actions
executable file
·79 lines (51 loc) · 1.67 KB
/
process_HD_stats.r
File metadata and controls
executable file
·79 lines (51 loc) · 1.67 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
my_file="/Users/kevin/Documents/Projects/Perf_stats/rw_results.txt"
my_file="rw_results.txt"
setwd("/Users/kevin/Documents/Projects/Perf_stats")
source("~/git/CDIS_GEUVADIS_analysis/import_data.r")
my_data <- data.matrix(
read.table(
my_file,
skip=1,
#row.names=FALSE,
header=TRUE,
sep="\t",
comment.char="",
quote="",
check.names=FALSE))
nrep=max(my_data[,'Repeat'])
nfiles=unique(my_data[,'# File'])
new_data <- matrix(NA,nrep, ...)
previous_repeat <- 0
previous_file <- my_data[1,'# File']
for ( i in 1:nrow(my_data) ){
# loop for each file
if(identical(previous_file, my_data[1,'# File'])==TRUE){
#keep going
if( my_data[,'Repeat'] > previous_repeat ){
# continue if Repeat keeps increasing,
previous_file <- my_data[i, 'File']
previous_repeat <- my_data[i,'Repeat']
if( my_data[,'Repeat']==1 ){
# get values once for each repeat group
my_file <-
my_date
my_size
my_operation
}
my_tt
my_tr_G
my_tr_M
}else{
# if not - compute avg, stdev, write to new data, reset vector
}
}else{
# Proceed to next file
previous_file <- my_data[i, 'File']
}
}
}
}#vector for each value
# File Date_stamp size(Gb) Operation Transfer_time Transfer_rate(Gb/s) Transfer_rate(Mb/s) Repeat
}
#remove the first two lines (contain comments)
my_data <- mydata[,-1:2]