single_mol

Submodules

Package Contents

Functions

fig2a(mzml_file, bin_rt_list, bin_mz_list[, manu_mzml])

Creates the Figure 2a heatmap using an mzML file and binning lists.

fig2a_insert(kro_file, elib_file)

Creates the Figure 2a histogram insert using a Kronik file and EncyclopeDIA elib.

fig2b(mzml_file, hk_file, elib_file[, scan_num, id_peaks])

Creates the Figure 2b plot of identified and unidentified MS1 peaks.

fig2c(mzml_file, hk_file, elib_file)

Creates the Figure 2c plot of Total Ion Current (TIC)

fig2d(mzml_file, hk_file, elib_file)

Creates the Figure 2d plot of total ions

Attributes

__version__

single_mol.__version__
single_mol.fig2a(mzml_file: str, bin_rt_list: List[float], bin_mz_list: List[float], manu_mzml: bool = False)[source]

Creates the Figure 2a heatmap using an mzML file and binning lists.

Parameters:
  • mzml_file (str) – The input mzML file.

  • bin_rt_list (List[float]) – List of retention time bin edges.

  • bin_mz_list (List[float]) – List of m/z bin edges.

  • manu_mzml (bool) – Boolean whether the mzML was used in the manuscript to determine if a red line should be plotted like in the manuscript.

Examples

>>> import msions.utils as ustils
>>> from single_mol import fig2a
>>> rt_bin_size = 0.25
>>> rt_bin_mult = 1
>>> rt_start = 0
>>> rt_end = 100
>>> bin_rt_list = msutils.bin_list(rt_start, rt_end, rt_bin_size, rt_bin_mult)
>>> mz_bin_size = 4
>>> mz_bin_mult = 1.0005
>>> mz_start = 399
>>> mz_end = 1005
>>> bin_mz_list = msutils.bin_list(mz_start, mz_end, mz_bin_size, mz_bin_mult)
>>> fig2a("test.mzML", bin_rt_list, bin_mz_list, manu_mzml=True)
single_mol.fig2a_insert(kro_file: str, elib_file: str)[source]

Creates the Figure 2a histogram insert using a Kronik file and EncyclopeDIA elib.

Parameters:
  • kro_file (str) – The input Kronik file.

  • elib_file (str) – The input EncyclopeDIA elib file.

Examples

>>> from single_mol import fig2a_insert
>>> fig2a_insert("test.kro", "test.elib")
single_mol.fig2b(mzml_file, hk_file, elib_file, scan_num=170933, id_peaks=7)[source]

Creates the Figure 2b plot of identified and unidentified MS1 peaks.

Also prints the highest intensity identified peaks.

Parameters:
  • mzml_file (str) – The input mzML file.

  • hk_file (str) – The input Hardklor file.

  • elib_file (str) – The input EncyclopeDIA elib file.

  • scan_num (int) – Scan number of plotted peaks.

  • id_peaks (int) – Number of highest intensity identified peaks to print information about.

Examples

>>> from single_mol import fig2b
>>> fig2b("test.mzML", "test.hk", "test.elib")
single_mol.fig2c(mzml_file, hk_file, elib_file)[source]

Creates the Figure 2c plot of Total Ion Current (TIC) and identified ion current.

Also prints the values and percentage identified.

Parameters:
  • mzml_file (str) – The input mzML file.

  • hk_file (str) – The input Hardklor file.

  • elib_file (str) – The input EncyclopeDIA elib file.

Examples

>>> from single_mol import fig2c
>>> fig2c("test.mzML", "test.hk", "test.elib")
single_mol.fig2d(mzml_file, hk_file, elib_file)[source]

Creates the Figure 2d plot of total ions and identified ions.

Also prints the values and percentage identified.

Parameters:
  • mzml_file (str) – The input mzML file.

  • hk_file (str) – The input Hardklor file.

  • elib_file (str) – The input EncyclopeDIA elib file.

Examples

>>> from single_mol import fig2d
>>> fig2d("test.mzML", "test.hk", "test.elib")