pyproteonet.io.io.read_mapped_dataframe
- pyproteonet.io.io.read_mapped_dataframe(df: DataFrame, molecule: str, sample_columns: List[str], molecule_columns: List[str] | None = None, id_column: str | None = None, result_column_name: str = 'abundance', mapping_column: str | None = None, mapping_sep: str = ',', mapping_molecule: str = 'protein', mapping_name='peptide-protein') Dataset
Reads a dataframe containing a mapping as column with comma separated ids of the mapped molecule.
- Parameters:
df (pd.DataFrame) – The input dataframe.
molecule (str) – The name of the molecule column in the dataframe.
sample_columns (List[str]) – The list of sample columns in the dataframe.
molecule_columns (Optional[List[str]], optional) – The list of molecule columns in the dataframe. Defaults to None.
id_column (Optional[str], optional) – The name of the ID column in the dataframe. Defaults to None.
result_column_name (str, optional) – The name of the result column in the dataframe. Defaults to “abundance”.
mapping_column (Optional[str], optional) – The name of the mapping column in the dataframe. Defaults to None.
mapping_sep (str, optional) – The separator used in the mapping column. Defaults to “,”.
mapping_molecule (str, optional) – The name of the molecule in the mapping column. Defaults to “protein”.
mapping_name (str, optional) – The name of the mapping. Defaults to “peptide-protein”.
- Returns:
The converted Dataset object.
- Return type: