Skip to content
Snippets Groups Projects
Commit b4cc7e21 authored by Todor Kondić's avatar Todor Kondić
Browse files

Close many stale FIXMEs.

get_summ_subset: Close stale FIXME issues after so many changes.

app_config_and_status: Scale down from TODO/FIXME to TODO.

mk_comp_tab: Remove worked around FIXME.

make_eic_ms1_plot: Removed FIXME related to ms1_rt. This needs a proper rework, but does not have much impact at the moment.

rf_get_cindex: Removed FIXME which seems to not trigger any weird behaviour yet.

output$comp_table: Scale down from TODO/FIXME to TODO for plotting the compound list.

... and others ...
parent eebde582
No related branches found
No related tags found
No related merge requests found
...@@ -195,8 +195,6 @@ mk_comp_tab <- function(m) { ...@@ -195,8 +195,6 @@ mk_comp_tab <- function(m) {
smiforadd <- smiles[smiforadd,.(ID,SMILES,Formula,adduct),on=c("SMILES")] smiforadd <- smiles[smiforadd,.(ID,SMILES,Formula,adduct),on=c("SMILES")]
data.table::setkey(smiforadd,"adduct","ID") data.table::setkey(smiforadd,"adduct","ID")
## FIXME: Why is Formula a list when there are no SMILES, instead
## of an empty string?
smiforadd[,Formula:=as.character(Formula)] smiforadd[,Formula:=as.character(Formula)]
## Update the intermediate table with masses. ## Update the intermediate table with masses.
......
...@@ -77,7 +77,6 @@ make_db_precursors <- function(m) { ...@@ -77,7 +77,6 @@ make_db_precursors <- function(m) {
} else { } else {
stop('make_db_precursors: Unknown mass unit (coarse).') stop('make_db_precursors: Unknown mass unit (coarse).')
} }
## TODO: FIXME: Should precids be unique, or not?
## Assign "fine" isobars to same isocoarse number. ## Assign "fine" isobars to same isocoarse number.
masses[,precid:=merge_precid_4_isobars(catid,mz,mz_fine_max),by="tag"] masses[,precid:=merge_precid_4_isobars(catid,mz,mz_fine_max),by="tag"]
......
...@@ -353,10 +353,6 @@ make_eic_ms1_plot <- function(db,summ,kvals,labs,axis="linear",rt_range=NULL,i_r ...@@ -353,10 +353,6 @@ make_eic_ms1_plot <- function(db,summ,kvals,labs,axis="linear",rt_range=NULL,i_r
key = names(kvals) key = names(kvals)
## Get metadata. ## Get metadata.
## TODO: FIXME: Somehow calculating representationve ms1_rt for
## plots is wrong. Horrible and wrong. Will remove those labels
## until we fix. 20230412: Still problematic?
summ_rows = narrow_summ(db=db,summ,kvals,labs,"mz","ms1_rt","ms1_int","Name","SMILES","qa_ms1_exists","scan","ms2_sel") summ_rows = narrow_summ(db=db,summ,kvals,labs,"mz","ms1_rt","ms1_int","Name","SMILES","qa_ms1_exists","scan","ms2_sel")
rows_key = union(data.table::key(summ_rows),labs) rows_key = union(data.table::key(summ_rows),labs)
summ_rows$sel_ms1_rt=NA_real_ summ_rows$sel_ms1_rt=NA_real_
......
...@@ -570,7 +570,7 @@ get_summ_subset <- function(db,summ,ptab,paritem,kvals) { ...@@ -570,7 +570,7 @@ get_summ_subset <- function(db,summ,ptab,paritem,kvals) {
get_ltab <- function(summ_subs,cols=c("scan","ms2_rt")) { get_ltab <- function(summ_subs,cols=c("scan","ms2_rt")) {
tab = summ_subs tab = summ_subs
if (NROW(tab)==1L && is.na(tab$an)) return(data.table::data.table(item=character())) if (NROW(tab)==1L && is.na(tab$an)) return(data.table::data.table(item=character()))
tab[is.na(ms2_sel),ms2_sel:=F] #TODO FIXME: Check why NAs exist at all? tab[is.na(ms2_sel),ms2_sel:=F]
tab[,passval:=fifelse(qa_pass==T,"OK","BAD")] tab[,passval:=fifelse(qa_pass==T,"OK","BAD")]
tab[ms2_sel==T,passval:="SELECTED"] tab[ms2_sel==T,passval:="SELECTED"]
res = tab[,item:=do.call(paste,c(.SD,list(sep=";"))),.SDcols=c(cols,"passval")] res = tab[,item:=do.call(paste,c(.SD,list(sep=";"))),.SDcols=c(cols,"passval")]
...@@ -614,7 +614,7 @@ update_on_commit_chg <- function(summ,input,ptab,ltab) { ...@@ -614,7 +614,7 @@ update_on_commit_chg <- function(summ,input,ptab,ltab) {
the_row = tabkey(summ,kvals=kvals) the_row = tabkey(summ,kvals=kvals)
summ[the_row,(tgts):=..srcs] summ[the_row,(tgts):=..srcs]
summ[,scan.1:=NULL] #FIXME: an.1 pops up somewhere. summ[,scan.1:=NULL]
qflg = QA_FLAGS[!(QA_FLAGS %in% "qa_pass")] qflg = QA_FLAGS[!(QA_FLAGS %in% "qa_pass")]
summ[the_row,qa_pass:=apply(.SD,1,all),.SDcols=qflg] summ[the_row,qa_pass:=apply(.SD,1,all),.SDcols=qflg]
summ summ
......
...@@ -700,8 +700,6 @@ mk_shinyscreen_server <- function(projects,init) { ...@@ -700,8 +700,6 @@ mk_shinyscreen_server <- function(projects,init) {
## REACTIVE FUNCTIONS: COMPOUND INDEX ## REACTIVE FUNCTIONS: COMPOUND INDEX
rf_get_cindex <- reactive({ rf_get_cindex <- reactive({
## TODO: FIXME: Uncomment after rearranging everything.
## input$cmt_changes_b
rvs$status$is_qa_stat rvs$status$is_qa_stat
s1 = input$sort1 s1 = input$sort1
s2 = input$sort2 s2 = input$sort2
...@@ -1583,7 +1581,7 @@ mk_shinyscreen_server <- function(projects,init) { ...@@ -1583,7 +1581,7 @@ mk_shinyscreen_server <- function(projects,init) {
}) })
output$comp_table = DT::renderDataTable({ output$comp_table = DT::renderDataTable({
## TODO FIXME ## TODO
## cmpds = rf_get_cmpd_tab() ## cmpds = rf_get_cmpd_tab()
## validate(need(NROW(cmpds)>0,"No compound list loaded yet.")) ## validate(need(NROW(cmpds)>0,"No compound list loaded yet."))
## DT::datatable(cmpds, ## DT::datatable(cmpds,
......
...@@ -194,7 +194,7 @@ overload of the system's resources. ...@@ -194,7 +194,7 @@ overload of the system's resources.
```{r, echo=F} ```{r, echo=F}
## This is treated differently than other MF inputs, because the value ## This is treated differently than other MF inputs, because the value
## is not known prior to starting a R session. There should be a ## is not known prior to starting a R session. There should be a
## mechanism for this. TODO FIXME. ## mechanism for this. TODO
numericInput(inputId="mf_proc", numericInput(inputId="mf_proc",
label="Number of MetFrag processes", label="Number of MetFrag processes",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment