{"id":24696752,"url":"https://github.com/esteinig/netviewr","last_synced_at":"2025-10-09T04:30:33.335Z","repository":{"id":98280813,"uuid":"164743895","full_name":"esteinig/netviewr","owner":"esteinig","description":"Mutual nearest neighbor graphs for population structure inference and visualization :octopus:","archived":false,"fork":false,"pushed_at":"2024-10-14T20:13:12.000Z","size":2201,"stargazers_count":17,"open_issues_count":4,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-16T20:18:24.276Z","etag":null,"topics":["graphs","nearest-neighbours","population-genetics","population-structure","python","r","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/esteinig.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}},"created_at":"2019-01-08T22:28:10.000Z","updated_at":"2025-09-09T09:16:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"257a2aae-a223-4f58-be12-6ae8964f0239","html_url":"https://github.com/esteinig/netviewr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/esteinig/netviewr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esteinig%2Fnetviewr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esteinig%2Fnetviewr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esteinig%2Fnetviewr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esteinig%2Fnetviewr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/esteinig","download_url":"https://codeload.github.com/esteinig/netviewr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esteinig%2Fnetviewr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000704,"owners_count":26082921,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["graphs","nearest-neighbours","population-genetics","population-structure","python","r","rust"],"created_at":"2025-01-27T02:03:18.020Z","updated_at":"2025-10-09T04:30:32.960Z","avatar_url":"https://github.com/esteinig.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# netviewr \u003ca href='https://github.com/esteinig'\u003e\u003cimg src='man/logos/logo_simple.png' align=\"right\" height=\"200\" /\u003e\u003c/a\u003e\n\n![](https://img.shields.io/badge/lang-R-blue.svg)\n![](https://img.shields.io/badge/version-2.1.0-blue.svg)\n![](https://img.shields.io/badge/published-MolEcoRes-green.svg)\n\n## Overview\n\nThe `netviewr` package offers a set of operators and functions that make \nworking with data-driven plots of `igraph` objects more pleasant by:\n  \n  - decorating graph objects with user data\n  - translating data into graph attributes\n  - plotting decorated graphs smoothly\n\n`Netviewr` is built with its original application in mind, which is the visualization of genetic population structure and associated meta data from genome-wide single nucleotide polymorphisms (SNPs) for both eukaryotic and prokaryotic species. While it is not a suitable package for __determining__ population structure, it can be used to effectively __visualize__ data (traits, phenotypes, genotypes...) across population structures; it should be used in conjunction with other statistically more sophisticated tools like DAPC or Admixture. \n\n\u003e Netviewr implements the same tasks and methods as the published version of NetView - except in modern R. If the new syntax feels weird, you can use all functions in base syntax, or if you need backward compatibility, the [old version](https://github.com/esteinig/netview/blob/master/README_OLD.md) is still accessible. \n\n## Citation\n\nIf you are using `netviewr` for research applications, for now please cite:\n\n\u003e Steinig et al. (2016) - Netview P: a network visualization tool to unravel complex population structure using genome‐wide SNPs - Molecular Ecology Resources 16 (1), 216-227\n\nIf you have trouble accessing the paper, have a look in the [documentation](docs/) folder.\n\n## Table of contents\n\n**`v2.1.0`**\n\n- [Install](#install)\n- [Population genomics](docs/POPGENOM.md#population-genomics)\n  - [Population graphs](docs/POPGENOM.md#population-graphs)\n  - [Community detection](docs/POPGENOM.md#community-detection)\n  - [K-selection plots](docs/POPGENOM.md#k-selection-plots)\n  - [Admixture plots](docs/POPGENOM.md#admixture-plots)\n- [Graph visualization](docs/GRAPHVIZ.md#general-graph)\n  - [Graph decorators](docs/GRAPHVIZ.md#graph-decorators)\n  - [Decorator pipelines](docs/GRAPHVIZ.md#decorator-pipelines)\n  - [Netview plots](docs/GRAPHVIZ.md#netview-plots)\n- [Decorator functions](docs/DECFUNC.md#decorator-functions)\n  - [Node decorators](docs/DECFUNC.md#node-decorators)\n  - [Special decorators](docs/DECFUNC.md#special-decorators)\n  - [Custom decorators](docs/DECFUNC.md#custom-decorators)\n- [Contributions](#contributions)\n\n\n## Install\n\n``` r\n\n# Install netviewr (not on CRAN yet)\n# install.packages(\"netviewr\")\n\n# Development version from GitHub:\n# install.packages(\"devtools\")\ndevtools::install_github(\"esteinig/netviewr\")\n```\n\n## Population graph example\n\nBuild and plot a mutual k-nearest-neighbor graph from a (genetic) distance matrix.\n\n```r\nmatrix(rnorm(900), nrow=30) %\u003e% netviewr::netview(k=20) %\u003e% netviewr::plot_netview()\n```\n\nBase syntax is also supported.\n\n```r\ndist_matrix \u003c- matrix(rnorm(900), nrow=30)\ng \u003c- netviewr::netview(dist_matrix, k=20)\nnetviewr::plot_netview(g)\n```\n\n## General graph example\n\nAnnotate a graph with data and plot the graph.\n\n```r\nlibrary(netviewr)\n\nnode_data \u003c- tibble::tibble(x=letters[1:10], y=1:10)    # generate 10 x 2 node data tibble\n\ng \u003c- igraph::sample_gnm(n=10, m=15) %@%                 # generate random graph with 10 nodes\n     node_data %@%                                      # decorate graph with node data tibble\n     node_color(data='x', palette='BuGn') %@%           # decorate nodes with colors paletted by x\n     node_size(data='y', min=5, max=8)                  # decorate nodes with values rescaled by y\n     \ng %\u003e% plot_netview()                                    # plot decorated graph from magrittr pipe \n```\n\n## Plot examples\n\n\u003cimg src='man/plots/color_1.png' height=\"300\" /\u003e \u003cimg src='man/plots/size_2.png' height=\"300\" /\u003e\n\u003cimg src='man/plots/labels_2.png' height=\"300\" /\u003e \u003cimg src='man/plots/shape_2.png' height=\"300\" /\u003e\n\u003cimg src='man/plots/community_1.png' height=\"300\" /\u003e \u003cimg src='man/plots/pie_1.png' height=\"300\" /\u003e\n\n## Contributions\n\nWe welcome any and all suggestions or pull requests. Please feel free to open an issue in the repository on `GitHub`.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Festeinig%2Fnetviewr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Festeinig%2Fnetviewr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Festeinig%2Fnetviewr/lists"}