Skip to content

pyNBS.network_propagation.fast_random_walk

Tongqiu (Iris) Jia edited this page Jan 29, 2018 · 3 revisions

This is a helper function specifically to perform the matrix operation of calculating the propagated profiles of a single connected component in the molecular network. The reason that we perform network propagation on separate network connected components is due to the potentially low-rank nature of adjacency matrices that are sparsely connected with many separated components. This has been observed to cause trouble in the matrix inversion step of this network propagation implementation. While network_propagation is the high-level function called, this function actually performs the matrix operation to calculate the network propagated somatic mutation profiles over connected components of the overall molecular network, defined again as: eqn This function also concatenates the new propagated values over the genes of the connected component to the already computed propagated profiles of samples over other connected components. This a required helper function called inside network_propagation.


Function Call:

fast_random_walk(alpha, binary_mat, subgraph_norm, prop_data_prev)

Parameters:

  • alpha (required, float, default=0.7): Propagation constant to use in the propagation of mutations over molecular network. Range is 0.0-1.0 exclusive. See network_propagation for more details.
  • binary_mat (required, numpy.ndarray): Binary somatic matrix with only columns for only genes the network genes to be propagated over. Column order must be the same as row and column order of subgraph_norm. Row order must match that of prop_data.
  • subgraph_norm (required, numpy.ndarray): Array of normalized adjacency matrix of graph or subgraph binary mutations will be propagated over. Recommended to be constructed using normalize_network function.
  • prop_data_prev (required, numpy.ndarray): Array of previously computed propagated profiles over other subgraphs in the network. If no other propagated profiles have been computed, network_propagation will pass a single empty column vector with size equal to the number of rows in binary_mat. This column will be removed after all subgraphs have been propagated over in network_propagation.

Returns:

  • prop_data_add (pandas.DataFrame): The network-smoothed somatic mutation profiles over the provided network, or network subgraph appended to previously computed somatic mutation profiles prop_data_prev (if applicable).
Clone this wiki locally