structboost.read_encoder_weights

structboost.read_encoder_weights(path, *, format=None)[source]

Read an encoder weight matrix written by structboost.write_encoder_weights().

Parameters:
  • path (str | Path) – Source file. Format is inferred from the suffix unless format is given.

  • format (str | None) – "parquet" or "text". Inferred from the suffix when omitted.

Returns:

  • DataFrame of shape (n_genes, latent_dim) indexed by the join identifier —

  • gene_id when the file carries Ensembl accessions, otherwise

  • gene_symbol. Any symbol column is preserved in frame.attrs["gene_symbol"]

  • rather than as a data column, so every remaining column is a latent dimension.

  • Provenance is available in frame.attrs["metadata"] and the join key used in

  • frame.attrs["join_key"].

Return type:

pd.DataFrame