proteometer.parse_metadata#

Functions#

group_columns(→ tuple[list[list[str]], list[str]])

Generate the control and treatment group columns from the metadata.

int_columns(→ list[str])

Return a list of all the intensity columns in the metadata.

anova_columns(→ list[str])

Return a list of columns for ANOVA analysis excluding pooled channel samples.

t_test_groups(→ list[proteometer.stats.TTestGroup])

Generate the user-defined pairwise t-test groups from the metadata.

Module Contents#

proteometer.parse_metadata.group_columns(metadata: pandas.DataFrame, par: proteometer.params.Params) tuple[list[list[str]], list[str]][source]#

Generate the control and treatment group columns from the metadata.

Parameters:
  • metadata (pd.DataFrame) – The metadata DataFrame with column names specified in par.

  • par (Params) – The parameters object with the following attributes: - metadata_group_col: Column name for group. - metadata_sample_col: Column name for sample. - metadata_condition_col: Column name for condition. - metadata_control_condition: Control condition name.

Returns:

A tuple with the control and treatment

group information. The first element is a list of lists, where each inner list contains the sample columns for each group. The second element is a list of group names. Control groups are first, followed by treatment groups.

Return type:

tuple[list[list[str]], list[str]]

proteometer.parse_metadata.int_columns(metadata: pandas.DataFrame, par: proteometer.params.Params) list[str][source]#

Return a list of all the intensity columns in the metadata.

Parameters:
  • metadata (pd.DataFrame) – The metadata DataFrame with column names specified in par.

  • par (Params) – The parameters object with the following attributes: - metadata_sample_col: Column name for sample.

Returns:

A list of all the intensity columns in the metadata.

Return type:

list[str]

proteometer.parse_metadata.anova_columns(metadata: pandas.DataFrame, par: proteometer.params.Params) list[str][source]#

Return a list of columns for ANOVA analysis excluding pooled channel samples.

Parameters:
  • metadata (pd.DataFrame) – The metadata DataFrame with column names specified in par.

  • par (Params) – The parameters object with attributes: - metadata_condition_col: Column name for condition. - pooled_chanel_condition: Condition name for pooled channel. - metadata_group_col: Column name for group. - metadata_sample_col: Column name for sample.

Returns:

A list of sample columns excluding those in pooled channel groups.

Return type:

list[str]

proteometer.parse_metadata.t_test_groups(metadata: pandas.DataFrame, par: proteometer.params.Params) list[proteometer.stats.TTestGroup][source]#

Generate the user-defined pairwise t-test groups from the metadata.

Parameters:
  • metadata (pd.DataFrame) – The metadata DataFrame with column names specified in par.

  • par (Params) – The parameters object with the following attributes: - metadata_group_col: Column name for group. - metadata_sample_col: Column name for sample. - ttest_pairs: List of tuples containing the user-defined control and treatment group pairs.

Returns:

A list of TTestGroup objects with the user-defined pairwise t-test groups.

Return type:

list[TTestGroup]