{"id":15578381,"url":"https://github.com/davep/flounder_score","last_synced_at":"2025-04-04T10:57:50.925Z","repository":{"id":39761429,"uuid":"228668013","full_name":"davep/flounder_score","owner":"davep","description":"An oh-so-totally serious novel method of scoring sequences using ancient knowledge found on some old tiles","archived":false,"fork":false,"pushed_at":"2022-12-08T12:40:13.000Z","size":163,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T00:37:14.656Z","etag":null,"topics":["bioinformatics","dna","python","python3","python310","python35","python36","python37","python38","python39","score"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davep.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","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":"2019-12-17T17:28:46.000Z","updated_at":"2021-10-29T08:06:18.000Z","dependencies_parsed_at":"2023-01-25T04:30:26.538Z","dependency_job_id":null,"html_url":"https://github.com/davep/flounder_score","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davep%2Fflounder_score","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davep%2Fflounder_score/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davep%2Fflounder_score/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davep%2Fflounder_score/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davep","download_url":"https://codeload.github.com/davep/flounder_score/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247166157,"owners_count":20894652,"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","dna","python","python3","python310","python35","python36","python37","python38","python39","score"],"created_at":"2024-10-02T19:10:01.445Z","updated_at":"2025-04-04T10:57:50.906Z","avatar_url":"https://github.com/davep.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flounder Score\n\n[![PyPI](https://badge.fury.io/py/flounder-score.svg)](https://badge.fury.io/py/flounder-score)\n\n## Introduction\n\nAs a software developer who knows little to nothing about biology, genetics\nor bioinformatics, I felt it was important that I tried to make my mark on\nthese fields. Over the last couple or so years, I've seen that a lot of time\nand effort goes into deciding how \"good\" or \"bad\" a sequence is, involving\nmassive amounts of data-crunching and machine learning and the like.\n\nPersonally, I think this all seems too much like hard work.\n\nSurely, I thought, there has to be a simple way of assigning some value to a\nletter and then summing up all of those values. I mean, that's all this\ngenetics lark is, right? A handful of letters stuck together?\n\nWith this deep and valuable insight in mind, I looked around for a simple\nmethod of scoring letters. After a very long search (seriously, it must have\nlasted a whole mug of coffee!), I found some ancient tiles, each of which\ndescribed the value of the letters normally used in English. At this point\nit was obvious that this traditional way of weighting the constituent parts\nof one language should and could be applied to another.\n\nAnd so the *Flounder Score* was born.\n\n## Installation\n\nThe library can be installed [from\nPyPI](https://pypi.org/project/flounder-score/):\n\n```sh\n$ pip3 install flounder-score\n```\n\n## Usage\n\nThe Flounder Score library provides the following functions:\n\n### score( sequence: str ) -\u003e int\n\nThis function takes a string that is a sequence, applies a complex algorithm\nusing the values found on the ancient tiles, and returns an integer value\nthat is the Flounder Score for that sequence. Case is not important. IUAPC\ncodes are taken into account.\n\nExample:\n\n```python\n\u003e\u003e\u003e from flounder import score\n\u003e\u003e\u003e score( \"gtac\" )\n7\n```\n\n### scores( sequence: str ) -\u003e List[ Tuple[ str, int ] ]\n\nThis function takes a string that is a sequence, applies a complex algorithm\nusing the values found on the ancient tiles, and returns a list of tuples.\nEach tuple is the base at that position in the input string, along with its\nindividual score.\n\nExample:\n\n```python\n\u003e\u003e\u003e from flounder import scores\n\u003e\u003e\u003e scores( \"gtac\" )\n[('g', 2), ('t', 1), ('a', 1), ('c', 3)]\n```\n\n### score_to_the_max( sequence: str ) -\u003e integer\n\nThis function takes a string that is a sequence, applies an even more\ncomplex algorithm using the values found on the ancient tiles, and returns\nan integer value that is the \"to-the-max\" Flounder Score. Case is not\nimportant. IUAPC codes are taken into account.\n\nThe difference with this scoring is that, for the bases, not only do they\nscore for their own ancient tile value, they also score for the ancient tile\nvalue of every IUAPC code that is related to that base.\n\nExample:\n\n```python\n\u003e\u003e\u003e from flounder import score_to_the_max\n\u003e\u003e\u003e score_to_the_max( \"gtac\" )\n86\n```\n\n### scores_to_the_max( sequence: str ) -\u003e List[ Tuple[ str, int ] ]\n\nThis function takes a string that is a sequence, applies a complex algorithm\nusing the values found on the ancient tiles, and returns a list of tuples.\nEach tuple is the base at that position in the input string, along with its\nindividual score. The score provided for each base is the `score_to_the_max`\nFlounder Score.\n\nExample:\n\n```python\n\u003e\u003e\u003e from flounder import scores_to_the_max\n\u003e\u003e\u003e scores_to_the_max( \"gtac\" )\n[('g', 19), ('t', 24), ('a', 20), ('c', 23)]\n\u003e\u003e\u003e\n```\n\n### codon_score( sequence: str ) -\u003e int\n\nThis function takes a string that is a sequence, translates it to an AA\nsequence (using as many codons as it can find from the first position),\napplies a complex algorithm using the values found on the ancient tiles, and\nreturns an integer value that is the Flounder Score for that sequence. Case\nis not important. IUAPC codes are taken into account.\n\nFor example:\n\n```python\n\u003e\u003e\u003e from flounder import codon_score\n\u003e\u003e\u003e codon_score( \"AGACGCAGTCTT\" )\n4\n```\n\n### codon_scores( sequence: str ) -\u003e List[ Tuple[ str, int ] ]\n\nThis function takes a string that is a sequence, translates it to an AA\nsequence (using as many codons as it can find from the first position),\napplies a complex algorithm using the values found on the ancient tiles, and\nreturns a list of tuples. Each tuple is the codon that was found in the\ninput string, along with its individual score.\n\nFor example:\n\n```python\n\u003e\u003e\u003e from flounder import codon_scores\n\u003e\u003e\u003e codon_scores( \"AGACGCAGTCTT\" )\n[('AGA', 1), ('CGC', 1), ('AGT', 1), ('CTT', 1)]\n```\n\n## Building and testing\n\nThis library is designed to be built using `make`, `pipenv` and Python 3.8.\nIf you have `pipenv` installed and have an installation of Python 3.8 that\nit can see you should only need to type `make` in the root directory of the\nrepository.\n\n```sh\n$ make\npipenv sync --dev\nCreating a virtualenv for this project...\nPipfile: /Users/davep/flounder_score/Pipfile\nUsing /Users/davep/.pyenv/versions/3.8.12/bin/python3.8 (3.8.12) to create virtualenv...\n✔ Successfully created virtual environment!\nVirtualenv location: /Users/davep/flounder_score/.venv\nInstalling dependencies from Pipfile.lock (5d6c60)...\n  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 58/58 — 00:00:23\nTo activate this project's virtualenv, run pipenv shell.\nAlternatively, run a command inside the virtualenv with pipenv run.\nAll dependencies are now up-to-date!\n```\n\nUnit tests can be run like this:\n\n```sh\n$ make test\npipenv run coverage run -m unittest discover -v -t flounder_score tests\ntest_case (tests.tests.TestCodonFlounderScore)\nTest that we don't care about case. ... ok\ntest_empty (tests.tests.TestCodonFlounderScore)\nTest that an empty sequence is handled. ... ok\ntest_short (tests.tests.TestCodonFlounderScore)\nTest sequences that are short of having a full codon. ... ok\ntest_some_short (tests.tests.TestCodonFlounderScore)\nTest that a short sequence that has codons gives a score. ... ok\ntest_unknown (tests.tests.TestCodonFlounderScore)\nTest sequences containing things we don't score. ... ok\ntest_all_scored (tests.tests.TestCodonFlounderScores)\nTest that every codon gets some sort of score. ... ok\ntest_empty (tests.tests.TestCodonFlounderScores)\nTest that an empty sequences is handled. ... ok\ntest_short (tests.tests.TestCodonFlounderScores)\nTest sequences that are short of having a full codon. ... ok\ntest_some_short (tests.tests.TestCodonFlounderScores)\nTest that a short sequence that has codons gives a score. ... ok\ntest_unknown (tests.tests.TestCodonFlounderScores)\nTest sequences containing things we don't score. ... ok\ntest_case (tests.tests.TestFlounderScore)\nTest that we don't care about case. ... ok\ntest_empty (tests.tests.TestFlounderScore)\nTest that an empty sequence is handled. ... ok\ntest_unknown (tests.tests.TestFlounderScore)\nTest sequences containing things we don't score. ... ok\ntest_case (tests.tests.TestFlounderScoreToTheMax)\nTest that we don't care about case. ... ok\ntest_empty (tests.tests.TestFlounderScoreToTheMax)\nTest that an empty sequence is handled. ... ok\ntest_unknown (tests.tests.TestFlounderScoreToTheMax)\nTest sequence containing things we don't score. ... ok\ntest_empty (tests.tests.TestFlounderScores)\nTest that an empty sequence is handled. ... ok\ntest_scores (tests.tests.TestFlounderScores)\nTest that the individual scores are correct. ... ok\ntest_unknown (tests.tests.TestFlounderScores)\nTest sequences containing things we don't score. ... ok\ntest_empty (tests.tests.TestFlounderScoresToTheMax)\nTest that an empty sequence is handled. ... ok\ntest_scores (tests.tests.TestFlounderScoresToTheMax)\nTest that the individual scores are correct. ... ok\ntest_unknown (tests.tests.TestFlounderScoresToTheMax)\nTest sequences containing things we don't score. ... ok\n\n----------------------------------------------------------------------\nRan 22 tests in 0.007s\n\nOK\n```\n\nThere are a number of other `Makefile` targets available for all sorts of\nlinting and testing, as well as for building a package. Type:\n\n```sh\n$ make help\n```\n\nto get a list of them all.\n\n[//]: # (README.md ends here)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavep%2Fflounder_score","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavep%2Fflounder_score","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavep%2Fflounder_score/lists"}