{"id":16916998,"url":"https://github.com/althonos/pymuscle5","last_synced_at":"2026-02-24T17:31:45.969Z","repository":{"id":43898306,"uuid":"489382232","full_name":"althonos/pymuscle5","owner":"althonos","description":"Cython bindings and Python interface to MUSCLE v5, a highly efficient and accurate multiple sequence alignment software.","archived":false,"fork":false,"pushed_at":"2024-05-08T11:25:49.000Z","size":118,"stargazers_count":20,"open_issues_count":3,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-25T21:13:18.555Z","etag":null,"topics":["bioinformatics","cython-library","genomics","multiple-sequence-alignment","muscle","python-bindings","python-library","sequence-alignment"],"latest_commit_sha":null,"homepage":"","language":"Cython","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/althonos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"COPYING","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":"2022-05-06T14:19:48.000Z","updated_at":"2024-12-17T06:20:16.000Z","dependencies_parsed_at":"2025-01-02T17:47:38.261Z","dependency_job_id":null,"html_url":"https://github.com/althonos/pymuscle5","commit_stats":{"total_commits":36,"total_committers":1,"mean_commits":36.0,"dds":0.0,"last_synced_commit":"8393402a9e8f7dfd440a9997ab2fdf4c2ddf54e4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/althonos%2Fpymuscle5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/althonos%2Fpymuscle5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/althonos%2Fpymuscle5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/althonos%2Fpymuscle5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/althonos","download_url":"https://codeload.github.com/althonos/pymuscle5/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244717361,"owners_count":20498283,"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":["bioinformatics","cython-library","genomics","multiple-sequence-alignment","muscle","python-bindings","python-library","sequence-alignment"],"created_at":"2024-10-13T19:31:57.888Z","updated_at":"2026-02-24T17:31:45.962Z","avatar_url":"https://github.com/althonos.png","language":"Cython","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyMUSCLE5 [![Stars](https://img.shields.io/github/stars/althonos/pymuscle5.svg?style=social\u0026maxAge=3600\u0026label=Star)](https://github.com/althonos/pymuscle5/stargazers)\n\n*Cython bindings and Python interface to [MUSCLE v5](https://www.drive5.com/muscle/), a highly efficient and accurate multiple sequence alignment software.*\n\n[![Actions](https://img.shields.io/github/workflow/status/althonos/pymuscle5/Test/main?logo=github\u0026style=flat-square\u0026maxAge=300)](https://github.com/althonos/pymuscle5/actions)\n\u003c!-- [![Coverage](https://img.shields.io/codecov/c/gh/althonos/pymuscle5?style=flat-square\u0026maxAge=3600\u0026logo=codecov)](https://codecov.io/gh/althonos/pymuscle5/)\n[![License](https://img.shields.io/badge/license-GPLv3-blue.svg?style=flat-square\u0026maxAge=2678400)](https://choosealicense.com/licenses/gpl-3.0/)\n[![PyPI](https://img.shields.io/pypi/v/pymuscle5.svg?style=flat-square\u0026maxAge=3600\u0026logo=PyPI)](https://pypi.org/project/pymuscle5)\n[![Bioconda](https://img.shields.io/conda/vn/bioconda/pymuscle5?style=flat-square\u0026maxAge=3600\u0026logo=anaconda)](https://anaconda.org/bioconda/pymuscle5)\n[![AUR](https://img.shields.io/aur/version/python-pymuscle?logo=archlinux\u0026style=flat-square\u0026maxAge=3600)](https://aur.archlinux.org/packages/python-pymuscle5)\n[![Wheel](https://img.shields.io/pypi/wheel/pymuscle5.svg?style=flat-square\u0026maxAge=3600)](https://pypi.org/project/pymuscle5/#files)\n[![Python Versions](https://img.shields.io/pypi/pyversions/pymuscle5.svg?style=flat-square\u0026maxAge=600\u0026logo=python)](https://pypi.org/project/pymuscle5/#files)\n[![Python Implementations](https://img.shields.io/pypi/implementation/pymuscle5.svg?style=flat-square\u0026maxAge=600\u0026label=impl)](https://pypi.org/project/pymuscle5/#files)\n[![Source](https://img.shields.io/badge/source-GitHub-303030.svg?maxAge=2678400\u0026style=flat-square)](https://github.com/althonos/pymuscle5/)\n[![GitHub issues](https://img.shields.io/github/issues/althonos/pymuscle5.svg?style=flat-square\u0026maxAge=600)](https://github.com/althonos/pymuscle5/issues)\n[![Docs](https://img.shields.io/readthedocs/pymuscle5/latest?style=flat-square\u0026maxAge=600)](https://pymuscle5.readthedocs.io)\n[![Changelog](https://img.shields.io/badge/keep%20a-changelog-8A0707.svg?maxAge=2678400\u0026style=flat-square)](https://github.com/althonos/pymuscle5/blob/main/CHANGELOG.md)\n[![Downloads](https://img.shields.io/badge/dynamic/json?style=flat-square\u0026color=303f9f\u0026maxAge=86400\u0026label=downloads\u0026query=%24.total_downloads\u0026url=https%3A%2F%2Fapi.pepy.tech%2Fapi%2Fprojects%2Fpymuscle5)](https://pepy.tech/project/pymuscle5) --\u003e\n\n**🚨 Please be aware if you plan using this that there are reproducibility issues due to how the internal \nRNG is seeded! Instead, for a stable and reproducible Multiple Sequence Aligner in Python, have a look\nat [PyFAMSA](https://github.com/althonos/pyfamsa) which wraps [FAMSA2](https://github.com/refresh-bio/FAMSA).**\n\n## 🗺️ Overview\n\nMUSCLE is widely-used software for making multiple alignments of biological\nsequences. Version 5 of MUSCLE achieves highest scores on several benchmark\ntests and scales to thousands of sequences on a commodity desktop computer.\n\npyMUSCLE5 is a Python module that provides bindings to MUSCLE v5 using\n[Cython](https://cython.org/). It directly interacts with the MUSCLE\ninternals, which has the following advantages:\n\n- **single dependency**: If your software or your analysis pipeline is\n  distributed as a Python package, you can add `pymuscle5` as a dependency to\n  your project, and stop worrying about the MUSCLE binaries being properly\n  setup on the end-user machine.\n- **no intermediate files**: Everything happens in memory, in a Python object\n  you fully control, so you don't have to invoke the MUSCLE CLI using a\n  sub-process and temporary files. Sequences can be passed directly as\n  strings or bytes, which avoids the overhead of formatting your input to\n  FASTA for MUSCLE.\n- **no OpenMP**: The original MUSCLE code uses [OpenMP](https://www.openmp.org/)\n  to parallelize embarassingly-parallel tasks. In pyMUSCLE5 the dependency on\n  OpenMP has been removed in favor of the Python `threading` module for better\n  portability.\n\n*This library is in a very experimental stage at the moment, and consistency\nof the results across versions or platforms is not guaranteed yet.*\n\n## 🔧 Installing\n\nAt the moment pyMUSCLE5 is not available on PyPI. You can however install it\ndirectly from GitHub with:\n\n```console\n$ pip install git+https://github.com/althonos/pymuscle5\n```\n\n## 💡 Example\n\nLet's load some sequences sequence from a FASTA file, use an `Aligner` to\nalign proteins together, and print the alignment in two-line FASTA format.\n\n### 🔬 [Biopython](https://github.com/biopython/biopython)\n\n```python\nimport os\n\nimport Bio.SeqIO\nimport pymuscle5\n\npath = os.path.join(\"pymuscle\", \"tests\", \"data\", \"swissprot-halorhodopsin.faa\")\nrecords = list(Bio.SeqIO.parse(path, \"fasta\"))\n\nsequences = [\n    pymuscle5.Sequence(record.id.encode(), bytes(record.seq))\n    for record in records\n]\n\naligner = pymuscle5.Aligner()\nmsa = aligner.align(sequences)\n\nfor seq in msa.sequences:\n    print(f\"\u003e{seq.name.decode()}\")\n    print(seq.sequence.decode())\n```\n\n### 🧪 [Scikit-bio](https://github.com/biocore/scikit-bio)\n\n```python\nimport os\n\nimport skbio.io\nimport pymuscle5\n\npath = os.path.join(\"pymuscle\", \"tests\", \"data\", \"swissprot-halorhodopsin.faa\")\nrecords = list(skbio.io.read(path, \"fasta\"))\n\nsequences = [\n    pymuscle5.Sequence(record.metadata[\"id\"].encode(), record.values.view('B'))\n    for record in records\n]\n\naligner = pymuscle5.Aligner()\nmsa = aligner.align(sequences)\n\nfor seq in msa.sequences:\n    print(f\"\u003e{seq.name.decode()}\")\n    print(seq.sequence.decode())\n```\n\n*We need to use the [`view`](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.view.html)\nmethod to get the sequence viewable by Cython as an array of `unsigned char`.*\n\n\n## 💭 Feedback\n\n### ⚠️ Issue Tracker\n\nFound a bug ? Have an enhancement request ? Head over to the [GitHub issue\ntracker](https://github.com/althonos/pymuscle5/issues) if you need to report\nor ask something. If you are filing in on a bug, please include as much\ninformation as you can about the issue, and try to recreate the same bug\nin a simple, easily reproducible situation.\n\n### 🏗️ Contributing\n\nContributions are more than welcome! See\n[`CONTRIBUTING.md`](https://github.com/althonos/pymuscle5/blob/main/CONTRIBUTING.md)\nfor more details.\n\n## 📋 Changelog\n\nThis project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html)\nand provides a [changelog](https://github.com/althonos/pymuscle5/blob/main/CHANGELOG.md)\nin the [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) format.\n\n\n## ⚖️ License\n\nThis library is provided under the [GNU General Public License v3.0](https://choosealicense.com/licenses/gpl-3.0/).\nThe MUSCLE code was written by [Robert Edgar](https://github.com/rcedgar) and is distributed under the\nterms of the GPLv3 as well. See `vendor/muscle/LICENSE` for more information.\n\n*This project is in no way not affiliated, sponsored, or otherwise endorsed\nby the [original MUSCLE authors](https://github.com/rcedgar). It was developed\nby [Martin Larralde](https://github.com/althonos/) during his PhD project\nat the [European Molecular Biology Laboratory](https://www.embl.de/) in\nthe [Zeller team](https://github.com/zellerlab).*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falthonos%2Fpymuscle5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falthonos%2Fpymuscle5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falthonos%2Fpymuscle5/lists"}