rnalysis.filtering.CountFilter.average_replicate_samples

CountFilter.average_replicate_samples(sample_grouping: GroupedColumns, new_column_names: Literal['auto'] | List[str] = 'auto', function: Literal['mean', 'median', 'geometric_mean'] = 'mean', inplace: bool = True) CountFilter

Average the expression values of gene expression for each group of replicate samples. Each group of samples (e.g. biological/technical replicates)

Parameters:
  • sample_grouping (nested list of column names) – grouping of the samples into conditions. Each grouping should containg all replicates of the same condition. Each condition will be averaged separately.

  • new_column_names (list of str or 'auto' (default='auto') – names to be given to the columns in the new count matrix. Each new name should match a group of samples to be averaged. If `new_column_names`=’auto’, names will be generated automatically.

  • function ('mean', 'median', or 'geometric_mean' (default='mean')) – the function which will be used to average the values within each group.

  • inplace (bool (default=True)) – If True (default), averaging will be applied to the current CountFilter object. If False, the function will return a new CountFilter instance and the current instance will not be affected.