-
Notifications
You must be signed in to change notification settings - Fork 0
/
scratch_code1.jl
94 lines (55 loc) · 1.89 KB
/
scratch_code1.jl
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
using CSV, Statistics
function makefloat!(x, df)
for col in x:size(df)[2]
if typeof(df[:, col]) == Array{String,1}
df[:, col] = map(x -> tryparse(Float64, x), df[:, col])
end
end
end
function makefloatfull!(x, df)
for col in x:size(df)[2]
if typeof(df[:, col]) != Array{Float64,1}
df[:, col] = map(x -> tryparse(Float64, x), df[:, col])
end
end
end
MaxSeeds = 10000
fullnonseed_data = CSV.read("Annotated_Unlogged_BA11Data.csv")
makefloatfull!(4, fullnonseed_data)
alldata_probes = fullnonseed_data[3:end, 1]
alldata_data = fullnonseed_data[4:end, 4:end]
makefloat!(1, alldata_data)
alldata_data = convert(Matrix, alldata_data)
n_probes = length(alldata_probes)
cutrank = n_probes - MaxSeeds
println(cutrank)
a = (sort(vec(mean(alldata_data, dims=2))))
println(a[cutrank])
for i in 1:cutrank
println(a[i])
end
#=
Seed_MinMean = (sort(vec(mean(alldata_data, dims=2))))[cutrank]
println(Seed_MinMean) # Note that this number is slightly different in new version versus old (42.889112582772285 here versus 42.88460199555892 in the old file) this is likely due to the fact that my method removes null values better (maybe?))
=#
#=function makefloat!(x, df)
for col in x:size(df)[2]
if typeof(df[:, col]) != Array{Float64,1}
df[:, col] = map(x -> tryparse(Float64, x), df[:, col])
end
end
end =#
#makefloat!(4, fullnonseed_data)
#fullnonseed_data_array = convert(Matrix, fullnonseed_data)
#println(fullnonseed_data_array)
#alldata_times = fullnonseed_data[3, 4:end]
#println(mean(alldata_data,2))
#alldata_data = fullnonseed_data[4:end, 4:end]
#= for col in 1:size(alldata_data)[2]
if typeof(alldata_data[:, col]) != Array{Float64,1}
println("foooyy")
end
end =#
#show(alldata_data, allcols=true)
#println(first(alldata_data, 2))
#alldata_data = convert(Matrix, alldata_data)