massdash.loaders.GenericChromatogramLoader

class massdash.loaders.GenericChromatogramLoader(**kwargs)

Bases: GenericRawDataLoader

Abstract class for loading raw chromatogram data

rsltsFile

(str) The path to the report file (DIANN-TSV or OSW)

dataFiles

(str/List[str]) The path to the mzML file(s)

verbose

(bool) Whether to print debug messages

mode

(str) Whether to run in module or GUI mode

abstract loadTransitionGroups(pep_id: str, charge: int, runNames: None | str | List[str]) Dict[str, TransitionGroup]

Loads the transition group for a given peptide ID and charge across all files :param pep_id: Peptide ID :type pep_id: str :param charge: Charge :type charge: int :param runNames: Name of the run to extract the transition group from. If None, all runs are extracted. If str, only the specified run is extracted. If List[str], only the specified runs are extracted. :type runNames: None | str | List[str]

Returns:

Dictionary of TransitionGroups, with keys as filenames

Return type:

dict[str, TransitionGroup]

abstract loadTransitionGroupsDf(pep_id: str, charge: int) DataFrame

Loads the transition group for a given peptide ID and charge across all files into a pandas DataFrame

Parameters:
  • pep_id (str) – Peptide ID

  • charge (int) – Charge

Returns:

DataFrame containing TransitionGroup information across all runs

Return type:

pd.DataFrame

plotChromatogram(seq: str, charge: int, runName: str | None = None, includeBoundaries: bool = True, include_ms1: bool = False, smooth: bool = True, sgolay_polynomial_order: int = 3, sgolay_frame_length: int = 11, **kwargs) bokeh.plotting.figure.Figure

Plots a chromatogram for a given peptide sequence and charge state for a given run

Parameters:
  • seq (str) – Peptide sequence

  • charge (int) – Charge state

  • runName (str) – Name of the run to extract the chromatogram from

  • includeBoundaries (bool, optional) – Whether to include peak boundaries. Defaults to True.

  • include_ms1 (bool, optional) – Whether to include MS1 data. Defaults to False.

  • smooth (bool, optional) – Whether to smooth the chromatogram. Defaults to True.

  • sgolay_polynomial_order (int, optional) – Order of the polynomial to use for smoothing. Defaults to 3.

  • sgolay_frame_length (int, optional) – Frame length to use for smoothing. Defaults to 11.

  • scale_intensity (bool, optional) – Whether to scale the intensity of the chromatogram such that all chromatograms are individually normalized to 1. Defaults to False.

Returns:

Bokeh figure object

Return type:

bokeh.plotting.figure.Figure