def get_publications(gene_names, save_json_name=None):
    """Return evidence publications for interaction between the given genes.

    Parameters
    ----------
    gene_names : list[str]
        A list of gene names (HGNC symbols) to query interactions between.
        Currently supports exactly two genes only.
    save_json_name : Optional[str]
        A file name to save the raw BioGRID web service output in. By default,
        the raw output is not saved.

    Return
    ------
    publications : list[Publication]
        A list of Publication objects that provide evidence for interactions
        between the given list of genes.
    """
    if len(gene_names) != 2:
        logger.warning('Other than 2 gene names given.')
        return []
    res_dict = _send_request(gene_names)
    if not res_dict:
        return []
    if save_json_name is not None:
        # The json module produces strings, not bytes, so the file should be
        # opened in text mode
        with open(save_json_name, 'wt') as fh:
            json.dump(res_dict, fh, indent=1)
    publications = _extract_publications(res_dict, gene_names)
    return publications
def get_publications ( gene_names , save_json_name = None ) : if len ( gene_names ) != 2 : logger . warning ( 'Other than 2 gene names given.' ) return [ ] res_dict = _send_request ( gene_names ) if not res_dict : return [ ] if save_json_name is not None : with open ( save_json_name , 'wt' ) as fh : json . dump ( res_dict , fh , indent = 1 ) publications = _extract_publications ( res_dict , gene_names ) return publications
Return evidence publications for interaction between the given genes.

    Parameters
    ----------
    gene_names : list[str]
        A list of gene names (HGNC symbols) to query interactions between.
        Currently supports exactly two genes only.
    save_json_name : Optional[str]
        A file name to save the raw BioGRID web service output in. By default,
        the raw output is not saved.

    Return
    ------
    publications : list[Publication]
        A list of Publication objects that provide evidence for interactions
        between the given list of genes.