oktoberfest.pl.plot_pred_rt_vs_irt

oktoberfest.pl.plot_pred_rt_vs_irt(prosit_df, prosit_target, outpath, suffix)

Generate scatterplot to compare predicted indexed retention time against (aligned) experimentally observed retention time.

Parameters:
  • prosit_df (DataFrame) – mokapot / percolator input tab for rescoring with peptide property prediction

  • prosit_target (DataFrame) – mokapot / percolator target output for rescoring with peptide property prediction

  • outpath (Union[str, Path]) – the path to the location used for storing the plot without the filename

  • suffix (Union[str, Path]) – the suffix of the filename, which will be prepended by the rawfile name

Example:

>>> from oktoberfest import plotting as pl
>>> import pandas as pd
>>> # Required columns: SpecId, RT, iRT and pred_RT
>>> prosit_df = pd.DataFrame({"SpecId": ["F1-15-TAIASPEK-1-5","F1-59-LGLTKLQLH-3-9","F1-24-EFAVEVLK-2-4"],
>>>                         "RT": np.array([28.1,56.54,83.7]),
>>>                         "iRT": np.array([25.21,54.76,82.88]),
>>>                         "pred_RT": np.array([32.23,60.01,99.11])})
>>> # Required columns: PSMId, score, q-value and peptide
>>> target_df = pd.DataFrame({"PSMId": ["F1-15-TAIASPEK-1-5","F1-59-LGLTKLQLH-3-9","F1-24-EFAVEVLK-2-4"],
>>>                         "q-value": [0.005,0.003,0.002],
>>>                         "score": [0.7,0.4,0.5],
>>>                         "peptide": ["TAIASPEK","LGLTKLQLH","EFAVEVLK"]})
>>> pl.plot_pred_rt_vs_irt(prosit_df=prosit_df,
>>>                         prosit_target=target_df,
>>>                         outpath="./tests/doctests/output/",
>>>                         suffix="pred_irt_vs_irt")