pyproteonet.aggregation.partner_top_n_mean

Aggregates the values of partner molecule (e.g. peptides) into a molecule (e.g. protein) value by averaging the abundance values of the three highest abundant partner molecules. 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 top_n:

Number of highest abundant partner molecules to consider. Defaults to 3.

type top_n:

int, 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 skip_if_less_than_n:

If True, the aggregation is skipped if there are less than n partner molecules and the aggregated values is set to NaN. Defaults to True.

type skip_if_less_than_n:

bool, 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