.extract_peptide_groups

proteopy.pp.extract_peptide_groups(adata, peptide_col='peptide_id', inplace=True)[source]

Create a new column adata.var['peptide_group'] with all overlapping (substring) peptide_ids joined by ';' for each row in adata.var.

Parameters:
  • adata (AnnData) – Must have adata.var[peptide_col] with peptide sequences (already normalized).

  • peptide_col (str) – Column in adata.var containing peptide sequences.

  • inplace (bool) – If True, modifies adata in place. If False, returns a modified copy.

Returns:

  • If inplace=True (None)

  • If inplace=False (AnnData (modified copy))