Roestlab / massdash

MassDash: A web-based dashboard for streamlined DIA-MS visualization, analysis, prototyping, and optimization
https://massdash.streamlit.app/
BSD 3-Clause "New" or "Revised" License
16 stars 3 forks source link

Error with visualizing non smoothed chromatograms #4

Closed jcharkow closed 11 months ago

jcharkow commented 11 months ago

When setting smoothing to none we get an error.

image

Although this could be solved by either getting rid of the if condition in chromatogram_plotting_settings these setting do not make sense. We also cannot get rid of these settings all together because these settings are needed for peak picking performed on a chromatogram with None.

Proposed Solution #1: Create seperate sgolay parameters (and advanced pannel) for peak picker MRM. These should by default be the same as sgolay or should be set manually if no sgolay filter is applied

Proposed Solution #2: Perform peak picking directly on raw chromatograms if no sgolay filter.

singjc commented 11 months ago

I think Solution 1 would make the most sense, having separate advanced parameters for peakPickerMRM (admittedly, some of the parameters are hard coded/set for known working chromatograms settings). This way, if the user selects no smoothing for the visualization aspect, they can still do peak picking on the raw data, and play with peak picking smoothing.

If the user does apply smoothing for visualization, then should both visualization and peak picking smoothing always be the same, or independent?

singjc commented 11 months ago

Also, right now sgolay_polynomial_order and sgolay_frame_length get returned from chromatogram_plotting_settings, which is also already in smoothing_dict which also gets returned. I think I will refactor only return and pass smoothing_dict to make it easier to add other smoothing functions. I don't know why I have this redundancy lol

jcharkow commented 11 months ago

Hmm would that be confusing though to have the peak picking boundaries on the chromatogram not shown? Having said that it is useful for new algorithm development. Maybe there can be a checkbox that will just do peak picking on the shown chromatogram and if that is unchecked then the advanced parameters are shown?

singjc commented 11 months ago

Addressed with PR #6