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

Refactor of codebase #16

Closed jcharkow closed 9 months ago

jcharkow commented 11 months ago

Make codebase more "class based" including abstract class based so that it can be more easily extendable. Also this should allow for a friendlier UI for those working directly with the python package.

Several Classes will add include:

Chromatogram - store np arrays of rt and im as well as meta information (e.g. label)

TransitionGroup - an object contaning both the MS1 and the MS2 chromatograms

GenericPeakPicker - abstract class containing functions which all peakPickers should implement

PeakFeatures - metainformation about a peak feature including rt apex intensity, left width, right width, area intensity etc. These objects created by all peak pickers

ExternalFileLoader - abstract class containing functions to load chromatogram objects

Plotter abstract class for plotting chromatograms plotTransitionGroup() requires transition group outputs plot plotPeakFeatures() requires list of peak features and places them on plot

Current Classes Inhereting from this include:
    StaticPlot()
    InteractivePlot()

streamlit functions hopefully should not change too much.

@singjc Please let me know your thoughts

jcharkow commented 11 months ago

Update GenericFileLoader

load(peptide sequence, charge) -> TransitionGroup)

ChromatogramLoader nherit from (SQMassFile, OSWFile) SQMassLoader inherit from (SQMassFile, PQPFile)

ExperimentLoader inherit from ( MZML, OSW) MZMLLoader inherit from ( MzML, tsv file)

charge, rt, im needed in

singjc commented 9 months ago

This has been accomplished with #50 , but was rebased as dev, and old dev was moved to legacy.