-
Notifications
You must be signed in to change notification settings - Fork 54
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
FR: SAM (Significance Analysis of Microarrays) #237
Conversation
Change of QValues and significant Gene Count, added standard permutation scheme getPermutations
implemented new cut function and monotonized delta
changes in naming (e.g. bioitem replacing gene)
Add unit tests
docs/Testing.fsx
Outdated
let data1 = Array.map2 tupel rowheader preData1 | ||
let data2 = Array.map2 tupel rowheader preData2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace with
let data1 = Array.zip rowheader preData1
let data2 = Array.zip rowheader preData2
docs/Testing.fsx
Outdated
@@ -834,7 +842,7 @@ aErrorAcc | |||
(***hide***) | |||
aErrorAcc |> GenericChart.toChartHTML | |||
(***include-it-raw***) | |||
|
|||
aErrorAcc|> Chart.show |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this Chart.show
ping |
Additionally, add a fold change field in the SAM type. |
docs/Testing.fsx
Outdated
let nonchart = | ||
Chart.Point(nonex,res.NonSigBioitem |> Array.map (fun x -> x.Statistics)) | ||
|> Chart.withLineStyle(Color=Color.fromKeyword Gray) | ||
|> Chart.withTraceInfo("no change",Visible = Visible.True) | ||
|
||
// negative significant changes | ||
let negex = expected.[0 .. res.NegSigBioitem.Length-1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let nonex = expected.[res.NegSigBioitem.Length-1 ..
let negex = expected.[0 .. res.NegSigBioitem.Length-1]
Here the (res.NegSigBioitem.Length-1)th element is assigned to both, nonex and negex. I think an index error occurred.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be:
let posExpected = expected.[res.NegSigBioitem.Length + res.NonSigBioitem.Length .. res.NegSigBioitem.Length + res.NonSigBioitem.Length + res.PosSigBioitem.Length-1]
let nonex = expected.[res.NegSigBioitem.Length .. res.NegSigBioitem.Length + res.NonSigBioitem.Length-1]
let negex = expected.[0 .. res.NegSigBioitem.Length-1]
Please doublecheck
src/FSharp.Stats/Testing/SAM.fs
Outdated
let PosSigBioitem = getQvals |> Array.filter (fun x -> x.Statistics > upperCut) | ||
let NegSigBioitem = getQvals |> Array.filter (fun x -> x.Statistics < lowerCut) | ||
let NonSigBioitem = getQvals |> Array.filter (fun x -> x.Statistics >= lowerCut && x.Statistics <= upperCut) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldnt it be:
let PosSigBioitem = getQvals |> Array.filter (fun x -> x.Statistics >= upperCut)
let NegSigBioitem = getQvals |> Array.filter (fun x -> x.Statistics <= lowerCut)
let NonSigBioitem = getQvals |> Array.filter (fun x -> x.Statistics > lowerCut && x.Statistics < upperCut)
Fix requested changes
Codecov Report
@@ Coverage Diff @@
## developer #237 +/- ##
=============================================
+ Coverage 43.36% 44.82% +1.46%
=============================================
Files 142 143 +1
Lines 14028 14302 +274
Branches 1892 1908 +16
=============================================
+ Hits 6083 6411 +328
+ Misses 7444 7365 -79
- Partials 501 526 +25
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Please reference the issue(s) this PR is related to
Implementing SAM as in FR #236
Please list the changes introduced in this PR