{"id":25596846,"url":"https://github.com/nanoporetech/bwapy","last_synced_at":"2025-04-13T02:31:22.146Z","repository":{"id":85586328,"uuid":"96693026","full_name":"nanoporetech/bwapy","owner":"nanoporetech","description":"Python bindings to bwa mem","archived":false,"fork":false,"pushed_at":"2020-03-26T09:58:58.000Z","size":6260,"stargazers_count":32,"open_issues_count":2,"forks_count":12,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-06T08:02:14.514Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nanoporetech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2017-07-09T15:24:54.000Z","updated_at":"2024-12-06T17:13:41.000Z","dependencies_parsed_at":"2023-03-14T03:30:18.510Z","dependency_job_id":null,"html_url":"https://github.com/nanoporetech/bwapy","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanoporetech%2Fbwapy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanoporetech%2Fbwapy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanoporetech%2Fbwapy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanoporetech%2Fbwapy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nanoporetech","download_url":"https://codeload.github.com/nanoporetech/bwapy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248657795,"owners_count":21140841,"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":[],"created_at":"2025-02-21T12:34:47.273Z","updated_at":"2025-04-13T02:31:22.130Z","avatar_url":"https://github.com/nanoporetech.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"bwapy\n=====\n\n*This package is no longer maintained by Oxford Nanopore Technologies. It is left here\nfor posterity as we know of no other python binding to bwa.*\n---\n\n[![Build Status](https://travis-ci.org/nanoporetech/bwapy.svg?branch=master)](https://travis-ci.org/nanoporetech/bwapy)\n\nPython bindings to `bwa mem` aligner; sufficient to load and index and perform\nalignments of sequences to the index to obtain basic statistics.\n\nThese python bindings are licensed under Mozilla Public License 2.0, bwa is licenced\nunder GNU General Public License v3.0.\n\nDocumentation can be found at https://nanoporetech.github.io/bwapy/.\n\nInstallation\n------------\n\nThe git source repository contains bwa as a submodule. The repository should therefore\nbe cloned using the recursive option.\n\nThe package `setup.py` script requires `libbwa.a` to have been built in the submodule\ndirectory before running. This can be performed via the `libbwa.a` target, which first\nmakes some amendments to the bwa/Makefile. To build and install the package one should\ntherefore run:\n\n    git clone --recursive https://github.com/nanoporetech/bwapy.git\n    cd bwapy\n    make bwa/libbwa.a \n    python setup.py install\n\n\nPerforming Alignments\n---------------------\n\nThe `BwaAligner` class provides a pythonic interface to `bwa mem` aligner. It\ntakes as input a bwa index fileset on construction and can then be used to find\nalignments of sequences given as strings:\n\n```python\nfrom bwapy import BwaAligner\nindex = 'path/to/index' # the path given to bwa index\nseq = 'ACGATCGCGATCGA'\n\naligner = BwaAligner(index)\nalignments = aligner.align_seq(seq)\nprint('Found {} alignments.'.format(len(alignments))\nfor aln in alignments:\n    print('  ', aln)\n```\n\nThe alignments are returned as a named tuple, e.g.:\n\n```python\nAlignment(rname='yeast', orient='+', pos=0, mapq=60, cigar='915M3D29M3D27M3D13M', NM=12)\n```\n\nAlignment parameters can be given as they are on the `bwa mem` command line:\n\n```python\nfrom bwapy import BwaAligner\nindex = 'path/to/index'\noptions = '-x ont2d -A 1 -B 0'\naligner = BwaAligner(index, options=options)\n```\n\nSome options which do not make sense when aligning single sequences, have been\ndisabled (notably options related to paired-end reads).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnanoporetech%2Fbwapy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnanoporetech%2Fbwapy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnanoporetech%2Fbwapy/lists"}