Chromatogram ms_plotly#

This example shows a chromatogram colored by mass trace. Since all fragment ion spectra coelute this provides strong evidence that the peptide is present.

/home/runner/work/pyopenms_viz/pyopenms_viz/pyopenms_viz/_core.py:571: UserWarning:

Duplicate data detected, data will not be aggregated which may lead to unexpected plots. To enable aggregation set `aggregate_duplicates=True`.



import pandas as pd
from pyopenms_viz.util import download_file

pd.options.plotting.backend = "ms_plotly"

url = "https://zenodo.org/records/17904352/files/ionMobilityTestChromatogramDf.tsv?download=1"
local_path = "ionMobilityTestChromatogramDf.tsv"
download_file(url, local_path)
df = pd.read_csv(local_path, sep="\t")

df.plot(
    kind="chromatogram",
    x="rt",
    y="int",
    by="Annotation",
    legend_config=dict(bbox_to_anchor=(1, 0.7)),
)

Total running time of the script: (0 minutes 2.017 seconds)

Gallery generated by Sphinx-Gallery