Note
Go to the end to download the full example code. or to run this example in your browser via Binder
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:250: 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
import requests
from io import StringIO
pd.options.plotting.backend = "ms_plotly"
# download the file for example plotting
url = "https://github.com/OpenMS/pyopenms_viz/releases/download/v0.1.5/ionMobilityTestChromatogramDf.tsv"
response = requests.get(url)
response.raise_for_status() # Check for any HTTP errors
df = pd.read_csv(StringIO(response.text), sep="\t")
df.plot(
kind="chromatogram",
x="rt",
y="int",
by="Annotation",
legend=dict(bbox_to_anchor=(1, 0.7)),
)
Total running time of the script: (0 minutes 0.195 seconds)