Skip to content

Commit

Permalink
complimentary juliaformatter
Browse files Browse the repository at this point in the history
  • Loading branch information
exaexa committed Mar 22, 2022
1 parent 6431b9d commit 567ceff
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 32 deletions.
6 changes: 1 addition & 5 deletions src/analysis/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,7 @@ function mapToGigaSOM(

tree = knnTreeFun(Array{Float64,2}(transpose(som.codes)), metric)

return dtransform(
dInfo,
(d) -> (vcat(knn(tree, transpose(d), 1)[1]...)),
output,
)
return dtransform(dInfo, (d) -> (vcat(knn(tree, transpose(d), 1)[1]...)), output)
end

"""
Expand Down
1 change: 0 additions & 1 deletion src/base/dataops.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ Transform columns of the dataset by asinh transformation with `cofactor`.
function dtransform_asinh(dInfo::Dinfo, columns::Vector{Int}, cofactor = 5)
dapply_cols(dInfo, (v, _) -> asinh.(v ./ cofactor), columns)
end

4 changes: 3 additions & 1 deletion src/base/trainutils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ function expRadius(steepness::Float64 = 0.0)
adjust = finalRadius * (1 - 1.1^(-steepness))

if initRadius <= 0 || (initRadius - adjust) <= 0 || finalRadius <= 0
error("Radii must be positive. (Possible alternative cause: steepness is too high.)")
error(
"Radii must be positive. (Possible alternative cause: steepness is too high.)",
)
end

initRadius -= adjust
Expand Down
16 changes: 7 additions & 9 deletions src/io/input.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,12 @@ function loadFCSSet(
:(
begin
$name = vcollectSlice(
(i) -> last($postLoad(
loadFCS($fns[i]; applyCompensation = $applyCompensation),
i,
)),
(i) -> last(
$postLoad(
loadFCS($fns[i]; applyCompensation = $applyCompensation),
i,
),
),
$slice,
)
nothing
Expand Down Expand Up @@ -174,11 +176,7 @@ from `fns` the cell comes from. Useful for producing per-file statistics. The
vector is saved on workers specified by `pids` as a distributed variable
`name`.
"""
function distributeFCSFileVector(
name::Symbol,
fns::Vector{String},
pids = workers(),
)::Dinfo
function distributeFCSFileVector(name::Symbol, fns::Vector{String}, pids = workers())::Dinfo
sizes = loadFCSSizes(fns)
slices = slicesof(sizes, length(pids))
return distributeFileVector(name, sizes, slices, pids)
Expand Down
36 changes: 20 additions & 16 deletions src/io/splitting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,16 @@ function vcollectSlice(
loadMtx,
(startFile, startOff, finalFile, finalOff)::Tuple{Int,Int,Int,Int},
)::Matrix
vcat([
begin
m = loadMtx(i)
beginIdx = i == startFile ? startOff : 1
endIdx = i == finalFile ? finalOff : size(m, 1)
m[beginIdx:endIdx, :]
end for i = startFile:finalFile
]...)
vcat(
[
begin
m = loadMtx(i)
beginIdx = i == startFile ? startOff : 1
endIdx = i == finalFile ? finalOff : size(m, 1)
m[beginIdx:endIdx, :]
end for i = startFile:finalFile
]...,
)
end

"""
Expand All @@ -98,12 +100,14 @@ function collectSlice(
loadVec,
(startFile, startOff, finalFile, finalOff)::Tuple{Int,Int,Int,Int},
)::Vector
vcat([
begin
v = loadVec(i)
beginIdx = i == startFile ? startOff : 1
endIdx = i == finalFile ? finalOff : length(v)
v[beginIdx:endIdx]
end for i = startFile:finalFile
]...)
vcat(
[
begin
v = loadVec(i)
beginIdx = i == startFile ? startOff : 1
endIdx = i == finalFile ? finalOff : length(v)
v[beginIdx:endIdx]
end for i = startFile:finalFile
]...,
)
end

0 comments on commit 567ceff

Please sign in to comment.