Skip to content

pyNBS.pyNBS_core

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

pyNBS_core is a module that contains functions for executing many of the key internal steps used in the pyNBS algorithm. This module is wrapped by the NBS_single function.

Functions in this module

This module contains the following functions (bolded functions are key pyNBS functions):

  • mixed_netNMF: This is the main function that performs the network-regularized non-negative matrix factorization (netNMF) at the center of the pyNBS algorithm.

  • mixed_netNMF_debug: This is the same function as mixed_netNMF with the exception that this function reports many more internal variables that can be tracked during the multiplicative update steps of mixed_netNMF.

  • network_inf_KNN_glap: This function constructs a K-nearest neighbors network using a network's influence matrix (not to be confused with the "network kernel" from random-walk network propagation). The graph laplacian of the network constructed by this function is used as the regularizer in mixed_netNMF.

  • qnorm: This is a helper function that performs quantile normalization (row-wise) on a given pandas DataFrame.

  • subsample_sm_mat: This function is used for subsampling the binary somatic mutation data in the context of the genes in the given molecular network. This function returns a reduced binary somatic mutation matrix for pyNBS.

Clone this wiki locally