Skip to content

pyNBS.consensus_clustering.Hlist_constructor_from_folder

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

This is a helper function that constructs a valid "Hlist" from a folder containing multiple H matrices to be passed to consensus_hclust_hard to use.


Function Call:

Hlist_constructor_from_folder(folder, ext='.csv', normalize_H=False, verbose=False)

Parameters:

  • folder (required, str): This is the file directory in which the "H matrices" are saved.
  • ext (optional, str, default='.csv'): File extension of the saved "H matrices" in folder. This is used as the indicator for which files for this function to load.

Returns:

  • Hlist (list): A list of "H matrices" that can be further used by consensus_hclust_hard function. Each element of the Hlist should be the H matrix produced from mixed_netNMF. Each "H matrix" is a Pandas DataFrame of size patients/samples-by-k, where k is the number of clusters.

Additional notes about this function:
  • Each file loaded by this function must be a comma-separated file. Other delimiters for the H matrix files are not currently supported.
Clone this wiki locally