CBIIT / R-cometsAnalytics

R package development for COMETS Analytics
12 stars 10 forks source link

COMETS 1.4 Tagging and other issues in interactive mode #22

Closed steven-moore closed 5 years ago

steven-moore commented 6 years ago

Interactive mode - If using non-R friendly names for metabolites, it would fail with “individual metabolite names” or use the tag function. (Comets R). A lower priority issue for now.

steven-moore commented 6 years ago

From my original e-mail: I have been testing Rachel Kelly’s file and have it mostly working. There is one minor issue though. She’s using non-R friendly names for metabolites. While this works by and large, it fails if you enter “individual metabolite names” or use the tag function.

So, for example, an analysis of age by diacetylspermine works just fine. But an analysis of age by C16 carnitine (with the space as part of the name) does not.

Most likely, we are using an array-based method when analyzing “all metabolites” (which mitigates the non-standard name issue), but not using this method when analyzing individual metabolites.

ellatemprosa commented 6 years ago

needs to investigate where it's failing whether in passing the web argument or in comets analytics

steven-moore commented 6 years ago

Scrambled.CPSII.data_comp_id_removed.xlsx

Ewy has changed the processing of metabolite names to make this an array-based system, but changes need to be made to the interface to fully capitalize on these changes. There are at least two examples:

  1. When making tags of metabolites, the metabolite names are not being properly mapped. Thus, when you examine metabolite*metabolite correlations using a tag, it results in mismapped metabolites and an error.

image

  1. When examining metabolite*metabolite correlations, names are dynamically updated for the outcomes (which is the intended functionality) but not for the exposures.

image

image

park-brian commented 6 years ago

For item 2, the web application displays the outcome/exposure columns as-is from the correlation output. It looks like the outcome column's values have been mapped to the original metabolite names, but the exposure column does not have mapped metabolite names:

image

metab_data <- readCOMETSinput(system.file('extdata', 'cometsInputAge.xlsx', package = 'COMETS'))
model_data <- getModelData(metab_data, modelspec = 'Interactive', colvars = c('_1_2_3_benzenetriol_sulfate_2', '_1_2_dipalmitoylglycerol'), rowvars = c('_1_2_3_benzenetriol_sulfate_2', '_1_2_dipalmitoylglycerol'))
corr_data <- runCorr(model_data, metab_data)

View(corr_data)
steven-moore commented 6 years ago

That makes sense--so this needs to be taken care of on Ewy's end, correct?

park-brian commented 6 years ago

Yes, once the package is updated the UI should pick up the new names.

steven-moore commented 6 years ago

See also issue #42

steven-moore commented 6 years ago

Per our phone conversation today, Ella will look into this and issue #42 (the two issues are interrelated)

steven-moore commented 5 years ago

The heatmap issue has been resolved (point 1 above), but the reporting for exposure and outcome metabolites still differ (point 2). I may be able to live with this, but we should at least discuss whether this is the functionality we want.

steven-moore commented 5 years ago

Fixed and closed