Skip to content

pyNBS.pyNBS_core.qnorm

Justin Huang edited this page Jan 26, 2018 · 3 revisions

This is a helper function that performs row-wise quantile normalization on a data matrix. The code for this function was adapted from this GitHub code which implements the method described here. This step typically follows the network propagation step in the NBS algorithm. The general steps performed by this quantile normalization function is as follows:

Steps to construct quantile normalized data:

  1. Rank each gene's value (columns) for each patient (rows).
  2. Average the value of each column and assign a rank to each averaged value for each gene.
  3. Replace the rank values of each column for each row with the associated average value for each rank from (2) for each row.

Function Call:

qnorm(data)

Parameters:

  • data (required, pandas.DataFrame): A patients-by-genes pandas DataFrame that contains either the binary or propagated somatic mutation profiles of patients to be quantile normalized.

Returns:

  • qnorm_data (pandas.DataFrame): The quantile normalized patients-by-genes pandas data DataFrame.

Additional notes about this function:

This function is not required to perform the NBS algorithm specifically, but this function is called within the NBS_single function. The quantile normalization step can be skipped in the NBS_single function by setting 'qnorm_data' to 'False' in the **kwargs dictionary.

Clone this wiki locally