mioXpektron.detection.check_overlapping_peaks2

mioXpektron.detection.check_overlapping_peaks2(data_dir, file_pattern, mz_min, mz_max, norm_tic=False, alpha=0.18, bin_width=0.001, show_median=True, show_group_cumulative=True)[source]

Overlay spectra with two colors (Cancer vs Control) inferred from file names.

Parameters:
  • data_dir (str) – Directory containing spectra.

  • file_pattern (str) – Glob pattern (e.g., “*.txt”).

  • mz_min (float) – m/z window to visualize.

  • mz_max (float) – m/z window to visualize.

  • norm_tic (bool, default False) – Normalize each spectrum by its TIC prior to plotting.

  • alpha (float, default 0.18) – Line transparency for individual spectra.

  • bin_width (float, default 0.001) – Common grid step for interpolation (used for medians/cumulative plots).

  • show_median (bool, default True) – If True, overlay per-group median curves (thicker lines).

  • show_group_cumulative (bool, default True) – If True, plot per-group cumulative intensity curves on a separate figure.

Notes

  • Group detection is based on substrings in filenames: “_CC” (Cancer), “_CT” (Control).

  • Files without these markers are labeled “Unknown” and plotted in grey.