{"id":43581165,"url":"https://jiawang1209.github.io/ggNetView/","last_synced_at":"2026-02-15T06:01:10.588Z","repository":{"id":320129615,"uuid":"1080574541","full_name":"Jiawang1209/ggNetView","owner":"Jiawang1209","description":"ggNetView is an R package for network analysis and visualization. It provides flexible and publication-ready tools for exploring complex biological and ecological networks.","archived":false,"fork":false,"pushed_at":"2026-02-10T15:38:39.000Z","size":23563,"stargazers_count":97,"open_issues_count":1,"forks_count":27,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-02-10T15:46:55.489Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://jiawang1209.github.io/ggNetView/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jiawang1209.png","metadata":{"files":{"readme":"README.Rmd","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-21T14:59:33.000Z","updated_at":"2026-02-10T15:38:43.000Z","dependencies_parsed_at":"2025-10-29T07:17:15.707Z","dependency_job_id":null,"html_url":"https://github.com/Jiawang1209/ggNetView","commit_stats":null,"previous_names":["jiawang1209/ggnetview"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Jiawang1209/ggNetView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jiawang1209%2FggNetView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jiawang1209%2FggNetView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jiawang1209%2FggNetView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jiawang1209%2FggNetView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jiawang1209","download_url":"https://codeload.github.com/Jiawang1209/ggNetView/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jiawang1209%2FggNetView/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29471144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T05:26:30.465Z","status":"ssl_error","status_checked_at":"2026-02-15T05:26:21.858Z","response_time":118,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-02-04T00:00:30.411Z","updated_at":"2026-02-15T06:01:10.578Z","avatar_url":"https://github.com/Jiawang1209.png","language":"R","funding_links":[],"categories":["Network"],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# ggNetView \u003cimg src=\"man/figures/logo.png\" align=\"right\" width=\"240\" hight=\"240\" /\u003e\n\n\u003c!-- badges: start --\u003e\n\u003c!-- badges: end --\u003e\n\nggNetView is an R package for network analysis and visualization. It provides flexible and publication-ready tools for exploring complex biological and ecological networks.\n\n\n\u003c/br\u003e\n\u003c/br\u003e\n\u003c/br\u003e\n\n## Installation\n\nYou can install the development version of ggNetView from [GitHub](https://github.com/) with:\n\n```\n# install.packages(\"devtools\")\ndevtools::install_github(\"Jiawang1209/ggNetView\")\n```\n\n## Example1\n\n### Step1: load ggNetView\n\n```{r}\nlibrary(ggplot2)\nlibrary(ggnewscale)\nlibrary(ggNetView)\n```\n\n### Step2: load Data\n\n\u003e You can load raw matrix\n\n```{r}\ndata(\"otu_tab\")\n\notu_tab[1:5, 1:5]\n```\n\n\n\u003e You can load rarely matrix. Note : the rownames of  `otu_rare` is the features.\n\n```{r}\ndata(\"otu_rare\")\n\notu_tab[1:5, 1:5]\n```\n\n\u003e \n\n```{r}\ndata(\"otu_rare_relative\")\n\notu_rare_relative[1:5, 1:5]\n\n```\n\n\u003e You can load node annotation. Note : the rownames of  `tax_tab` is NULL.\n\n\n```{r}\ndata(\"tax_tab\")\n\ntax_tab[1:5, 1:5]\n```\n\n\n### Step3: create graph object\n\n```{r}\nobj \u003c- build_graph_from_mat(\n  mat = otu_rare_relative,\n  transfrom.method = \"none\",\n  method = \"WGCNA\",\n  cor.method = \"pearson\",\n  proc = \"BH\",\n  r.threshold = 0.7,\n  p.threshold = 0.05,\n  node_annotation = tax_tab\n)\n\nobj\n```\n\n\n### Step4: ggNetView to plot\n\n\u003e Basic network plot\n\n```{r fig.align='center', fig.width=10, fig.height=10}\np1 \u003c- ggNetView(\n  graph_obj = obj,\n  layout = \"gephi\",\n  layout.module = \"adjacent\",\n  group.by = \"Modularity\",\n  fill.by = \"Modularity\",\n  pointsize = c(1, 5),\n  center = F,\n  jitter = F,\n  mapping_line = F,\n  shrink = 0.9,\n  linealpha = 0.2,\n  linecolor = \"#d9d9d9\"\n) \n\np1\n```\n\n\n```\nggsave(file = \"Output/p1.pdf\",\n       plot = p1,\n       height = 10,\n       width = 10)\n```\n\n\n\u003e Add outer line in netwotk plot\n\n```{r fig.align='center', fig.width=15, fig.height=15}\np2 \u003c- ggNetView(\n  graph_obj = obj,\n  layout = \"gephi\",\n  layout.module = \"adjacent\",\n  group.by = \"Modularity\",\n  fill.by = \"Modularity\",\n  pointsize = c(1, 5),\n  center = F,\n  jitter = TRUE,\n  jitter_sd = 0.15,\n  mapping_line = TRUE,\n  shrink = 0.9,\n  linealpha = 0.2,\n  linecolor = \"#d9d9d9\",\n  add_outer = T,\n  label = T\n) \n\np2\n```\n\n\n```\nggsave(file = \"Output/p2.pdf\",\n       plot = p2,\n       height = 10,\n       width = 10)\n```\n\n\n\u003e Change the fill of node points.\n\n```{r fig.align='center', fig.width=15, fig.height=15}\np3 \u003c- ggNetView(\n  graph_obj = obj,\n  layout = \"gephi\",\n  layout.module = \"adjacent\",\n  group.by = \"Modularity\",\n  fill.by = \"Phylum\",\n  pointsize = c(1, 5),\n  center = F,\n  jitter = TRUE,\n  jitter_sd = 0.15,\n  mapping_line = TRUE,\n  shrink = 0.9,\n  linealpha = 0.2,\n  linecolor = \"#d9d9d9\",\n  add_outer = T,\n  label = T\n) \n\np3\n```\n\n\n```\nggsave(file = \"Output/p3.pdf\",\n       plot = p3,\n       height = 10,\n       width = 10)\n```\n\n\n\n\u003e Change the color of node points.\n\n\n```{r fig.align='center', fig.width=15, fig.height=15}\np4 \u003c- ggNetView(\n  graph_obj = obj,\n  layout = \"gephi\",\n  layout.module = \"adjacent\",\n  group.by = \"Modularity\",\n  fill.by = \"Phylum\",\n  color.by = \"Phylum\",\n  pointsize = c(1, 5),\n  center = F,\n  jitter = TRUE,\n  jitter_sd = 0.15,\n  mapping_line = TRUE,\n  shrink = 0.9,\n  linealpha = 0.2,\n  linecolor = \"#d9d9d9\",\n  add_outer = T,\n  label = T\n) \n\np4\n```\n\n\n```\nggsave(file = \"Output/p4.pdf\",\n       plot = p4,\n       height = 10,\n       width = 10)\n```\n\n\n\n\u003e Add node label\n\n\n```{r fig.align='center', fig.width=15, fig.height=15}\np5 \u003c- ggNetView(\n  graph_obj = obj,\n  layout = \"gephi\",\n  layout.module = \"adjacent\",\n  group.by = \"Modularity\",\n  fill.by = \"Modularity\",\n  pointsize = c(1, 5),\n  center = F,\n  jitter = TRUE,\n  jitter_sd = 0.15,\n  mapping_line = TRUE,\n  shrink = 0.9,\n  linealpha = 0.2,\n  linecolor = \"#d9d9d9\",\n  add_outer = T,\n  label = T,\n  pointlabel = \"top1\"\n) \n\np5\n```\n\n\n```\nggsave(file = \"Output/p3.pdf\", \n       plot = p5,\n       height = 10,\n       width = 10)\n```\n\n## Example2\n\n\u003e Get information of graph_object\n\n```{r}\nSub_module_1 \u003c- get_subgraph(graph_obj = obj, select_module = \"1\")\n\nnames(Sub_module_1)\n```\n\n\n## Example3\n\n```{r}\n# load test data in ggNetView\ndata(\"Envdf_4st\")\ndata(\"Spedf\")\n```\n\n\n```{r fig.align='center', fig.width=15, fig.height=15}\nout1 \u003c- gglink_heatmaps(\n  env = Envdf_4st,\n  spec = Spedf,\n  env_select = list(Env01 = 1:14, \n                    Env02 = 15:28,\n                    Env03 = 29:42,\n                    Env04 = 43:56),\n  spec_select = list(Spec01 = 1:8),\n  relation_method = \"correlation\",\n  spec_layout = \"circle_outline\",\n  cor.method = \"pearson\",\n  cor.use = \"pairwise\",\n  r = 6,\n  distance = 1,\n  orientation = c(\"top_right\", \"bottom_right\", \"top_left\", \"bottom_left\")\n)\n\nout1[[1]]\n\n```\n\n\n## Example4\n\n\u003e Leave lines with a significance level less than 0.05, and change the color of heatmap.\n\n```{r fig.align='center', fig.width=15, fig.height=15}\nout2 \u003c- gglink_heatmaps(\n  env = Envdf_4st,\n  spec = Spedf,\n  env_select = list(Env01 = 1:14,\n                    Env03 = 29:40,\n                    Env04 = 43:50),\n  spec_select = list(Spec01 = 1:8),\n  relation_method = \"correlation\",\n  spec_layout = \"circle_outline\",\n  cor.method = \"pearson\",\n  cor.use = \"pairwise\",\n  drop_nonsig = TRUE,\n  HeatmapColorBar = list(c(\"#2166ac\", \"#b2182b\"), \n                         c(\"#1b7837\", \"#762a83\"),\n                         c(\"#4393c3\", \"#d6604d\")),\n  HeatmapPointFill = \"#8c6bb1\",\n  CorePointFill = \"#225ea8\",\n  HeatmapLabelOrient = 45,\n  r = 6,\n  distance = 1,\n  orientation = c(\"top_right\", \"top_left\", \"bottom_left\")\n)\n\nout2[[2]]\n\n```\n\n\n\n## sessionInfo\n\n```{r}\nsessionInfo()\n```\n\n\n#### Citation\n\nIf you use ggNetView in your research, please cite:\n\n```\nYue Liu (2025). ggNetView: An R package for complex biological and ecological network analysis and visualization. R package version 0.1.0. \nhttps://github.com/Jiawang1209/ggNetView\n```\n\n\u003ch4 align=\"center\"\u003e©微信公众号 RPython\u003c/h5\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/jiawang1209.github.io%2FggNetView%2F","html_url":"https://awesome.ecosyste.ms/projects/jiawang1209.github.io%2FggNetView%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/jiawang1209.github.io%2FggNetView%2F/lists"}