pyproteonet.aggregation.partner_aggregation

Aggregates the values of partner molecule (e.g. peptides) into a molecule value. Partner molecule are determined according to a mapping.

param dataset:

Dataset to run aggregation on.

type dataset:

Dataset

param molecule:

The molecule values should be aggregated for (e.g. protein).

type molecule:

str

param partner_column:

The columns of the partner molecule containing abundance values that should be aggregated.

type partner_column:

str

param mapping:

Either the name of the aggregated molecule (e.g. peptide) or the name of the mapping linking the molecule from above to a partner molecule (e.g. peptide-protein mapping)

type mapping:

str

param method:

Either a function that takes a pandas groupby object and returns a series or one of the following strings: ‘mean’, ‘sum’, ‘median’, ‘min’, ‘max’. Defaults to ‘sum’.

type method:

Union[Callable[[SeriesGroupBy], pd.Series], str], optional

param only_unique:

Only consider unique peptides and ignore shared peptides. Defaults to True.

type only_unique:

bool, optional

param result_column:

If given aggregation results are stored in this alue column of the molecule. Defaults to None.

type result_column:

Optional[str], optional

param is_log:

Wheter the input values are logarithmized. Defaults to False.

type is_log:

bool, optional

returns:

A pandas series with sample id and molecule id as multiindex containing the aggregated values.

rtype:

pd.Series