Skip to content

Commit

Permalink
converter(DIANN): Enable q-value filtering accounting for MBR
Browse files Browse the repository at this point in the history
  • Loading branch information
tonywu1999 committed Jan 17, 2025
1 parent ef400ad commit 22b30dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions R/module-loadpage-ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ loadpageUI <- function(id) {
conditionalPanel(condition = "input['loadpage-filetype'] == 'sky' || input['loadpage-filetype'] == 'spec'|| input['loadpage-filetype'] == 'diann' ",
checkboxInput(ns("q_val"), "Filter with Q-value"),
conditionalPanel(condition = "input['loadpage-q_val']",
conditionalPanel(condition = "input['loadpage-filetype'] == 'diann'",
checkboxInput(ns("MBR"), "MBR Enabled", value = FALSE)
),
numericInput(ns("q_cutoff"), "Q-value cutoff", 0.01, 0, 1, 0.01))),
conditionalPanel(condition = "input['loadpage-filetype'] == 'open'",
checkboxInput(ns("m_score"), "Filter with M-score"),
Expand Down
7 changes: 5 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -518,17 +518,20 @@ getData <- function(input) {
print(input$dianndata$datapath)

qvalue_cutoff = 0.01
MBR = FALSE
if (input$q_val) {
qvalue_cutoff = input$q_cutoff
MBR = input$MBR
}

mydata = DIANNtoMSstatsFormat(data,
annotation = getAnnot(input),
qvalue_cutoff = qvalue_cutoff,
MBR = MBR,
removeProtein_with1Feature = TRUE,
removeFewMeasurements = FALSE,
use_log_file = FALSE,
MBR = FALSE)
use_log_file = FALSE
)
print("Mydata from mstats")
print(mydata)
}
Expand Down

0 comments on commit 22b30dd

Please sign in to comment.