{"id":42060252,"url":"https://github.com/statgen/locuszoom","last_synced_at":"2026-01-26T07:38:57.550Z","repository":{"id":37514581,"uuid":"41318680","full_name":"statgen/locuszoom","owner":"statgen","description":"A Javascript/d3 embeddable plugin for interactively visualizing statistical genetic data from customizable sources.","archived":false,"fork":false,"pushed_at":"2025-05-09T20:53:48.000Z","size":15530,"stargazers_count":163,"open_issues_count":17,"forks_count":30,"subscribers_count":11,"default_branch":"develop","last_synced_at":"2025-10-06T15:40:27.009Z","etag":null,"topics":["gwas","gwas-summary-statistics","gwas-tools","locuszoom","locuszoom-plot"],"latest_commit_sha":null,"homepage":"https://statgen.github.io/locuszoom/","language":"JavaScript","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/statgen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"citation.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-08-24T18:01:44.000Z","updated_at":"2025-10-03T17:29:04.000Z","dependencies_parsed_at":"2023-02-08T13:16:08.092Z","dependency_job_id":"40935164-b96d-489f-a42d-bbbec27d8268","html_url":"https://github.com/statgen/locuszoom","commit_stats":{"total_commits":1240,"total_committers":15,"mean_commits":82.66666666666667,"dds":"0.49838709677419357","last_synced_commit":"a0562c7c7866e2ceba758283811390677485be6c"},"previous_names":[],"tags_count":79,"template":false,"template_full_name":null,"purl":"pkg:github/statgen/locuszoom","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statgen%2Flocuszoom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statgen%2Flocuszoom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statgen%2Flocuszoom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statgen%2Flocuszoom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/statgen","download_url":"https://codeload.github.com/statgen/locuszoom/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/statgen%2Flocuszoom/sbom","scorecard":{"id":846766,"data":{"date":"2025-08-11","repo":{"name":"github.com/statgen/locuszoom","commit":"2416cf060c751eb0e0fd96187532627b75c0c392"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":2,"reason":"Found 5/18 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/node.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/statgen/locuszoom/node.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/statgen/locuszoom/node.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/statgen/locuszoom/node.yml/develop?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/node.yml:39","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   2 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 17 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"20 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-36jr-mh4h-2g58","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T21:40:06.046Z","repository_id":37514581,"created_at":"2025-08-23T21:40:06.046Z","updated_at":"2025-08-23T21:40:06.046Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28769853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T06:37:25.426Z","status":"ssl_error","status_checked_at":"2026-01-26T06:37:23.039Z","response_time":59,"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":["gwas","gwas-summary-statistics","gwas-tools","locuszoom","locuszoom-plot"],"created_at":"2026-01-26T07:38:56.888Z","updated_at":"2026-01-26T07:38:57.541Z","avatar_url":"https://github.com/statgen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LocusZoom\n\nLocusZoom is a Javascript/d3 embeddable plugin for interactively visualizing statistical genetic data from customizable sources.\n\n\nFor more information, see our paper:\n\n*Boughton, A. P. et al. LocusZoom.js: interactive and embeddable visualization of genetic association study results. Bioinformatics (2021) [doi:10.1093/bioinformatics/btab186](https://doi.org/10.1093/bioinformatics/btab186).*\n\n**This is a low level library aimed at developers who want to customize their own data sharing/visualization tools. If you are a genetics researcher who just wants to make a fast visualization of your research results, try our user-friendly plot-your-own data services built on LocusZoom.js: [my.locuszoom.org](https://my.locuszoom.org/) and [LocalZoom](https://statgen.github.io/localzoom/)**.\n\n\n![Build Status](https://github.com/statgen/locuszoom/workflows/Unit%20tests/badge.svg?branch=develop)\n\nSee [https://statgen.github.io/locuszoom/docs/](https://statgen.github.io/locuszoom/docs/) for full documentation and API reference.\n\nTo see functional examples of plots generated with LocusZoom.js see [statgen.github.io/locuszoom](http://statgen.github.io/locuszoom/) and [statgen.github.io/locuszoom/#examples](http://statgen.github.io/locuszoom/#examples).\n\n![LocusZoom.js Standard Association Plot](examples/locuszoom_standard_association_example.png)\n\n## Making a LocusZoom Plot: Quickstart tutorial\n\n### 1. Include Necessary JavaScript and CSS\n\nThe page you build that embeds the LocusZoom plugin must include the following resources, found in the `dist` directory (or preferably loaded via CDN):\n\n* `d3.js`  \n  [D3.js](https://d3js.org/) v5.16.0 is used to draw graphics in LocusZoom plots. It may be loaded [via a CDN](https://cdn.jsdelivr.net/npm/d3@^5.16.0). It must be present before LocusZoom is loaded.\n\n* `locuszoom.app.min.js`  \n  This is the primary application logic. It should only be included *after* the vendor dependencies have been included.  \n\n* `locuszoom.css`  \n  This is the primary stylesheet. It is namespaced so as not to conflict with any other styles defined on the same page.\n\nInstead of copying the files to your project, **we recommend using CDN links are for these resources** (see [statgen.github.io/locuszoom/](http://statgen.github.io/locuszoom/)).\n\n*The above instructions describe using LocusZoom with pure JS and HTML. If you are using a module build system, LocusZoom supports usage via ES6 imports, eg:* \n\n```javascript\nimport LocusZoom from 'locuszoom';\nimport 'locuszoom/dist/locuszoom.css';\n```\n\n### 2. Define Data Sources\n\n**Data Sources** is an object representing a collection of arbitrarily many sources from which data for the plot can be requested. When adding sources to the collection they must be namespaced so that retrieving specific fields can be done with respect to specific data sources.\n\nHere's an example of defining a data sources object for a remote API:\n\n```javascript\nvar data_sources = new LocusZoom.DataSources();\ndata_sources.add(\"assoc\", [\"AssociationLZ\", { url: \"http://server.com/api/\", source: 1 }]);\n```\n\nThe above example adds an \"AssociationLZ\" data source (a predefined data source designed to make requests for association data) with a defined URL. The namespace for this data source is \"assoc\".\n\nData sources can also be local files:\n\n```javascript\ndata_sources = new LocusZoom.DataSources();\ndata_sources.add(\"assoc\", [\"AssociationLZ\", { url: \"file:///path/to/data.json\" }]);\n```\n\nRefer to the [Working with data guide](https://statgen.github.io/locuszoom/docs/guides/data_retrieval.html) for more information on using predefined data sources or extending/creating custom data sources.\n\n### 3. Define a Layout\n\n**Layout** is a serializable object that describes the configuration of the LocusZoom plot, including what data will be pulled from the data sources and displayed in what way, along with visual characteristics like color and geometry.\n\nA layout definition may look something like this (simplified example; consult docs for details):\n\n```javascript\nvar layout = {\n  width: 500,\n  height: 500,\n  panels: [\n    {\n      id: \"association\",\n      data_layers: [\n         {\n           id: \"association\",\n           type: \"scatter\",\n           x_axis: { field: \"assoc:position\" },\n           y_axis: { field: \"assoc:pvalue\" }\n         }\n      ]\n    }\n  ]\n};\n```\n\nThe above example defines a basic plot that is 500 pixels on a side and has one panel with one scatter plot data layer that pulls in position and pvalue from the \"trait\" data source, mapping position to the x axis and pvalue to the y axis.\n\nThe LocusZoom.js library provides several pre-defined layouts for entire plots and subdivisions of plots such as panels, data layers, tool tips, etc. Refer to the [Layouts and visualization options guide](https://statgen.github.io/locuszoom/guides/rendering_layouts.html) for more information.\n\n### 4. Put it Together with `LocusZoom.populate()`\n\nWith includes included, data sources defined, and a layout defined, `LocusZoom.populate()` will accept a CSS selector string to populate the first matching element with a plot.\n\nA basic example may then look like this:\n\n```html\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cscript src=\"dist/locuszoom.app.min.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n    \u003clink rel=\"stylesheet\" type=\"text/css\" href=\"dist/locuszoom.css\"/\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cdiv id=\"lz-plot\"\u003e\u003c/div\u003e\n    \u003cscript type=\"text/javascript\"\u003e\n      const data_sources = new LocusZoom.DataSources();\n      data_sources.add(\"assoc\", [\"AssociationLZ\", { url: \"https://server.com/api/single/\", source: 1 }]);\n      const layout = {\n        width: 800,\n        panels: [\n          {\n            id : \"association\",\n            height: 300,\n            data_layers: [\n              {\n                id: \"association\",\n                type: \"scatter\",\n                x_axis: { field: \"assoc:position\" },\n                y_axis: { field: \"assoc:log_pvalue\" }\n              }\n            ]\n          }\n        ]\n      };\n      const plot = LocusZoom.populate(\"#lz-plot\", data_sources, layout);\n    \u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n### Other Ways To Make a LocusZoom Plot\n\n#### Use a Predefined Layout\n\nThe core LocusZoom library comes equipped with several predefined layouts, organized by type (\"plot\", \"panel\", \"data_layer\", and \"toolbar\"). You can see what layouts are predefined by reading the [documentation](https://statgen.github.io/locuszoom/docs/api/module-LocusZoom_Layouts.html) or introspecting in the browser by entering `LocusZoom.Layouts.list()` (or to list one specific type, like \"data_layer\": `LocusZoom.Layouts.list(type)`).\n\nGet any predefined layout by type and name using `LocusZoom.Layouts.get(type, name)`.\n\nIf your data matches the field names and formats of the [LocusZoom API](https://github.com/statgen/locuszoom-api/blob/master/docs/api.md), these layouts will provide a quick way to get started. If your data obeys different format rules, customization may be necessary. (for example, some LocusZoom features assume the presence of a field called `log_pvalue`)\n  \nSee the [guide to working with layouts](https://statgen.github.io/locuszoom/docs/guides/rendering_layouts.html) for further details.\n\n#### Build a Layout Using Some Predefined Pieces\n\n`LocusZoom.Layouts.get(type, name)` can also be used to pull predefined layouts of smaller pieces, like data layers or \ntoolbars, into a custom layout:\n\n```javascript\nconst layout = {\n  width: 1000,\n  height: 500,\n  panels: [\n    LocusZoom.Layouts.get(\"panel\", \"association\"),\n    {\n      id: \"custom_panel\",\n      ...options\n    },\n    LocusZoom.Layouts.get(\"panel\", \"genes\")\n  ],\n  ...\n};\n```\n\n#### Modify a Predefined Layout\n\nThe `get()` function also accepts a partial layout to be merged with the predefined layout as a third argument, providing the ability to use predefined layouts as starting points for custom layouts with only minor differences. Example:\n\n```javascript\nconst overrides = { label_font_size: 20 };\nLocusZoom.Layouts.get(\"data_layer\", \"genes\", overrides);\n```\n\n#### Predefining State by Building a State Object\n\n**State** is JSON-serializable object containing information that can affect the entire plot (including all data retrieval requests). State can be set before or after the plot is initialized. For example, the following special-named fields will cause the plot to be loaded to a specific region of interest on first render:\n\n```javascript\nconst layout = LocusZoom.Layouts.get('plot', 'standard_association', { state: { chr: 6, start: 20379709, end: 20979709 } })\n```\n\n#### Alternate: setting the initial view via `data-region`\n\nYou can also describe the locususing a `data-region` attribute of the containing element before populating it, like so:\n\n```html\n\u003cdiv id=\"lz-plot\" data-region=\"10:114550452-115067678\"\u003e\u003c/div\u003e\n```\n\nWhen `LocusZoom.populate()` is executed on the element defined above it will automatically parse any `data-region` parameter to convert those values into the initial state.\n\n## Development Setup\n### Dependencies\n\nLocusZoom is an entirely client-side library designed to plug into arbitrary data sets, be they local files, APIs, or something else entirely. It has the following external dependencies:\n\n* [d3](http://d3js.org/) for data visualization\n\n### Build System and Automated Testing\n\nLocusZoom is bundled using Webpack. To install all necessary dependencies for a development environment, run:\n\n```bash\n$ npm install\n```\n\nWe recommend using node.js v12 or greater to build the library and run tests.\n\nOnce complete run `npm run build` from the top of the application directory to run all tests and build the LocusZoom library bundle.\n\nThis build process will also write sourcemaps, to help with debugging code even in production environments.\n\n#### Other supported build commands:\n\n* `npm run test` - Run unit tests (optional: `npm run test:coverage` to output a code coverage report)\n* `npm run dev` - Automatically rebuild the library whenever code changes (development mode)\n* `npm run build` - Run tests, and if they pass, build the library for release\n* `npm run css` - Rebuild the CSS using SASS (CSS rarely changes, so this doesn't get done automatically in dev mode)\n* `npm run docs` - Build just the library documentation\n* `npm run format` - Format the JavaScript code using ESLint\n\n\n#### Automated Testing\n\nLocusZoom uses [Mocha](https://mochajs.org/) for unit testing. Tests are located in the `test` subdirectory. Use `npm run test`.\n\n### Static analysis and code style\nLocusZoom runs code quality checks via [ESLint](http://eslint.org/), the rules for which can be found in `.eslintrc`. This will run automatically as part of all new code commits, and during every build. \n\n## Help and Support\n\nFull API documentation and prose guides are available at: [https://statgen.github.io/locuszoom/docs/](https://statgen.github.io/locuszoom/docs/)\n\nA LocusZoom discussion forum is available here: [https://groups.google.com/forum/#!forum/locuszoom](https://groups.google.com/forum/#!forum/locuszoom). \nFor the most effective help, please specify that your question  is about \"LocusZoom.js\".\n\nIf you have questions or feedback please file an issue on the [LocusZoom.js GitHub repository](https://github.com/statgen/locuszoom/issues) or post at the discussion forum referenced above.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatgen%2Flocuszoom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstatgen%2Flocuszoom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatgen%2Flocuszoom/lists"}