Process

padua.process.apply_experimental_design(df, f, prefix='Intensity ')[source]

Load the experimental design template from MaxQuant and use it to apply the label names to the data columns.

Parameters:
  • df
  • f – File path for the experimental design template
  • prefix
Returns:

dt

padua.process.build_index_from_design(df, design, remove=None, types=None, axis=1, auto_convert_numeric=True, use_unmatched_index=True)[source]

Build a MultiIndex from a design table.

Supply with a table with column headings for the new multiindex and a index containing the labels to search for in the data.

Parameters:
  • df
  • design
  • remove
  • types
  • axis
  • auto_convert_numeric
Returns:

padua.process.build_index_from_labels(df, indices, remove=None, types=None, axis=1)[source]

Build a MultiIndex from a list of labels and matching regex

Supply with a dictionary of Hierarchy levels and matching regex to extract this level from the sample label

Parameters:
  • df
  • indices – Tuples of indices (‘label’,’regex’) matches
  • strip – Strip these strings from labels before matching (e.g. headers)
  • axis=1 – Axis (1 = columns, 0 = rows)
Returns:

padua.process.combine_expression_columns(df, columns_to_combine, remove_combined=True)[source]

Combine expression columns, calculating the mean for 2 columns

Parameters:
  • df – Pandas dataframe
  • columns_to_combine – A list of tuples containing the column names to combine
Returns:

padua.process.expand_side_table(df)[source]

Perform equivalent of ‘expand side table’ in Perseus by folding Multiplicity columns down onto duplicate rows

The id is remapped to UID___Multiplicity, which is different to Perseus behaviour, but prevents accidental of non-matching rows from occurring later in analysis.

Parameters:df
Returns:
padua.process.fold_columns_to_rows(df, levels_from=2)[source]

Take a levels from the columns and fold down into the row index. This destroys the existing index; existing rows will appear as columns under the new column index

Parameters:
  • df
  • levels_from – The level (inclusive) from which column index will be folded
Returns:

padua.process.get_unique_indices(df, axis=1)[source]
Parameters:
  • df
  • axis
Returns:

padua.process.numeric(s)[source]
Parameters:s
Returns:
padua.process.strip_index_labels(df, strip, axis=1)[source]
Parameters:
  • df
  • strip
  • axis
Returns:

padua.process.transform_expression_columns(df, fn=<Mock id='139759960052512'>, prefix='Intensity ')[source]

Apply transformation to expression columns.

Default is log2 transform to expression columns beginning with Intensity

Parameters:
  • df
  • prefix – The column prefix for expression columns
Returns: