{"id":34910558,"url":"https://github.com/jmw86069/jamma","last_synced_at":"2026-05-23T02:33:23.976Z","repository":{"id":77212222,"uuid":"102640463","full_name":"jmw86069/jamma","owner":"jmw86069","description":"Jam MA-plots, volcano plots, other relevant genomics visualizations","archived":false,"fork":false,"pushed_at":"2026-01-14T20:31:07.000Z","size":30403,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-15T00:46:55.322Z","etag":null,"topics":["data-quality","ma-plots","omics","visualization"],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jmw86069.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":null,"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":"2017-09-06T17:52:07.000Z","updated_at":"2026-01-14T20:31:11.000Z","dependencies_parsed_at":"2025-09-05T17:35:40.312Z","dependency_job_id":null,"html_url":"https://github.com/jmw86069/jamma","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jmw86069/jamma","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmw86069%2Fjamma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmw86069%2Fjamma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmw86069%2Fjamma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmw86069%2Fjamma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmw86069","download_url":"https://codeload.github.com/jmw86069/jamma/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmw86069%2Fjamma/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33380722,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T01:21:08.577Z","status":"online","status_checked_at":"2026-05-23T02:00:05.530Z","response_time":53,"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":["data-quality","ma-plots","omics","visualization"],"created_at":"2025-12-26T11:08:03.015Z","updated_at":"2026-05-23T02:33:23.970Z","avatar_url":"https://github.com/jmw86069.png","language":"R","funding_links":[],"categories":[],"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 setup, include=FALSE}\nragg_png \u003c- function(..., res = 192) {\n  ragg::agg_png(..., res = res, units = \"in\")\n}\nknitr::opts_chunk$set(\n  collapse=TRUE,\n  warning=FALSE,\n  message=FALSE,\n  comment=\"#\u003e\",\n  fig.path=\"man/figures/README-\"\n);\n```\n# jamma\n\nThe goal of jamma is to create MA-plots with several useful and powerful\ncapabilities that are intended to provide a more thorough understanding\nof the data.\n\nThe main function provided is `jammaplot()`. It is distinct from similar\nMA-plot functions in that it uses smooth scatter by default, and in\nfact inspired the creation of a custom smooth scatter function provided\nby `jamba::plotSmoothScatter()`.\n\n## Package Reference\n\nA full online function reference is available via the pkgdown\ndocumentation:\n\n[Full jamma command reference](https://jmw86069.github.io/jamma)\n\n### Example MA-plot\n\nA reasonable example MA-plot can be created using data from the `affydata`\npackage, if installed.\n\n```{r Dilution, results=\"hide\", fig.height=8, fig.width=8}\nlibrary(jamma);\nlibrary(jamba);\nif (suppressPackageStartupMessages(require(affydata))) {\n   data(Dilution);\n   edata \u003c- log2(1+Biobase::exprs(Dilution));\n   jammaplot(edata);\n}\n```\n\n### What is a smooth scatter plot, and why is it important for MA-plots?\n\nMA-plots are typically created for gene expression data, historically\nused for microarray data, which contains tens of thousands of rows.\nMost MA-plot tools combat the number of points either by displaying\nsingle pixel points (pch=\".\" in R base plotting), or adding transparency.\n\nA secondary issue is that these plots take a while to render when drawing\nindividual points. This effect is amplified when running on a remote server,\nsince each individual point is transmitted over the network for rendering.\nAlso when saving a figure, certain file types save each\npoint as an object, making the file size surprisingly large. If the file\nis printed to paper (ha!) the printer can take a long time to prepare the\nimage for printing. And the volume of data is not currently getting smaller\nwith new technologies.\n\nFirst, we show the same MA-plot using single pixel points:\n\n```{r pch1, results=\"hide\", fig.height=4, fig.width=8, dependson=\"Dilution\"}\nif (exists(\"edata\")) {\n   jammaplot(edata[,2:3], ylim=c(-1.5,1.5), titleCexFactor=0.8,\n      smoothScatterFunc=function(x, col=\"navy\", ...){plot(x=x, pch=\".\",col=\"#000077\",...)},\n      maintitle=\"plot(pch='.')\");\n}\n```\n\nThe overall range of points is clearly shown, but the density of points is\nnot clear from that plot. Adding alpha transparency helps somewhat:\n\n```{r pchAlpha, results=\"hide\", fig.height=4, fig.width=8}\nif (exists(\"edata\")) {\n   jammaplot(edata[,2:3], ylim=c(-1.5,1.5), titleCexFactor=0.8,\n      smoothScatterFunc=function(x, col=\"navy\", ...){plot(x=x, pch=\".\",col=\"#00007711\",...)},\n      maintitle=\"plot(pch='.', alpha=0.07)\");\n}\n```\n\nThe transparency helps visualize the massive number of points in the middle,\nbut now has made all the fun outlier points almost invisible. The typical\nnext step in R is to use smoothScatter(), shown below using its default\ncolor ramp:\n\n```{r Smooth, results=\"hide\", fig.height=4, fig.width=8}\nif (exists(\"edata\")) {\n   jammaplot(edata[,2:3],\n      xlim=c(6, 14),\n      ylim=c(-1.5,1.5),\n      titleCexFactor=0.8,\n      smoothScatterFunc=function(colramp,...){\n         smoothScatter(...,colramp=jamba::getColorRamp(colramp, n=NULL))},\n      colramp=\"Blues\",\n      maintitle=\"smoothScatter()\");\n}\n```\n\nAgain, the visualization is improved, but the default \"Blues\" color ramp\n(credit Brewer colors from RColorBrewer) could perhaps be improved.\n\n```{r Smoove, results=\"hide\", fig.height=4, fig.width=8}\nif (exists(\"edata\")) {\n   jammaplot(edata[,2:3],\n      xlim=c(6, 14),\n      ylim=c(-1.5,1.5),\n      titleCexFactor=0.8,\n      smoothScatterFunc=function(colramp,...){\n         smoothScatter(...,colramp=jamba::getColorRamp(colramp, n=NULL))},\n      maintitle=\"smoothScatter()\");\n}\n```\n\nNow the figure depicts the full range of data, while also conveying the\ntruly massive number of points in the central region. Only two smaller issues\nremain.\n\nFirst, not visible here, the underyling data is plotted using tiny\nrectangles. For the reasons described above, a large number of rectangles\ncan be problematic when saving as a vector image (PDF, SVG), when printing\non paper, or when rendering the figure across a remote network connection.\nThe solution is to use a rasterized image, instead of individual rectangles,\nwhich can be compressed and resized.\n\nSecond, the pixel size used for the point density is flattened horizontally,\nbecause the default density function uses the range of data, and not the\nplot visible range. When the density function is applied to plot coordinates,\nthere is often some distortion. Visually small effect, but when there are\n20 panels onscreen, the inconsistency becomes much more obvious.\n\nThe plotSmoothScatter function resolves both the issues described, with some\nenhancements. It uses a density function based upon plot space, but also adds\ndetail, so smaller features are less blurry.\n\n```{r plotSmoove, results=\"hide\", fig.height=4, fig.width=8}\nif (exists(\"edata\")) {\n   jammaplot(edata[,2:3],\n      ylim=c(-1.5,1.5),\n      titleCexFactor=0.8,\n      maintitle=\"plotSmoothScatter()\");\n}\n```\n\nIt looks like a small effect here, but the density around single points is\nnow circular. When rendering a density map of plotted data points, it should\nrepresent the true density of points as accurately as possible.\n\nTo demonstrate some other color effects, the plotSmoothScatter function also\nfills the complete plot panel with the correct background color, which is not\ndone by smoothScatter().\n\n```{r SmoothViridis, results=\"hide\", fig.height=8, fig.width=8}\nif (exists(\"edata\")) {\n   par(\"mfrow\"=c(2,2));\n   jammaplot(edata[,2:3],\n      xlim=c(6, 14),\n      ylim=c(-2,2),\n      titleCexFactor=0.8,\n      colramp=\"viridis\",\n      doPar=FALSE,\n      smoothScatterFunc=function(colramp,...){\n         smoothScatter(...,colramp=jamba::getColorRamp(colramp, n=NULL))},\n      maintitle=\"smoothScatter(colramp='viridis')\");\n   jammaplot(edata[,2:3], ylim=c(-2,2), titleCexFactor=0.8,\n      colramp=\"viridis\", doPar=FALSE,\n      maintitle=\"plotSmoothScatter(colramp='viridis')\");\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmw86069%2Fjamma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmw86069%2Fjamma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmw86069%2Fjamma/lists"}