{"id":13711327,"url":"https://thackl.github.io/gggenomes/","last_synced_at":"2025-05-06T20:32:42.845Z","repository":{"id":37413880,"uuid":"121570177","full_name":"thackl/gggenomes","owner":"thackl","description":"A grammar of graphics for comparative genomics","archived":false,"fork":false,"pushed_at":"2025-01-31T13:05:46.000Z","size":116565,"stargazers_count":675,"open_issues_count":44,"forks_count":66,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-06T09:19:14.052Z","etag":null,"topics":["biological-data","comparative-genomics","genomics-visualization","ggplot-extension","ggplot2"],"latest_commit_sha":null,"homepage":"https://thackl.github.io/gggenomes/","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/thackl.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":"2018-02-14T22:46:25.000Z","updated_at":"2025-05-01T14:13:29.000Z","dependencies_parsed_at":"2023-02-01T05:30:45.562Z","dependency_job_id":"6153637d-f849-4515-a1c8-ca2bfcb59c42","html_url":"https://github.com/thackl/gggenomes","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/thackl%2Fgggenomes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thackl%2Fgggenomes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thackl%2Fgggenomes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thackl%2Fgggenomes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thackl","download_url":"https://codeload.github.com/thackl/gggenomes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252764696,"owners_count":21800734,"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":["biological-data","comparative-genomics","genomics-visualization","ggplot-extension","ggplot2"],"created_at":"2024-08-02T23:01:07.021Z","updated_at":"2025-05-06T20:32:42.599Z","avatar_url":"https://github.com/thackl.png","language":"R","funding_links":[],"categories":["Plot layers"],"sub_categories":[],"readme":"# gggenomes \u003cimg src=\"man/figures/logo.svg\" align=\"right\" width=\"180\" /\u003e\n\n## A grammar of graphics for comparative genomics\n\ngggenomes is a versatile graphics package for comparative genomics. It extends the popular R visualization package [ggplot2](https://ggplot2.tidyverse.org/) by adding dedicated plot functions for genes, syntenic regions, etc. and verbs to manipulate the plot to, for example, quickly zoom in into gene neighborhoods.\n\n## A realistic use case comparing six viral genomes\n\ngggenomes makes it easy to combine data and annotations from different sources into one comprehensive and elegant plot. Here we compare the genomic architecture of 6 viral genomes initially described in [Hackl et al.: Endogenous virophages populate the genomes of a marine heterotrophic flagellate](http://dx.doi.org/10.1101/2020.11.30.404863)\n\n![](man/figures/emales.png)\n\n```R\nlibrary(gggenomes)\n\n# to inspect the example data shipped with gggenomes\ndata(package=\"gggenomes\")\n\ngggenomes(\n  genes = emale_genes, seqs = emale_seqs, links = emale_ava,\n  feats = list(emale_tirs, ngaros=emale_ngaros, gc=emale_gc)) |\u003e \n  add_sublinks(emale_prot_ava) |\u003e\n  sync() + # synchronize genome directions based on links\n  geom_feat(position=\"identity\", size=6) +\n  geom_seq() +\n  geom_link(data=links(2)) +\n  geom_bin_label() +\n  geom_gene(aes(fill=name)) +\n  geom_gene_tag(aes(label=name), nudge_y=0.1, check_overlap = TRUE) +\n  geom_feat(data=feats(ngaros), alpha=.3, size=10, position=\"identity\") +\n  geom_feat_note(aes(label=\"Ngaro-transposon\"), data=feats(ngaros),\n      nudge_y=.1, vjust=0) +\n  geom_wiggle(aes(z=score, linetype=\"GC-content\"), feats(gc),\n      fill=\"lavenderblush4\", position=position_nudge(y=-.2), height = .2) +\n  scale_fill_brewer(\"Genes\", palette=\"Dark2\", na.value=\"cornsilk3\")\n  \nggsave(\"emales.png\", width=8, height=4)\n```\n\nFor a reproducible recipe describing the full *evolution* of an earlier version of this plot with an older version of gggenomes starting from a mere set of contigs, and including the bioinformatics analysis workflow, have a look at [From a few sequences to a complex map in\nminutes](https://thackl.github.io/gggenomes/articles/emales.html).\n\n## Motivation \u0026 concept\n\nVisualization is a corner stone of both exploratory analysis and science\ncommunication. Bioinformatics workflows, unfortunately, tend to generate a\nplethora of data products often in adventurous formats making it quite difficult\nto integrate and co-visualize the results. Instead of trying to cater to the all\nthese different formats explicitly, gggenomes embraces the simple\ntidyverse-inspired credo:\n\n- Any data set can be transformed into one (or a few) tidy data tables\n- Any data set in a tidy data table can be easily and elegantly visualized\n\nAs a result gggenomes helps bridge the gap between data generation, visual\nexploration, interpretation and communication, thereby accelerating\nbiological research.\n\nUnder the hood gggenomes uses a light-weight track system to accommodate a mix\nof related data sets, essentially implementing ggplot2 with multiple tidy tables\ninstead of just one. The data in the different tables are tied together through\na global genome layout that is automatically computed from the input and defines\nthe positions of genomic sequences (chromosome/contigs) and their associated\nfeatures in the plot.\n\n## Inspiration\n\ngggenomes draws inspiration from some brilliant packages, in particular:\n\n- [gggenes](https://github.com/wilkox/gggenes) by [David Wilkins](https://wilkox.org/)\n- [ggtree](https://guangchuangyu.github.io/software/ggtree/) by Guangchuang Yu\n- [ggraph](https://github.com/thomasp85/ggraph) by [Thomas Lin Pedersen](https://www.data-imaginist.com/about)\n\n## Installation\n\ngggenomes is available as stable release on CRAN (from v1.0.1). The lastest developmental versions are available on github.\n\n```R\n# Install from CRAN\ninstall.packages(\"gggenomes\") \n\n# optionally install ggtree to plot genomes next to trees\n# https://bioconductor.org/packages/release/bioc/html/ggtree.html\nif (!requireNamespace(\"BiocManager\", quietly = TRUE))\n    install.packages(\"BiocManager\")\nBiocManager::install(\"ggtree\")\n\n# Install latest developmental version from github\ndevtools::install_github(\"thackl/gggenomes\")\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/thackl.github.io%2Fgggenomes%2F","html_url":"https://awesome.ecosyste.ms/projects/thackl.github.io%2Fgggenomes%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/thackl.github.io%2Fgggenomes%2F/lists"}