GOPCARun class

class gopca.GOPCARun(sig_matrix, gopca_version, timestamp, exec_time, expression_hash, config_hashes, genes, samples, W, Y)

A GO-PCA run.

A GO-PCA “run” consists of metadata (e.g., GO-PCA version, timestamp), configuration data, intermediate results, and the signatures generated.

The run does not contain the input data itself (i.e., the original expression matrix and and the list of gene sets). This is so that the file size of the output file can be kept small.

The run does contain all other information necessary to reproduce the results from the raw data, including the parameter settings used and hash values for the input data. Furthermore, it contains some intermediate results (e.g., the PCA loadings matrix and the PC scores) which allow for some additional analyses that can help gain insight into the data and the signatures generated.

Parameters:
  • sig_matrix (GOPCASignatureMatrix) – The GO-PCA signature matrix generated.
  • gopca_version (str) – The GO-PCA version.
  • timestamp (str) – The timestamp.
  • exec_time (float) – The execution time (in seconds).
  • expression_hash (str) – Hash value for the expression input data.
  • config_hashes (list of str) – Hash values for the configuration input data.
  • genes (Iterable of str) – The genes in the analysis.
  • samples (Iterable of str) – The samples in the analysis.
  • W (numpy.ndarray (np.float64)) – The PCA loading matrix; shape = (len(genes) x # PCs). There must be a 1-to-1 correspondence between genes and the rows of W.
  • Y (numpy.ndarray (np.float64)) – The PC score matrix; shape = (len(samples) x # PCs). There must be a 1-to-1 correspondence between samples and the rows of Y.
classmethod read_pickle(path)

Read a run from a pickle file.

Parameters:path (str) – The pickle file.
Returns:
Return type:None
write_pickle(path)

Save the current object to a pickle file.

Parameters:path (str) – The output file.
Returns:
Return type:None