Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump loofah from 2.1.1 to 2.3.0 in /web #23

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bioinformatics/QpcrAnalysis/amp_analysis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function set_ct_fluos!(
map(1:i.num_channels) do channel_i
const fits =
map(1:i.num_wells) do well_i
const fluos = o.rbbs_3ary[:, well_i, channel_i]
const fluos = o.rbbs_ary3[:, well_i, channel_i]
amp_fit_model(
Val{SFCModel},
AmpCqFluoModelResults,
Expand Down Expand Up @@ -127,7 +127,7 @@ function get_fit_results(
const ipopt_file = string(join([prefix, ci, wi], '_')) * ".txt"
push!(solver.options, (:output_file, ipopt_file))
end
const fluos = o.rbbs_3ary[:, wi, ci]
const fluos = o.rbbs_ary3[:, wi, ci]
amp_fit_model(
Val{i.amp_model},
i.amp_model_results,
Expand Down
8 changes: 4 additions & 4 deletions bioinformatics/QpcrAnalysis/amp_fit_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ function amp_fit_model(
## set output
if isa(R, AmpShortModelResults)
return AmpShortModelResults(
fluos, ## rbbs_3ary,
fluos, ## rbbs_ary3,
blsub_fluos,
NaN, ## dr1_pred
NaN, ## dr2_pred
NaN, ## cq
d0())
else
return AmpLongModelResults(
fluos, ## rbbs_3ary,
fluos, ## rbbs_ary3,
bl_fit,
[string(amp_model)], ## bl_notes
blsub_fluos,
Expand Down Expand Up @@ -355,7 +355,7 @@ function amp_fit_model(
if R == AmpShortModelResults
const cq_raw = calc_cq_raw(dr1_pred, dr2_pred)
return AmpShortModelResults(
# fluos, ## rbbs_3ary,
# fluos, ## rbbs_ary3,
blsub_fluos,
dr1_pred[raw_cycs_index],
dr2_pred[raw_cycs_index],
Expand Down Expand Up @@ -385,7 +385,7 @@ function amp_fit_model(
func_pred_eff(cyc_vals_4cq[key])
end)
return AmpLongModelResults(
fluos, ## rbbs_3ary
fluos, ## rbbs_ary3
bl_fit,
bl_notes,
blsub_fluos,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import Ipopt: IpoptSolver #, NLoptSolver
Field definitions >>
===============================================================================#

## issue: rename `rbbs_3ary` as `calibrated` once juliaapi_new has been updated
## issue: rename `rbbs_ary3` as `calibrated` once juliaapi_new has been updated
const AMPLONGMODELRESULTS_FIELD_DEFS = [
Field(:rbbs_3ary, Vector{Float_T}),
Field(:rbbs_ary3, Vector{Float_T}),
Field(:bl_fit, Union{AmpModelFit,Symbol}),
Field(:bl_notes, Vector{String}),
Field(:blsub_fluos, Vector{Float_T}),
Expand All @@ -41,7 +41,7 @@ const AMPLONGMODELRESULTS_FIELD_DEFS = [


const AMPSHORTMODELRESULTS_FIELDNAMES = [
# rbbs_3ary,
# rbbs_ary3,
:blsub_fluos,
:dr1_pred,
:dr2_pred,
Expand Down
4 changes: 2 additions & 2 deletions bioinformatics/QpcrAnalysis/amp_models/defines/AmpOutput.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const AMPLONGOUTPUT_FIELD_DEFS = [
Field(:norm_data, SArray{S,<: Real} where {S}), ## wva_data
Field(:k_deconv, DeconvolutionMatrices), ## k4dcv
Field(:deconvoluted_data, Array{<: Real,3}), ## dcvd_ary3
Field(:rbbs_3ary, Array{Float_T,3}), ## calibrated_data
Field(:rbbs_ary3, Array{Float_T,3}), ## calibrated_data
# cq_method, Symbol
## for ct method
Field(:ct_fluos, SVector{C,Float_T} where {C}),
Expand Down Expand Up @@ -64,7 +64,7 @@ const AMPLONGOUTPUT_FIELD_DEFS = [


const AMPSHORTOUTPUT_FIELDNAMES = [
:rbbs_3ary,
:rbbs_ary3,
:blsub_fluos,
:dr1_pred,
:dr2_pred,
Expand Down
5 changes: 1 addition & 4 deletions bioinformatics/QpcrAnalysis/amplification.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function act(
amp_output = AmpOutputOption(out_format),
kw_bl...,
kwargs...,)
const result = try
const result =
## issues:
## 1.
## the new code currently assumes only 1 step/ramp
Expand Down Expand Up @@ -135,9 +135,6 @@ function act(
key => getfield(first_sr_out, key)
end...,
:valid => true])
catch err
return fail(logger, err; bt = true) |> out(out_format)
end ## try
return result |> out(out_format)
end ## act(::Type{Val{amplification}})

Expand Down
19 changes: 7 additions & 12 deletions bioinformatics/QpcrAnalysis/dispatch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ function dispatch(
)
debug(logger, "at dispatch() with action \"$action_key\"")
debug(logger, "request body: " * request_body)
success = false
const result = try
## NB. DefaultDict and DefaultOrderedDict constructors sometimes don't work
## on OrderedDict (https://github.com/JuliaLang/DataStructures.jl/issues/205)
Expand Down Expand Up @@ -74,23 +75,17 @@ function dispatch(
end ## if !production_env
#
## return value
success = true
json_response
catch err
fail(logger, err; bt = true)
JSON.json(fail(logger, err; bt = true) |> out(pre_json_output))
end ## try
#
const success = !isa(result, Exception)
const response_body =
if success
string(result)
else
JSON.json(Dict(
:valid => false,
:error => sprint(showerror, result)))
end ## if

const response_body = string(result)

debug(logger, "returning from dispatch()")
debug(logger, "success: $success")
debug(logger, "response body: " * response_body)

return (success, response_body)
end ## dispatch()

Expand Down
6 changes: 2 additions & 4 deletions bioinformatics/QpcrAnalysis/melting_curve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,9 @@ function act(
#
## pass data and parameter values to mc_analysis()
## which will perform the analysis for the entire dataset
const response = try
const response =
mc_analysis(interface)
catch err
return fail(logger, err; bt = true) |> out(out_format)
end ## try

return response |> out(out_format)
end ## act(::Type{Val{meltcurve}})

Expand Down
2 changes: 1 addition & 1 deletion bioinformatics/QpcrAnalysis/standard_curve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function act(
try
parse_raw_data(Val{standard_curve}, req)
catch()
fail(logger, ArgumentError(
throw(ArgumentError(
"cannot parse raw data for standard curve analysis"))
end ## try
#
Expand Down
3 changes: 1 addition & 2 deletions bioinformatics/juliaserver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ function get_response(req ::HTTP.Request)
const success, response_body =
QpcrAnalysis.dispatch(action, request_body; kwargs...)
debug(logger, "at get_response() receiving results from QpcrAnalysis.dispatch()")
## code =
(success) ? 200 : 500
code = (success) ? 200 : 500
else ## length(nodes) < 3
404
end
Expand Down
10 changes: 5 additions & 5 deletions web/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ GEM
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.0.5)
crass (1.0.3)
crass (1.0.4)
diff-lcs (1.3)
ejs (1.1.1)
erubis (2.7.0)
Expand All @@ -86,21 +86,21 @@ GEM
thor (>= 0.14, < 2.0)
json (1.8.6)
kgio (2.11.1)
loofah (2.1.1)
loofah (2.3.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.0)
mini_mime (>= 0.1.1)
migration_comments (0.4.1)
activerecord (>= 4.2.0)
mini_mime (1.0.0)
mini_portile2 (2.3.0)
mini_portile2 (2.4.0)
minitest (5.11.1)
multi_json (1.13.1)
multi_xml (0.6.0)
mysql2 (0.4.10)
nokogiri (1.8.1)
mini_portile2 (~> 2.3.0)
nokogiri (1.10.4)
mini_portile2 (~> 2.4.0)
public_suffix (3.0.1)
rabl (0.13.1)
activesupport (>= 2.3.14)
Expand Down