---------------------------------------------------------------------- This is the API documentation for the harmonizome library. ---------------------------------------------------------------------- ## Core API Public Harmonizome client objects Harmonizome() Entity ## Harmonizome Methods Methods for the Harmonizome class get(entity: str, name: Optional[str] = None, start_at: Optional[int] = None) -> dict[str, typing.Any] Returns a single entity or a list, depending on if a name is provided. If no name is provided and start_at is specified, returns a list starting at that cursor position. next(response: dict[str, typing.Any]) -> dict[str, typing.Any] Returns the next set of entities based on a previous API response. download(datasets: Optional[list[str]] = None, what: Optional[list[str]] = None) -> collections.abc.Iterator[str] For each dataset, creates a directory and downloads files into it. download_df(datasets: Optional[list[str]] = None, what: Optional[list[str]] = None, sparse: bool = False, **kwargs: Any) -> collections.abc.Iterator[pandas.DataFrame] get_gene_functional_annotations(gene_symbol: str, datasets: Optional[list[str]] = None) -> dict[str, typing.Any] Get functional annotations for a gene using the Harmonizome API. This method uses the API directly without downloading any files. It leverages the showAssociations=true parameter to get functional associations for a gene. Args: gene_symbol: Gene symbol (e.g., 'BRCA1', 'STAT3') datasets: List of dataset names to search. If None, searches all datasets. Returns: Dictionary formatted like Harmonizome web interface with: - gene_info: Basic gene information - functional_associations: List of datasets with associations get_gene_with_associations(gene_symbol: str) -> dict[str, typing.Any] Get gene information with associations using the API. This uses the showAssociations=true parameter to get functional associations directly from the API without downloading files. Args: gene_symbol: Gene symbol Returns: Dictionary with gene info and associations download_gene_functional_annotations(gene_symbol: str, datasets: Optional[list[str]] = None) -> dict[str, typing.Any] Download and get all functional annotations for a gene across specified datasets. This method downloads the necessary data files and extracts associations for the specified gene from the gene-attribute matrices. Args: gene_symbol: Gene symbol (e.g., 'BRCA1', 'STAT3') datasets: List of dataset names to search. If None, searches all datasets. Returns: Dictionary with dataset names as keys and annotation data as values. get_gene_associations_summary(gene_symbol: str, datasets: Optional[list[str]] = None, use_download: bool = False) -> dict[str, typing.Any] Get a summary of all functional associations for a gene. Args: gene_symbol: Gene symbol datasets: List of dataset names to search. If None, searches all datasets. use_download: If True, downloads files to get associations. If False, uses API. Returns: Dictionary with summary statistics and dataset breakdown get_gene_functional_associations_formatted(gene_symbol: str, datasets: Optional[list[str]] = None, use_download: bool = False) -> dict[str, typing.Any] Get functional associations for a gene in Harmonizome web interface format. This method returns data structured exactly like the Harmonizome web interface, with datasets, summaries, and categorized associations with scores. Args: gene_symbol: Gene symbol (e.g., 'STAT3', 'BRCA1') datasets: List of dataset names to search. If None, searches all datasets. use_download: If True, downloads files to get associations. If False, uses API. Returns: Dictionary formatted like Harmonizome web interface with: - gene_info: Basic gene information - functional_associations: List of datasets with associations get_gene_data(gene_symbol: str, use_cache: bool = False) -> harmonizome.harmonizome.GeneData