sakura.utils.logger.Logger.dump_latent_to_csv

Logger.dump_latent_to_csv(controller_output, dump_main=True, dump_lat_pre=False, dump_pheno=True, dump_pheno_out=False, selected_pheno=None, dump_signature=True, dump_signature_out=False, selected_signature=None, dump_re_x=False, re_x_col_naming='dimid', rownames=None, colnames=None, path='latent.csv', compression='none')

Export latent representations from the output of the controller to structured storage.

Parameters:
  • controller_output (dict) – Forward pass results containing latent components returned by the controller

  • dump_main (bool, optional) – Whether to export main latent space, defaults to True

  • dump_lat_pre – Whether to export pre-encoder latent space, defaults to False

  • dump_pheno (bool, optional) – Whether to export phenotype latent space, defaults to True

  • dump_pheno_out (bool, optional) – Whether to export output of the phenotype module, defaults to False

  • selected_pheno (list[str]) – A list containing phenotype ids to be dumped

  • dump_signature (bool, optional) – Whether to export signature latent space, defaults to False

  • dump_signature_out (bool, optional) – Whether to export output of the signature module, defaults to False

  • selected_signature (list[str]) – a list containing signature ids to be dumped

  • dump_re_x (bool, optional) – Whether to export output of the reconstruction module, defaults to False

  • re_x_col_naming (Literal['dimid', 'genenames'], optional) – Set the column names of the reconstructed matrix, can be ‘dimid’ (by default) which means dimension id or ‘genenames’ (names of genes)

  • colnames (list-like) – Column label index to assign to DataFrame

  • rownames (list-like) – Row label index to assign to DataFrame

  • path (str, optional) – Output path for the CSV file storing, defaults to ‘latent.csv’

  • compression (Literal['none', 'gzip', 'hdf'], optional) – compression type of CSV files, can be ‘hdf’, ‘gzip’ or ‘none’ (by default)

Returns:

None