liana.resource.translate_resource

liana.resource.translate_resource#

liana.resource.translate_resource(resource, map_df, columns=None, **kwargs)#

Generate orthologs for multiple columns in a DataFrame.

Parameters:
  • resource (DataFrame) – Input DataFrame.

  • map_df (DataFrame) – DataFrame with orthology mappings, where the first column is the source and the second column is the target for mapping.

  • columns (list[str] (default: None)) – List of column names to translate.

  • **kwargs – Additional arguments for liana.utils.translate_column.

Return type:

DataFrame

Returns:

Resulting DataFrame with translated columns.