{"id":25002245,"url":"https://github.com/pprattis/hidden-markov-model-for-sequence-state-decoding","last_synced_at":"2025-10-28T03:47:35.536Z","repository":{"id":194621973,"uuid":"224419110","full_name":"pprattis/Hidden-Markov-Model-for-sequence-state-decoding","owner":"pprattis","description":"A Python script that implements an HMM with two states a and b. When the model is in state a it is more likely to emit purines A and G. When it is in state b it is more likely to emit pyramidines C and T. Decode the most likely sequence of states for the GGCT sequence using logarithmic scoring instead of normal probability scoring.","archived":false,"fork":false,"pushed_at":"2019-11-27T12:05:41.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-04T21:44:20.610Z","etag":null,"topics":["bioinformatics","computer-science","decoding","hmm","hmm-viterbi-algorithm","nucleotides","program","python","sequence","states","student"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/pprattis.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,"governance":null}},"created_at":"2019-11-27T11:50:50.000Z","updated_at":"2019-11-27T12:06:47.000Z","dependencies_parsed_at":"2023-09-14T10:27:46.255Z","dependency_job_id":null,"html_url":"https://github.com/pprattis/Hidden-Markov-Model-for-sequence-state-decoding","commit_stats":null,"previous_names":["peteprattis/hidden-markov-model-for-sequence-state-decoding","pprattis/hidden-markov-model-for-sequence-state-decoding"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pprattis%2FHidden-Markov-Model-for-sequence-state-decoding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pprattis%2FHidden-Markov-Model-for-sequence-state-decoding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pprattis%2FHidden-Markov-Model-for-sequence-state-decoding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pprattis%2FHidden-Markov-Model-for-sequence-state-decoding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pprattis","download_url":"https://codeload.github.com/pprattis/Hidden-Markov-Model-for-sequence-state-decoding/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246243567,"owners_count":20746307,"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","computer-science","decoding","hmm","hmm-viterbi-algorithm","nucleotides","program","python","sequence","states","student"],"created_at":"2025-02-04T21:40:39.119Z","updated_at":"2025-10-28T03:47:30.505Z","avatar_url":"https://github.com/pprattis.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Python Program / Project\n\n**This is a Python project from my early days as a Computer Science student**\n\n_This programm was created for the sixth semester class Bioinformatics\nand is one of the final projects for the class_\n\n\u003e #### Description of project\n\u003e\n\u003e\u003eA Python script that implements an HMM with two states a and b. When the model is in state a it is more likely to emit purines A and G. When it is in state b it is more likely to emit pyramidines C and T. Decode the most likely sequence of states for the GGCT sequence using logarithmic scoring instead of normal probability scoring.\n\n\u003e #### Implementtion of project\n\u003e\n\u003eIn more detail, Table A corresponds to:\n\u003e 1. probability 0.9 to be found from state a to state a and state b to state b\n\u003e 2. probability 0.1 to be found from state a to b and from state b to a.\u003cbr\u003e\n\u003e\n\u003eTable π corresponds to:\u003cbr\u003e\n\u003eInitial probability 0.5 to be first in state a, and 0.5 to be first in state b.\u003cbr\u003e\n\u003eFinally, our model is described by the last figure that matches the shape of the book, adding the 0.5, 0.5 probabilities we have described above.\u003cbr\u003e\n\u003eLet's make the model more illustrative. This holds that when we are in state a, the probability that A will emit is 0.4, G 0.4, T 0.1 and C 0.1. Also, state b is given the probability of emitting A 0.2, G 0.2, T 0.3 and C 0.3.\u003cbr\u003e\n\u003eGiving better path for Q = GGTC sequence A -\u003e A -\u003e A -\u003e A.\u003cbr\u003e\n\u003eAnd Viterbi score = ln (0.2) + ln (0.072) + ln (0.00648) + ln (0.0005832) = -1.609 - 2.631 - 5.039 - 7.446 ~ = - 16.725\n\n\u003e #### About this project\n\u003e\n\u003e - The comments to make the code understandable, are within the .py archive\n\u003e - This project was written in IDLE, Python’s Integrated Development and Learning Environment.\n\u003e - This program runs for Python version 2.7\n\u003e - This repository was created to show the variety of the work I did and experience I gained as a student\n\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpprattis%2Fhidden-markov-model-for-sequence-state-decoding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpprattis%2Fhidden-markov-model-for-sequence-state-decoding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpprattis%2Fhidden-markov-model-for-sequence-state-decoding/lists"}