{"id":19714793,"url":"https://github.com/baranzinilab/graphrain","last_synced_at":"2025-05-07T20:44:13.942Z","repository":{"id":133783139,"uuid":"592595490","full_name":"BaranziniLab/graphRAIN","owner":"BaranziniLab","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-28T05:21:11.000Z","size":476,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-07T20:44:08.035Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BaranziniLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-24T04:26:04.000Z","updated_at":"2025-02-04T10:02:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"38f37950-8d41-4411-a8d9-1252ece1836f","html_url":"https://github.com/BaranziniLab/graphRAIN","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaranziniLab%2FgraphRAIN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaranziniLab%2FgraphRAIN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaranziniLab%2FgraphRAIN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaranziniLab%2FgraphRAIN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaranziniLab","download_url":"https://codeload.github.com/BaranziniLab/graphRAIN/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252954141,"owners_count":21830894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T22:35:55.692Z","updated_at":"2025-05-07T20:44:13.916Z","avatar_url":"https://github.com/BaranziniLab.png","language":"Python","readme":"# graphRAIN\n\nThis repository holds the script for graphRAIN algorithm - algorithm that creates explainable node embeddings of a graph. \n\n## Introduction\n\nGraphRAIN stands for Graph Relational Attribute Integrated Node-embedding\n\nThis generates embedding vectors for nodes in a graph by incorporating the attributes hanging from the relationship between the nodes. Since the algorithm normalizes the relational attributes, this works for both heterogeneous and homogeneous graphs.\n\n## How to use\n\nFollowing snippet shows how to use this package:\n\n```\nfrom embedding import RAIN\n\nNCORES = \u003cnumber of cores for parallel processing\u003e\nNBATCH = \u003cin how many batches should the final embedding matrix to be saved\u003e\n\nmetadata_dict = dict(\n    edge_path = /path/to/edges.tsv,\n    edge_metadata_path = /path/to/edge_metadata.tsv,\n    node_metadata_path = /path/to/node_metadata.tsv,\n    embedding_save_path = /path/to/save/output/files,\n    graph_path = embedding_save_path/name_of_graph.joblib,    \n)\n\nembedding_nodeId_list = List of unique nodeIds of graph whose embedding vectors need to be computed\n\nrain = RAIN()\nrain.batch_embedding(\n        metadata_dict = metadata_dict,\n        embedding_nodeId_list = embedding_nodeId_list,\n        ncores = NCORES,\n        nbatch = NBATCH\n    )\n```\n**Refer to [run_rain.py](https://github.com/BaranziniLab/graphRAIN/blob/main/run_rain.py) for a full example which you can run in your machine.**\n\n## Sample data provided\n\n[Sample data](https://github.com/BaranziniLab/graphRAIN/tree/main/sample_data) provided is a network of disease and symptom nodes. This is a subnetwork taken from a bigger network called [SPOKE](https://spoke.rbvi.ucsf.edu/).\nThe objective of providing this sample data is to let user know about the format of the input files that one should provide to run RAIN algorithm.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaranzinilab%2Fgraphrain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaranzinilab%2Fgraphrain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaranzinilab%2Fgraphrain/lists"}