{"id":20693391,"url":"https://github.com/prihoda/usum","last_synced_at":"2025-09-09T12:46:41.645Z","repository":{"id":57477359,"uuid":"260867614","full_name":"prihoda/usum","owner":"prihoda","description":"USUM: Plotting sequence similarity using USEARCH \u0026 UMAP \u0026 t-SNE","archived":false,"fork":false,"pushed_at":"2021-02-26T15:39:07.000Z","size":1326,"stargazers_count":14,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-27T03:06:09.538Z","etag":null,"topics":["dna","plot","protein","sequence","similarity","t-sne","uclust","umap","usearch"],"latest_commit_sha":null,"homepage":"","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/prihoda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-03T09:22:09.000Z","updated_at":"2025-05-06T15:27:18.000Z","dependencies_parsed_at":"2022-08-30T18:30:55.867Z","dependency_job_id":null,"html_url":"https://github.com/prihoda/usum","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/prihoda/usum","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prihoda%2Fusum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prihoda%2Fusum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prihoda%2Fusum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prihoda%2Fusum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prihoda","download_url":"https://codeload.github.com/prihoda/usum/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prihoda%2Fusum/sbom","scorecard":{"id":744957,"data":{"date":"2025-08-11","repo":{"name":"github.com/prihoda/usum","commit":"c2654050711c9ee22cbebe644cd174fb31578f35"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/26 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-22T18:27:13.323Z","repository_id":57477359,"created_at":"2025-08-22T18:27:13.323Z","updated_at":"2025-08-22T18:27:13.323Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274243402,"owners_count":25248149,"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","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["dna","plot","protein","sequence","similarity","t-sne","uclust","umap","usearch"],"created_at":"2024-11-16T23:26:28.023Z","updated_at":"2025-09-09T12:46:41.574Z","avatar_url":"https://github.com/prihoda.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# USUM: Plotting sequence similarity embeddings using USEARCH \u0026 UMAP\n\nUSUM uses [USEARCH](https://drive5.com/usearch/) and [UMAP](https://github.com/lmcinnes/umap) (or [t-SNE](https://scikit-learn.org/stable/modules/generated/sklearn.manifold.TSNE.html)) to plot DNA 🧬 and protein 🧶 sequence similarity embeddings.\n\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/usum.svg?color=green\u0026label=PyPI%20downloads)](https://pypi.python.org/pypi/usum/)\n[![PyPI license](https://img.shields.io/pypi/l/usum.svg)](https://pypi.python.org/pypi/usum/)\n[![PyPI version](https://badge.fury.io/py/usum.svg)](https://pypi.python.org/pypi/usum/)\n[![CI](https://api.travis-ci.org/prihoda/usum.svg?branch=master)](https://travis-ci.org/prihoda/usum)\n\n## Installation\n\n1. Install `USEARCH` dependency manually: https://drive5.com/usearch/download.html \n\u003cbr\u003e(consider supporting the author by buying the 64bit license)\n\n2. Install `usum` using PIP:\n\n```bash\npip install usum\n```\n\n## Usage\n\nUse `usum` to plot input protein or DNA sequences in FASTA format.\n\nShow all available options using `usum --help`\n\n### Minimal example\n\n\n```bash\nusum example.fa --maxdist 0.2 --termdist 0.3 --output example\n```\n\n### Multiple input files with labels\n\n```bash\nusum first.fa second.fa --labels First Second --maxdist 0.2 --termdist 0.3 --output example\n```\n\nThis will produce a PNG plot:\n\n![UMAP static example](docs/example1.png?raw=true \"UMAP static example\")\n\nAn interactive [Bokeh](https://bokeh.org) HTML plot is also created:\n\n![UMAP Bokeh example](docs/example2.png?raw=true \"UMAP Bokeh example\")\n\n### Using t-SNE instead of UMAP\n\nYou can also produce a t-SNE plot using the `--tsne` flag.\n\n```bash\nusum first.fa second.fa --labels First Second --maxdist 0.2 --termdist 0.3 --tsne --output example\n```\n\nThis will produce a PNG plot:\n\n![UMAP static example](docs/example1.png?raw=true \"UMAP static example\")\n### Plotting random subset\n\nYou can use `--limit` to extract and plot a random subset of the input sequences.\n\n```bash\n# Plot 10k sequences from each input file\nusum first.fa second.fa --labels First Second --limit 10000 --maxdist 0.2 --termdist 0.3 --output example\n```\n\nYou can control randomness and reproducibility using the `--seed` option.\n\n### Plotting options\n\nSee `usum --help` for all plotting options.\n\nSee [UMAP API Guide](https://umap-learn.readthedocs.io/en/latest/api.html) for more info about the UMAP options.\n\n- Use `--limit` to plot a random subset of records\n- Use `--width` and `--height` to control plot size in pixels\n- Use `--resume` to reuse previous distance matrix from the output folder\n- Use `--tsne` to produce a t-SNE embedding instead of UMAP (you can use this with `--resume`)\n- Use `--umap-spread` to control how close together the embedded points are in the UMAP embedding\n- Use `--umap-min-dist` to control minimum distance between points in UMAP embedding\n- Use `--neighbors` to control number of neighbors in UMAP graph\n\n\n### Reusing previous results\n\nWhen changing just the plot options, you can use `--resume` to reuse previous results from the output folder.\n\n**Warning** This will reuse the previous distance matrix, so changes to limits or USEARCH args won't take effect.\n\n```bash\n# Reuse result from umap output directory\nusum --resume --output example --width 600 --height 600 --theme fire\n```\n\n### Programmatic use\n\n```python\nfrom usum import usum\n\n# Show help\nhelp(usum)\n\n# Run USUM\nusum(inputs=['input.fa'], output='usum', maxdist=0.2, termdist=0.3)\n```\n\n## How it works\n\n- A sparse distance matrix is calculated using USEARCH [calc_distmx](https://drive5.com/usearch/manual/cmd_calc_distmx.html) command. \n- The distances are based on % identity, so the method is agnostic to sequence type (DNA or protein)\n- The distance matrix is embedded as a `precomputed` metric using [UMAP](https://github.com/lmcinnes/umap) \n- The embedding is plotted using [umap.plot](https://umap-learn.readthedocs.io/en/latest/plotting.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprihoda%2Fusum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprihoda%2Fusum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprihoda%2Fusum/lists"}