{"id":33051371,"url":"https://github.com/PATRIC3/mauve-viewer","last_synced_at":"2025-11-18T21:01:06.437Z","repository":{"id":39566155,"uuid":"147033528","full_name":"PATRIC3/mauve-viewer","owner":"PATRIC3","description":"A Whole Genome Alignment Visualization Tool for the Web","archived":false,"fork":false,"pushed_at":"2023-04-29T07:05:20.000Z","size":3181,"stargazers_count":40,"open_issues_count":10,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-21T22:16:45.229Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/PATRIC3.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}},"created_at":"2018-09-01T21:18:20.000Z","updated_at":"2024-04-26T07:15:49.000Z","dependencies_parsed_at":"2023-01-23T10:15:11.430Z","dependency_job_id":"114faf7c-27de-415e-950d-94d1b5b7073f","html_url":"https://github.com/PATRIC3/mauve-viewer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PATRIC3/mauve-viewer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PATRIC3%2Fmauve-viewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PATRIC3%2Fmauve-viewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PATRIC3%2Fmauve-viewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PATRIC3%2Fmauve-viewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PATRIC3","download_url":"https://codeload.github.com/PATRIC3/mauve-viewer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PATRIC3%2Fmauve-viewer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285138471,"owners_count":27121052,"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-11-18T02:00:05.759Z","response_time":61,"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":[],"created_at":"2025-11-14T03:00:27.111Z","updated_at":"2025-11-18T21:01:06.426Z","avatar_url":"https://github.com/PATRIC3.png","language":"JavaScript","funding_links":[],"categories":["Comparative"],"sub_categories":[],"readme":"# mauve-viewer\n\nA JavaScript Mauve/.xmfa viewer for multiple whole genome alignments.   The UI is highly inspired by the original [Mauve](http://darlinglab.org/mauve/mauve.html) viewer, with web/application integration in mind.  Note this is a __work in progress__.\n\n[Demo](https://nconrad.github.io/mauve-viewer/demo/)\n\nAlignment of 11 Brucella reference genomes:\n\n![11 brucella screenshot](docs/screenshots/brucella-lcbs.png)\n      \nZooming in to view features/annotations of Ecoli:\n\n![viewing features/annotations brucella screenshot](docs/screenshots/viewing-features.png)\n      \n    \n\n## Why?\n\nThe original [Mauve](http://darlinglab.org/mauve/mauve.html) viewer is great, but it's written in Java and doesn't run in the browser.  I'm particularly interested in creating a general purpose solution for genome alignment tools, such as [Mummer4](https://github.com/mummer4/mummer).\n\nCollaboration is welcome!\n\n\n\n## Features\n\n- panning, scaling, zoom\n- tooltips (Todo: make customizable)\n\n#### Upcoming:\n\n- SVG Download\n- Canvas resizing\n- Performance improvements?\n\n\n## Dependencies\n\n\n- [d3](https://github.com/d3/d3) v5 (currently)\n\n`MauveViewer` does not currently package d3.js and takes a reference to `d3` when instantiating the viewer.  See below.\n\n\n## Usage\n\n*First, make sure the CSS is included:*\n```\n\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"dist/mauve-viewer.css\"\u003e\n```\n\n\n#### Global\n\n```\n\u003cscript src=\"https://d3js.org/d3.v5.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"dist/mauve-viewer.js\"\u003e\u003c/script\u003e\n```\n\nSee example [here](https://github.com/nconrad/mauve-viewer/blob/master/demo/global-demo/index.html).\n\n#### ES6\n\n```\nimport * as d3 from 'd3';\nimport MauveViewer from 'dist/mauve-viewer';\n```\n\n#### AMD\n\n```javascript\nrequirejs.config({\n    baseUrl: 'dist',\n});\n\nrequirejs([\n    'mauve-viewer', 'path/to/d3'\n], function (MauveViewer, d3) {\n    ...\n})\n```\n\nSee example [here](https://github.com/nconrad/mauve-viewer/tree/master/demo/amd-demo).\n\n\n### Basic Example Config\n\n```html\n\u003cbody\u003e\n      \u003c!-- note: canvas auto-resizing is not implemented yet --\u003e       \n      \u003cdiv class=\"mauve-viewer\" style=\"margin: 0 auto; width:1024px;\"\u003e\u003c/div\u003e\n\u003c/body\u003e\n```      \n\n```javascript\nlet mauveViewer = new MauveViewer({\n    d3: d3,\n    ele: document.querySelector('.mauve-viewer'),\n    lcbs: [\n        [\n            {\n                \"name\": \"track 1\",\n                \"start\": 200,\n                \"end\": 300,\n                \"strand\": \"+\",\n                \"lcb_idx\": 1\n            },\n            {\n                \"name\": \"track 2\",\n                \"start\": 100,\n                \"end\": 200,\n                \"strand\": \"+\",\n                \"lcb_idx\": 2\n            }\n        ]\n    ]\n})\n```\n\n### Config\n\n| Param                 | Type                              | Required? |\n|-----------------------|-----------------------------------|-----------|\n| d3                    | Reference to d3                   | \u0026check;   |\n| ele                   | DOM element                       | \u0026check;   |\n| [lcbs](#lcbs)         | LCBs (list of lists)              | \u0026check;   |\n| [labels](#labels)     | Object (see below)                | -         |\n| [features](#features) | Object (see below)                | -         |\n| [contigs](#contigs)   | Object (see below)                | -         |\n\n\n### Event Callbacks\n\n| Param          | Type                | Required? | Default |\n|----------------|---------------------|-----------|---------|\n| onFeatureClick | function(Object) {} | -         | -       |\n\n\n##### lcbs\n\nEach LCB is grouped as an Array of Objects.  To parse `.xmfa` files into json-formatted LCBs, you may consider using this [script](https://github.com/nconrad/p3_mauve/blob/master/scripts/mauve-parser.js).  It's based on [biojs-io-xmfa](https://github.com/erasche/biojs-io-xmfa).  It can be ran as follows:\n\n```\ngit clone https://github.com/nconrad/p3_mauve \u0026\u0026 cd p3_mauve\nnpm install\nnode ./scripts/mauve-parser.js --input test-data/alignment.xmfa \u003e lcbs.json\n```\n\n`lcbs.json`:\n\n```javascript\n[\n    [\n        {\n            \"name\": \"224914.11.fasta\",\n            \"start\": 6,\n            \"end\": 2003350,\n            \"strand\": \"-\",\n            \"lcb_idx\": 1\n        }, ...\n    ], ...\n]  \n```\n\n##### labels (optional)\n\nThis is a mapping from the `name`/path of the fasta file to a more meaningful name, such as the organism name.\n\n```javascript\n{\n    \"224914.11.fasta\": \"Brucella melitensis bv. 1 str. 16M\",\n    \"204722.5.fasta\": \"Brucella suis 1330\",\n    \"444178.3.fasta\": \"Brucella ovis ATCC 25840\",\n    \"262698.4.fasta\": \"Brucella abortus bv. 1 str. 9-941\",\n    \"483179.4.fasta\": \"Brucella canis ATCC 23365\"\n}\n````\n\n##### features (optional)\n\n```javascript\n{\n    \"224914.11\": [\n        {\n            \"annotation\": \"PATRIC\",\n            \"feature_type\": \"tRNA\",\n            \"patric_id\": \"fig|224914.11.rna.23\",\n            \"product\": \"tRNA-Met-CAT\",\n            \"strand\": \"+\",\n            \"sequence_id\": \"NC_003317\",\n            \"start\": 558758,\n            \"end\": 558834,\n            \"accession\": \"NC_003317\",\n            \"xStart\": 558758,\n            \"xEnd\": 558834\n        },\n        ...\n    ], ...\n}\n```\n\n##### contigs (optional)\n\n```javascript\n{\n    \"224914.11\": [\n        {\n            \"gi\": 17986284,\n            \"sequence_type\": \"chromosome\",\n            \"topology\": \"circular\",\n            \"chromosome\": \"I\",\n            \"length\": 2117144,\n            \"sequence_id\": \"NC_003317\",\n            \"description\": \"Brucella melitensis 16M chromosome I, complete sequence.\",\n            \"accession\": \"NC_003317\",\n            \"gc_content\": 57.2,\n            \"xStart\": 1,\n            \"xEnd\": 2117144\n        }, ...\n    ], ...\n}\n```\n\n\n\n## Development\n\n### Installation\n\n```\nnpm install\n```\n\n\n### Development\n\n```\nnpm start\n```\n\n\n### Build\n\n```\nnpm run build\n```\n\nThis creates a new build in `dist/`.\n\n\n## Author(s)\n\n[nconrad](https://github.com/nconrad)\n\n\n\n## Citation\n\nIn the meantime, please cite this repo:\n\nN. Conrad, A Whole Genome Alignment Visualization Tool for the Web, (2019), GitHub repository, https://github.com/nconrad/mauve-viewer\n\n\n## License\n\nReleased under [the MIT license](https://github.com/nconrad/mauve-viewer/blob/master/LICENSE).\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPATRIC3%2Fmauve-viewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPATRIC3%2Fmauve-viewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPATRIC3%2Fmauve-viewer/lists"}