{"id":19434715,"url":"https://github.com/ekg/wflign","last_synced_at":"2025-10-17T11:31:15.734Z","repository":{"id":51363814,"uuid":"312644963","full_name":"ekg/wflign","owner":"ekg","description":"the we-flyin WFA-guided ultralong tiling sequence aligner","archived":false,"fork":false,"pushed_at":"2021-05-13T11:48:07.000Z","size":5417,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-03T10:38:10.880Z","etag":null,"topics":["alignment","wavefront","wfa"],"latest_commit_sha":null,"homepage":"","language":"C++","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/ekg.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":"2020-11-13T17:44:22.000Z","updated_at":"2022-04-15T16:58:44.000Z","dependencies_parsed_at":"2022-08-28T03:21:07.255Z","dependency_job_id":null,"html_url":"https://github.com/ekg/wflign","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekg%2Fwflign","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekg%2Fwflign/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekg%2Fwflign/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekg%2Fwflign/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ekg","download_url":"https://codeload.github.com/ekg/wflign/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250704880,"owners_count":21473780,"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","wavefront","wfa"],"created_at":"2024-11-10T14:47:17.474Z","updated_at":"2025-10-17T11:31:15.639Z","avatar_url":"https://github.com/ekg.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wflign\n\n_the we-flyin WFA-guided ultralong sequence aligner_\n\n## what\n\n`wflign` derives a global alignment for pairs of long sequences using very little memory and time.\n\nRather than directly aligning the sequences, `wflign` aligns them to each other in small pieces, typically _s_ = 1kbp.\nIt computes the global alignment with [WFλ](https://github.com/ekg/wflambda), a version of the affine-gapped reduced wavefront algorithm (WFA) based on an abstract match function λ.\n\nWFλ is computed over a matrix representing the global alignment between the sequences at _s_-bp resolution.\nEach cell in the matrix corresponds to the alignment of a specific pair of _s_-length fragment from the target and query.\n\nTo determine if the cell is a match (and guide WFλ), we compute the alignment using a fast pairwise alignment algorithm, indicating a match when we find an alignment within the given edit distance threshold.\nFinally, we use the WFλ traceback to determine and emit the set of base-level alignments on the optimal path corresponding to our _s_-bp matrix cells.\n\n## why\n\nIt isn't easy to align long sequences.\nGenerally, the time and memory required to compute a pairwise alignment increase quadratically with query and target length.\nIt can be impractical to directly align very long sequences, and we often require heuristic methods to determine regions of the input that are likely to contain a chain of matches that we can align with an expensive pairwise algorithm.\n\nWFA suggests an efficient way to reduce the amount of computation required to obtain the optimal alignment between two sequences.\nIt reduces the cost to be quadratic in the score (penalty) of the optimal alignment.\nThus, it can be very cheap when sequences are highly similar and the optimal alignment score is low.\nHowever, regions of the alignment of low quality can increase the memory and runtime costs of the algorithm.\n\nTo avoid such limitations, _wflign_ applies WFA at a high level, using it to guide the alignment process, and keeping the largest alignment problem size small.\nOur implementation thus requires only the memory to align a single segment and 1/_s_ the memory of the full WFA.\nThis approach is more flexible than using a fixed-width band (it effectively has a variable bandwidth), requires no heuristic seeding step, and can benefit from parallel exploration of the wavefront.\n\n## how\n\nTo build:\n\n```\ncmake -H. -Bbuild \u0026\u0026 cmake --build build -- -j 16\n```\n\nIt can then be run with `wflign`.\n\n## limitations\n\n`wflign` assumes that the sequences are of suitable identity and oriented in the same direction.\nThe provided executable is intended for testing.\n\n## todo\n\nThis is a work in progress.\nTo complete:\n\n- Correctly compute traceback to bound PAF output (requires caching alignments).\n- Explore recursive evaluation to find SVs (direct repeats and inversions) in unaligned regions of the query and target.\n- Parallel wavefront expansion.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekg%2Fwflign","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fekg%2Fwflign","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekg%2Fwflign/lists"}