.proteins_from_csv

proteopy.ann.proteins_from_csv(adata, file_path, *, sep=',', file_protein_col='protein_id', suffix='_annotated', inplace=True)[source]

Annotate protein-level metadata from a CSV file.

Parameters:
  • adata (AnnData) – AnnData object containing proteomics data with a protein_id column in adata.var.

  • file_path (str | Path) – Path to the CSV file holding additional protein annotations.

  • sep (str, optional) – Column delimiter passed to pandas.read_csv().

  • file_protein_col (str, optional) – Column in the CSV file used to match entries by protein ID.

  • suffix (str, optional) – Suffix applied to colliding column names passed through to proteopy.ann.base_anndata.var().

  • inplace (bool, optional) – Forwarded to proteopy.ann.base_anndata.var(). If True, modify adata in-place and return None.

Returns:

Updated AnnData when inplace is False; otherwise None.

Return type:

AnnData or None