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

fix #11 #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
16 changes: 8 additions & 8 deletions src/TMEA/Plots.fs
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,10 @@ module Plots =
fun (tmeaRes:TMEAResult) ->
let posDesc,negDesc =
tmeaRes.Characterizations.[constraintIndex].PositiveDescriptor
|> Array.find (fun x -> x.OntologyTerm = fasName)
|> Array.tryFind (fun x -> x.OntologyTerm = fasName)
,
tmeaRes.Characterizations.[constraintIndex].NegativeDescriptor
|> Array.find (fun x -> x.OntologyTerm = fasName)
|> Array.tryFind (fun x -> x.OntologyTerm = fasName)

let posPValCorrected , negPValCorrected =
tmeaRes.Characterizations.[constraintIndex].PositiveDescriptor
Expand All @@ -398,8 +398,8 @@ module Plots =
let qv = Testing.MultipleTesting.Qvalues.ofPValues pi0 pv
Array.zip id qv
|> List.ofArray
|> List.find (fun (id,pVal) -> id = fasName)
|> snd
|> List.tryFind (fun (id,pVal) -> id = fasName)
|> fun t -> if t.IsSome then t.Value |> snd else 1.
,
tmeaRes.Characterizations.[constraintIndex].NegativeDescriptor
|> Array.map (fun x -> x.OntologyTerm,x.PValue)
Expand All @@ -416,8 +416,8 @@ module Plots =
let qv = Testing.MultipleTesting.Qvalues.ofPValues pi0 pv
Array.zip id qv
|> List.ofArray
|> List.find (fun (id,pVal) -> id = fasName)
|> snd
|> List.tryFind (fun (id,pVal) -> id = fasName)
|> fun t -> if t.IsSome then t.Value |> snd else 1.

let isSigPos,isSigNeg =
posPValCorrected < alphaLevel,
Expand Down Expand Up @@ -477,7 +477,7 @@ module Plots =
Align=StyleParam.AnnotationAlignment.Left,
Text =(
let binDataText = (
sprintf "<br></br><b>BinSize</b>: %i<br></br><b>WeightSum</b>: %.5f<br></br><b>PVal</b>: %.5f<br></br><b>CorrectedPVal</b>: %.5f<br></br>" posDesc.BinSize posDesc.WeightSum posDesc.PValue posPValCorrected)
sprintf "<br></br><b>BinSize</b>: %i<br></br><b>WeightSum</b>: %.5f<br></br><b>PVal</b>: %.5f<br></br><b>CorrectedPVal</b>: %.5f<br></br>" (if posDesc.IsSome then posDesc.Value.BinSize else 0) (if posDesc.IsSome then posDesc.Value.WeightSum else 0.) (if posDesc.IsSome then posDesc.Value.PValue else 1.) posPValCorrected)
let header=
if isSigPos then
(sprintf "[+]<b>Significant(@%.5f)</b> in C%i" alphaLevel constraintIndex)
Expand All @@ -502,7 +502,7 @@ module Plots =
BorderColor=Color.fromString "ashgray",
Align=StyleParam.AnnotationAlignment.Left,
Text= (
let binDataText = (sprintf "<br></br><b>BinSize</b>: %i<br></br><b>WeightSum</b>: %.5f<br></br><b>PVal</b>: %.5f<br></br><b>CorrectedPVal</b>: %.5f<br></br>" negDesc.BinSize negDesc.WeightSum negDesc.PValue negPValCorrected)
let binDataText = (sprintf "<br></br><b>BinSize</b>: %i<br></br><b>WeightSum</b>: %.5f<br></br><b>PVal</b>: %.5f<br></br><b>CorrectedPVal</b>: %.5f<br></br>" (if negDesc.IsSome then negDesc.Value.BinSize else 0) (if negDesc.IsSome then negDesc.Value.WeightSum else 0.) (if negDesc.IsSome then negDesc.Value.PValue else 1.) negPValCorrected)
let header=
if isSigNeg then
(sprintf "[-]<b>Significant</b> in C%i" constraintIndex)
Expand Down