Skip to content

Commit

Permalink
Add topX method to quant group filters
Browse files Browse the repository at this point in the history
  • Loading branch information
Joott committed Jan 21, 2022
1 parent d9345b1 commit db00214
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/ProteomIQon/DTO.fs
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ module Common =
type GroupFilter =
| Tukey of float
| Stdev of float
| TopX of int


module GroupFilter =
Expand All @@ -310,7 +311,14 @@ module Common =
let mean = Seq.mean values
let stdev = Seq.stDev values
(fun v -> v <= (mean+stdev*threshold) && v >= (mean-stdev*threshold)
)
)
| TopX count ->
fun (values:seq<float>) ->
let topX =
values
|> Seq.sortDescending
|> Seq.take count
fun v -> topX |> Seq.contains v


module LabeledProteinQuantification =
Expand Down

0 comments on commit db00214

Please sign in to comment.