msions.encyclopedia
This module contains functions that are useful for interacting with EncyclopeDIA files in Python.
Module Contents
Functions
|
Create a pandas DataFrame from an EncyclopeDIA elib output |
|
Match EncyclopeDIA elib output to Hardklor output |
- msions.encyclopedia.dia_df(input_elib: str) pandas.DataFrame[source]
Create a pandas DataFrame from an EncyclopeDIA elib output
- Parameters:
input_elib (str) – The input elib file.
- Returns:
A pandas DataFrame containing PrecursorMz, PrecursorCharge, PeptideModSeq, PeptideSeq, RtInSeconds, RTInSecondsStart, and RTInSecondsStop columns.
- Return type:
pd.DataFrame
Examples
>>> from msions.encyclopedia import dia_df >>> dia_df("test.elib")
- msions.encyclopedia.match_hk(ref_row: pandas.Series, other_df: pandas.DataFrame) int[source]
Match EncyclopeDIA elib output to Hardklor output
- Parameters:
ref_row (pd.Series) – The row of data to match.
other_df (pd.DataFrame) – The other DataFrame to match.
- Returns:
Number of rows in match DataFrame.
- Return type:
int
Examples
>>> from msions.encyclopedia import match_hk >>> import msions.hardklor as hk >>> import msions.encyclopedia as encyclo >>> hk_df = hk.hk2df("test.hk") >>> encyclo_df = encyclo.dia_df("test.elib") >>> hk_df["in_encyclo"] = hk_df.apply(match_hk, axis=1, other_df=encyclo_df)