EuracBiomedicalResearch / lcms-standards

Measurements of standard compounds in LC/MS setups and configurations at Eurac Research
1 stars 0 forks source link

Fix utility functions #99

Closed jorainer closed 4 days ago

jorainer commented 1 week ago

The problem with the missing/failing mirror plots was that the function used the global variable sim, which got overwritten. I have now changed the function to also take the sim parameter. Note that then you need to call the function with:

std_ms2_sel <- plot_select_ms2(std_ms2, std_hmdb, 0.5, ppm = csp@ppm,
                               tolerance = csp@tolerance, sim_hmdb)

i.e. passing in addition sim_hmdb (or sim_mbank) to the function - and instead of calling sim <- ... in the code chunk below I suggest to specifically assign the similarity matrix to either sim_hmdb <- or sim_mbank <-.