{"id":37081300,"url":"https://github.com/kyu999/ssw_aligner","last_synced_at":"2026-01-14T09:52:38.568Z","repository":{"id":57470967,"uuid":"153205318","full_name":"kyu999/ssw_aligner","owner":"kyu999","description":"Python implementation of Striped Smith-Waterman Algorithm","archived":false,"fork":false,"pushed_at":"2024-03-04T05:32:01.000Z","size":907,"stargazers_count":24,"open_issues_count":4,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-12-05T13:19:26.091Z","etag":null,"topics":["bio","bioinformatics","local-alignment","smith-waterman-alignment"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/ssw_aligner/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kyu999.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-16T01:39:32.000Z","updated_at":"2025-05-28T14:10:41.000Z","dependencies_parsed_at":"2022-09-10T02:02:27.219Z","dependency_job_id":null,"html_url":"https://github.com/kyu999/ssw_aligner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kyu999/ssw_aligner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyu999%2Fssw_aligner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyu999%2Fssw_aligner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyu999%2Fssw_aligner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyu999%2Fssw_aligner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kyu999","download_url":"https://codeload.github.com/kyu999/ssw_aligner/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyu999%2Fssw_aligner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28416122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["bio","bioinformatics","local-alignment","smith-waterman-alignment"],"created_at":"2026-01-14T09:52:37.377Z","updated_at":"2026-01-14T09:52:38.561Z","avatar_url":"https://github.com/kyu999.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SSW Aligner\n\nPython implementation of [Striped Smith-Waterman Algorithm](https://academic.oup.com/bioinformatics/article/23/2/156/205631)\n\n### Comparison with other Smith-Waterman Implementation in Python as of 2018/10/18\n|| ssw_aligner | [swalign](https://github.com/mbreese/swalign) | [scikit-bio](https://github.com/biocore/scikit-bio) |\n|:---:|:---:|:---:|:---:|\n| version | 0.0.7 | 0.3.4 | 0.4.2 |\n| Python2 | ○ | ○ | ✗ |\n| Python3 | ○ | ○ | ○ |\n| benchmark | 1.049 seconds | 2326.898 seconds | 1.567 seconds |\n| zipped package size | 108 KB | 9 KB | 8.6 MB |\n| Installable to Google Dataflow | ○ | ○ | ✗ |\n\n### Dependencies\n- [numpy==1.12.0](http://www.numpy.org/)\n- [Cython==0.28.3](https://cython.org/)\n\n### Installation\n```\npip install numpy==1.12.0\npip install Cython==0.28.3\npip install ssw_aligner\n```\n\n### Quick Start\n```\nfrom ssw_aligner import local_pairwise_align_ssw\n\nquery_seq = 'TTTTTAAAAA'\ntarget_seq = 'GGGGTTTT'\nalignment = local_pairwise_align_ssw(query_seq,\n                                     target_seq,\n                                     gap_open_penalty=11,\n                                     gap_extend_penalty=1,\n                                     match_score=2,\n                                     mismatch_score=-3)\n\n# get score\nalignment.optimal_alignment_score\n\n# get query start, end\nalignment.query_begin\nalignment.query_end\n\n# get target start, end\nalignment.target_begin\nalignment.target_end_optimal\n\n# get aligned sequence\nalignment.aligned_query_sequence\nalignment.aligned_target_sequence\n\n# get cigar infomation\nalignment.cigar\n\n# check whether the index starts from 0 or not\nalignment.is_zero_based()\n\n# make the index start from n(0 or 1)\nalignment.set_zero_based(0) # start from 0\nalignment.set_zero_based(1) # start from 1\n```\n\n##### Benchmark script:\n```\nimport random\nimport time\n\nfrom skbio import DNA\nimport skbio\nimport swalign\nimport ssw_aligner\n\n\nmatch = 2\nmismatch = -1\nscoring = swalign.NucleotideScoringMatrix(match, mismatch)\nsw = swalign.LocalAlignment(scoring)\n\nbases = ['A', 'T', 'C', 'G']\ndef generate_gene(length):\n    return ''.join([random.choice(bases) for i in range(0, length)])\n\n\ndef benchmark(align_func):\n    start = time.time()\n    for i in range(0, 100):\n        for seq_length in range(100, 2000, 500):\n            seq1, seq2 = generate_gene(seq_length), generate_gene(seq_length)\n            align_func(seq1, seq2)\n    return time.time() - start\n\n\n# input should be DNA type\ndef benchmark_skbio(align_func):\n    start = time.time()\n    for i in range(0, 100):\n        for seq_length in range(100, 2000, 500):\n            seq1, seq2 = generate_gene(seq_length), generate_gene(seq_length)\n            align_func(DNA(seq1), DNA(seq2))\n    return time.time() - start\n\n\nprint('ssw_aligner')\nssw_aligner_time = benchmark(ssw_aligner.local_pairwise_align_ssw)\nprint(ssw_aligner_time)\n\nprint('skbio')\nskbio_time = benchmark_skbio(skbio.alignment.local_pairwise_align_ssw)\nprint(skbio_time)\n\nprint('swalign')\nswalign_time = benchmark(sw.align)\nprint(swalign_time)\n\n```\n\nThis benchmark script is executed by the environment below:\n- MacBook Air (13-inch, Mid 2012)\n- Processor: 2 GHz Intel Core i7\n- Memory: 8GB\n\n※This repository uses a part of codes fetched from [scikit-bio](https://github.com/biocore/scikit-bio)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyu999%2Fssw_aligner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyu999%2Fssw_aligner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyu999%2Fssw_aligner/lists"}