{"id":20035901,"url":"https://github.com/joao-conde/fer-bio","last_synced_at":"2026-05-10T13:42:06.727Z","repository":{"id":68247566,"uuid":"232836800","full_name":"joao-conde/fer-bio","owner":"joao-conde","description":"Repository to host the project for \"Bioinformatics\", a course @ FER","archived":false,"fork":false,"pushed_at":"2020-02-03T17:40:25.000Z","size":1520,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-12T18:38:40.102Z","etag":null,"topics":["bioinformatics","cpp","minimizers","python3"],"latest_commit_sha":null,"homepage":"https://www.fer.unizg.hr/en/course/bio","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/joao-conde.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-09T15:12:10.000Z","updated_at":"2020-03-06T23:05:33.000Z","dependencies_parsed_at":"2023-02-22T06:45:47.597Z","dependency_job_id":null,"html_url":"https://github.com/joao-conde/fer-bio","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/joao-conde%2Ffer-bio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joao-conde%2Ffer-bio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joao-conde%2Ffer-bio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joao-conde%2Ffer-bio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joao-conde","download_url":"https://codeload.github.com/joao-conde/fer-bio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241465111,"owners_count":19967243,"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","cpp","minimizers","python3"],"created_at":"2024-11-13T10:09:46.162Z","updated_at":"2026-05-10T13:42:01.693Z","avatar_url":"https://github.com/joao-conde.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bioinformatics\n\nThis repository hosts an implementation of a **minimizer** bioinformatics algorithm.\n\nThe code was developed accordingly to the paper:\n[*\"Reducing storage requirements for biological sequence comparison\"*](https://academic.oup.com/bioinformatics/article/20/18/3363/202143) by Michael Roberts, Wayne Hayes, Brian R. Hunt, Stephen M. Mount and James A. Yorke.\n\nMany bioinformatics algorithms use **short substrings of a longer sequence**, commonly known as ***k*-mers**, for indexing, search or assembly. **Minimizers** allow **efficient binning of those *k*-mers** so that some information about the sequence contiguity is preserved.\n\n## How to compile and run\n\nCompiled with g++ version 9.2.0:\n```\ng++ minimizer.cpp -o minimize\n```\n\nRun with:\n```\n./minimize INPUT_FILE OUTPUT_FILE W K F\n```\n\nwith **W, K and F** being:\n- **W**: window size in k-mers (how many k-mers per window)\n- **K**: k-mer size\n- **F**: percentage of top most frequent minimizers to remove (0 to 1).\n\n## **Review of *\"Reducing storage requirements for biological sequence comparison\"***\n\nSequence comparison is common in bioinformatics, used for example in applications such as overlap determination in genome sequences and genome assembly algorithms.\n\nOne commonly used method is the **seed and extend** approach. The first step is **choosing the set of *seeds*** that represent each string. ***Seeds* are contiguous *k*-letter substrings called *k*-mers.**\n\nThe number of *k*-mer entries and the space required to store the entire list of *k*-mers can be too large. Hence, to **reduce the storage space** required we must **store less *k*-mers**. But **which ones** to choose?\n\nThe authors propose a method that allows us to select from each string a **set of special *k*-mers (to be used as seeds) called minimizers.**\n\n### **Interior minimizers**\n\nThe first step in choosing minimizers, is to **select an ordering** for the set of all *k*-mers. **One convenient ordering is simply lexicographic order** (with AAAA being the “smallest” possible 4-mer). \n\nFurthermore, the authors point out that *w* adjacent *k*-mers correspond to a window of *l = w + k − 1* letters. Essentially, a set of *w* consecutive *k*-mers covers a string of exactly *w + k − 1* letters. In this context, *consecutive* means that each *k*-mer is shifted by one letter from the previous one.\n\n**After ordering**, examine *w* consecutive *k*-mers and **select the smallest as the window minimizer.**\n\nAdditionally, adjacent windows often share the same minimizer. Consequently, **gaps between minimizers can appear** and are caused when the minimizers of two adjacent windows are more than *k* positions apart. Gaps can be at most *w − k* in size, so **setting *w ≤ k* ensures no gaps occur between minimizers.** On the other hand, if *w \u003e k*, minimizers are sparse in the string.\n\n\n### **End minimizers (left-end and right-end)**\n\nAs mentioned, *w ≤ k* guarantees that no gaps appear between adjacent minimizers, but it still allows **some letters at each end of the string to be outside any minimizers.** If the match is less than *w + k − 1* letters, then it is possible for the strings to have no *(w, k)*-minimizer in common. **This problem is easily fixed by the introduction of end-minimizers**. A *(u, k)*-end-minimizer is chosen from a window of size *u* which is anchored to one end of the string, and the set of *k*-end-minimizers are comprised of all such *(u, k)*-end-minimizers for *u* from 1 up to some maximum window size *v*.\n\n### **A mixed strategy**\nFinally, **combining both *(w, k)*-minimizers of a string with *(u, k)*-end-minimizers** for *u = 1, . . . , w−1* at both ends of the string, if *w ≤ k*, **every base in a string will be covered with some minimizer.**\n\nAfter finding the minimizers for the given genome, it is a good practice to **remove the most frequent ones**, since these are not good for sequence matching (because **their repitition across the genome means it is harder to conclude where that substring came from when aligning two strings**).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoao-conde%2Ffer-bio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoao-conde%2Ffer-bio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoao-conde%2Ffer-bio/lists"}