{"id":20080068,"url":"https://github.com/ppillot/biomsalign","last_synced_at":"2025-05-05T23:30:58.753Z","repository":{"id":57203597,"uuid":"334757885","full_name":"ppillot/biomsalign","owner":"ppillot","description":"JavaScript library for Multiple Sequence Alignment","archived":false,"fork":false,"pushed_at":"2024-01-07T04:09:05.000Z","size":637,"stargazers_count":17,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-31T17:54:52.330Z","etag":null,"topics":["alignment","bioinformatics","javascript","minimizer","sequence-alignment"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/ppillot.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}},"created_at":"2021-01-31T21:12:05.000Z","updated_at":"2024-10-03T18:39:19.000Z","dependencies_parsed_at":"2022-09-17T00:51:26.396Z","dependency_job_id":null,"html_url":"https://github.com/ppillot/biomsalign","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppillot%2Fbiomsalign","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppillot%2Fbiomsalign/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppillot%2Fbiomsalign/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppillot%2Fbiomsalign/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ppillot","download_url":"https://codeload.github.com/ppillot/biomsalign/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224473359,"owners_count":17317164,"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":["alignment","bioinformatics","javascript","minimizer","sequence-alignment"],"created_at":"2024-11-13T15:25:55.985Z","updated_at":"2024-11-13T15:25:56.612Z","avatar_url":"https://github.com/ppillot.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BioMSA\n\n\u003e Multiple Sequence Alignment in JavaScript\n\nBioMSA is a JavaScript library for computing alignments of biological\nsequences (DNA or Protein) locally in the browser.\nIt performs progressive alignments using a weighting scheme similarly to\nwhat programs like ClustalW or MUSCLE do.\nTo the best of my knowledge, it is the only multiple sequence alignment library\nwritten in JavaScript... and it's also the fastest!\n\n## Installing / Getting started\n\nBioMSA is available as a single minified javascript file. Insert the following\nsnippet in your HTML page to start using it.\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/biomsa/dist/biomsa.js\"\u003e\u003c/script\u003e\n```\n\nOnce loaded, the global `biomsa` object is available and\nits `align()` method can be called to align sequences.\n\n```javascript\nbiomsa.align([\"ACTGGGGAGGTGTA\", \"ACTGAGGTGTA\"]).then((result) =\u003e {\n  console.log(result);\n});\n\n// Array [ \"ACTGGGGAGGTGTA\", \"ACT---GAGGTGTA\" ]\n```\n\nNote: `align()` returns a promise.\n\n### NPM package\n\nBioMSA is also available as an NPM package and can be used as an ECMAScript compatible module too. It is shipped with type declarations too.\n\n```shell\nnpm install biomsa\n```\n\n## Library options\n\nThe `align()` method has 2 parameters:\n\n- an array of sequences to align\n- an optional configuration object\n\n```javascript\nbiomsa.align(\n    ['SEQVENCE...', 'SEQWANCE...', 'CEQWANSE...'],\n    {\n        gapopen: -11,\n        gapextend: -2,\n        matrix: [[.....], [.....], ....],\n        method: 'auto',\n        type: 'auto',\n        gapchar: '-',\n        debug: false\n    }).then(result =\u003e console.log(result))\n```\n\n- `gapopen` Gap open penalty (a negative number). If not provided, it is set based on the sequence type.\n\n- `gapextend` Gap extend penalty (a negative number). If not provided, it is set based on the sequence type.\n\n- `matrix` Substitution score matrix as an array of number array. Cells are sorted by amino acid 1 letter code rank (A, C, D, E,...). If not provided, it is set based on the sequence type.\n\n- `method` (default `\"auto\"`) Alignment method. By default, the method is set based on the sequences length.\n  For sizes greater than 1600 residues, the diagonal based heuristics is used. For shorter sequences a complete Needleman-Wunsch alignment is performed.\n\n  - `\"auto\"` default value\n  - `\"complete\"` computes an optimal alignment using Needleman-Wunsch algorithm. This can be slow and take a lot of memory for long sequences.\n  - `\"diag\"` computes an alignment by first finding common segments between sequences (called diagonals) and then\n    computing the missing segments using NW algorithm.\n\n- `type` (default `\"auto\"`) Sequence type. Can be `\"amino\"`, `\"nucleic\"` or `\"auto\"` when auto-detected. BioMSA encodes non-canonical residues randomly. For example 'B' in a protein sequence which could be \"Asn\" or \"Asp\" will be encoded randomly as one of these amino-acids.\n\n- `gapchar` (default `\"-\"`) Character to use in the aligned sequences to represent a gap.\n\n- `debug` (default `false`) Boolean. Set to true to report some debugging information to the javascript console.\n\n## Features\n\n- Multiple sequence alignment of nucleic and proteic sequences.\n- Tree guided progressive alignment using a weighing scheme, substitution matrices,\n  alignment score optimization by dynamic programming.\n- Approximative fast alignment of large DNA sequences (e.g. x5 16kbases mitochondrial DNA sequences in 100ms), using minimizers and diagonals extension.\n\n## Licensing\n\n\"The code in this project is licensed under MIT license.\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppillot%2Fbiomsalign","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fppillot%2Fbiomsalign","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppillot%2Fbiomsalign/lists"}