{"id":29121387,"url":"https://github.com/menchelab/infowalkr","last_synced_at":"2025-06-29T16:05:56.503Z","repository":{"id":300951997,"uuid":"1007677613","full_name":"menchelab/InfoWalkR","owner":"menchelab","description":"package implementation of the MultiOme Paper","archived":false,"fork":false,"pushed_at":"2025-06-24T12:13:37.000Z","size":6059,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-24T12:33:23.714Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/menchelab.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,"zenodo":null}},"created_at":"2025-06-24T11:08:28.000Z","updated_at":"2025-06-24T12:13:40.000Z","dependencies_parsed_at":"2025-06-24T12:44:34.582Z","dependency_job_id":null,"html_url":"https://github.com/menchelab/InfoWalkR","commit_stats":null,"previous_names":["menchelab/infowalkr"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/menchelab/InfoWalkR","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/menchelab%2FInfoWalkR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/menchelab%2FInfoWalkR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/menchelab%2FInfoWalkR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/menchelab%2FInfoWalkR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/menchelab","download_url":"https://codeload.github.com/menchelab/InfoWalkR/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/menchelab%2FInfoWalkR/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262622893,"owners_count":23338704,"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":"2025-06-29T16:05:52.082Z","updated_at":"2025-06-29T16:05:56.496Z","avatar_url":"https://github.com/menchelab.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# InfoWalkR\npackage implementation of the MultiOme Paper\n\n```R\nlibrary(InfoWalkR, quietly = TRUE)\n```\n\n## Data Import\n```R\n#read in data\npath = '\u003cpath_to_your_networks\u003e'\ngraph_list = read_graphs_from_folder(path)\n\ngraph_list\n```\n\nAll edgelists are structured like this:\n```\n# Graph Type: undirected\nA\tB\nA1BG\tABCC4\nA1BG\tALB\nA1BG\tAPLP2\nA1BG\tBRPF3\n```\n\nThe Graph type flag is needed to determine whether the graph is directed or not.\nWhen a third column is present that specifies edge weight, the graph is read as a weighted graph.\nAs long as the node type is the same in the multiplex, different edge types are allowed across different layers.\n\n```R\n#test gene set\npath_gene_set = '\u003cpath_to_your_test_gene_set\u003e'\n\n# Read the TSV file\ndata \u003c- read.delim(path_gene_set, sep = \"\\t\", header = TRUE)\n\n# Extract the gene names column as a vector\n# in the example, th e\ngene_set \u003c- unlist(strsplit(data$all_genes, \";\"))\n\ngene_set\n```\n\n## Layer Selection\n\n```R\n# perform layer selection based on lcc that seed genes form\n#alpha sets the threshold for significance\nlcc_results = lcc_based_network_selection(graph_list, gene_set,\n                                          trial = 100, randomization = 'random',\n                                          alpha = 0.05)\n#pull results\nlcc_results$results\n\nlayer_weights = lcc_results$results\nsig_layers = lcc_results$significant_networks\n```\n\nThe lcc_results object contains:\n1. the dataframe containing only the significant layers and the associated z_score --\u003e this is for the layer weights (weighted_layer_df)\n2. the graph_list containing only the significant layers\n\n## Random Walk\n| Parameter       | Description                                                                                                                                                                                                                                                                                                     |\n|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| rank_aggregate  | If `TRUE`, aggregates RWR ranking results across all layers and returns summary statistics. If `FALSE`, this step is skipped.                                                                                                                                                                                |\n| rank_individual | If `TRUE`, ranks RWR results within each layer and returns results for all layers individually. If `FALSE`, this step is skipped.                                                                                                                                                                            |\n| remove_seeds    | If `TRUE`, removes seed genes from ranking. If `FALSE`, seed genes are retained in the ranking process.                                                                                                                                                                                                      |\n\nIf both rank_aggregata = FALSE and rank_individual = FALSE, the function returns the raw results for each individual layer\n\n\n```R\n#perform random walk with restart on multiplex network\n#the default is equal weights on the seed gene set\n\ninfowalk_results = weighted_multiplex_propagation(layer_weights_df = layer_weights,\n                                                    graph_list = sig_layers,\n                                                    seed_set = gene_set,\n                                                    rank_aggregate = TRUE,\n                                                    rank_individual = FALSE,\n                                                    remove_seeds = FALSE)\nhead(infowalk_results)\n```\n\n#### Description of summary statistics\n| Output              | Description                                                                                                                                                                                                                                          |\n|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| mean_arithmetic        | The arithmetic mean of visiting probabilities of a given node (gene-wise average across all layers).                                                                                                                                               |\n| mean_geometric         | Geometric mean of visiting probabilities of a given node (gene-wise geometric mean across all layers).                                                                                                                                              |\n| rank_all_geometric     | Expresses the visiting probabilities of a node across all layers (aggregated by geometric mean) as a rank. The calculation ranks the visiting probabilities of a node across all layers and then aggregates the ranks by geometric mean.   |\n| rank_each_geometric    | Expresses the visiting probabilities of a node across all layers as a rank, but the calculation first ranks the visiting probabilities for the nodes within each layer and then aggregates the result by geometric mean.                     |\n| rank_mean_arithmetic   | Expresses the aggregated visiting probabilities for each node across all layers average as rank.                                                                                                                                                   |\n| rank_mean_geometric    | Expresses the aggregated visiting probabilities for each node across all layers Geometric Avg as rank.                                                                                                                                              |\n#### Results for individual layers\n\n```R\ninfowalk_results = weighted_multiplex_propagation(layer_weights_df = layer_weights,\n                                                    graph_list = sig_layers,\n                                                    seed_set = gene_set,\n                                                    rank_aggregate = FALSE,\n                                                    rank_individual = TRUE,\n                                                    remove_seeds = FALSE)\nhead(infowalk_results)\n```\n\n## Visualizations\n\n```R\n#plot degree distribution\nplot_degree_dist(graph = sig_layers[[1]])\n```\n![image](https://github.com/user-attachments/assets/d805fe73-3c05-4582-9f71-15436f6e4f5c)\n\n\n```R\n#plot z-score ranking of layers\nplot_z_score_ranking(results_df = lcc_results$results, alpha= 0.00001)\n```\n![image](https://github.com/user-attachments/assets/2f083f0d-ae89-4c83-a215-01e53c12ff15)\n\n```R\n#plot histograms of lcc sizes\nplot_lcc_overview(results_df = lcc_results$results)\n```\n![image](https://github.com/user-attachments/assets/cea8235f-8dde-4178-8436-1b4fdc2c8f7b)\n\n\n#### pre-calculate the supra-adjacency matrix and then perform weighted multiplex propagation\nThe calculation of the normalized supra-adjacency matrix takes the most time, therefore pre-computing the supra_adjacecncy matrix might be preferable.\n\n```R\nsupra_adjacency_matrix = construct_supraadjacency_matrix(layer_weights, sig_layers)\n\ninfowalk_results = weighted_multiplex_propagation(supra_adjacency_matrix = supra_adjacency_matrix,\n                                                    layer_weights_df = layer_weights,\n                                                    graph_list = sig_layers,\n                                                    seed_set = gene_set,\n                                                    rank_aggregate = TRUE,\n                                                    rank_individual = FALSE,\n                                                    remove_seeds = FALSE)\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmenchelab%2Finfowalkr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmenchelab%2Finfowalkr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmenchelab%2Finfowalkr/lists"}