{"id":41028437,"url":"https://github.com/maxibor/sourcepredict","last_synced_at":"2026-01-22T10:03:55.961Z","repository":{"id":57469451,"uuid":"161636346","full_name":"maxibor/sourcepredict","owner":"maxibor","description":"Prediction/source tracking of metagenomic samples source using machine learning","archived":false,"fork":false,"pushed_at":"2024-10-14T14:52:16.000Z","size":24479,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-12T01:57:01.722Z","etag":null,"topics":["machine-learning","microbiome","source-tracking"],"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/maxibor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2018-12-13T12:31:18.000Z","updated_at":"2025-12-09T06:29:41.000Z","dependencies_parsed_at":"2025-04-14T19:00:48.033Z","dependency_job_id":"9932bbad-f4c4-43b8-a488-8016e0acbf4c","html_url":"https://github.com/maxibor/sourcepredict","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/maxibor/sourcepredict","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxibor%2Fsourcepredict","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxibor%2Fsourcepredict/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxibor%2Fsourcepredict/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxibor%2Fsourcepredict/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxibor","download_url":"https://codeload.github.com/maxibor/sourcepredict/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxibor%2Fsourcepredict/sbom","scorecard":{"id":629191,"data":{"date":"2025-08-11","repo":{"name":"github.com/maxibor/sourcepredict","commit":"50cdf9995cbb1358dba29ed493304c6018e4b0a1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Code-Review","score":0,"reason":"Found 0/30 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":"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":"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":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/publish_conda.yml:1","Warn: no topLevel permission defined: .github/workflows/publish_pypi.yml:1","Warn: no topLevel permission defined: .github/workflows/sourcepredict_ci.yml:1","Info: no jobLevel write permissions found"],"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish_conda.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/maxibor/sourcepredict/publish_conda.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish_conda.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/maxibor/sourcepredict/publish_conda.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish_pypi.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/maxibor/sourcepredict/publish_pypi.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish_pypi.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/maxibor/sourcepredict/publish_pypi.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish_pypi.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/maxibor/sourcepredict/publish_pypi.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/sourcepredict_ci.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/maxibor/sourcepredict/sourcepredict_ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/sourcepredict_ci.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/maxibor/sourcepredict/sourcepredict_ci.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/publish_pypi.yml:19","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned","Info:   0 out of   1 pipCommand dependencies pinned"],"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":"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":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/publish_pypi.yml:8"],"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":"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:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE: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-21T07:21:36.309Z","repository_id":57469451,"created_at":"2025-08-21T07:21:36.309Z","updated_at":"2025-08-21T07:21:36.309Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28661047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"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":["machine-learning","microbiome","source-tracking"],"created_at":"2026-01-22T10:03:54.710Z","updated_at":"2026-01-22T10:03:55.956Z","avatar_url":"https://github.com/maxibor.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.com/maxibor/sourcepredict.svg?token=pwT9AgYi4qJY4LTp9WUy\u0026branch=master)](https://travis-ci.com/maxibor/sourcepredict) [![Coverage Status](https://coveralls.io/repos/github/maxibor/sourcepredict/badge.svg?branch=master)](https://coveralls.io/github/maxibor/sourcepredict?branch=master) [![Anaconda-Server Badge](https://anaconda.org/maxibor/sourcepredict/badges/installer/conda.svg)](https://conda.anaconda.org/maxibor) [![Documentation Status](https://readthedocs.org/projects/sourcepredict/badge/?version=latest)](https://sourcepredict.readthedocs.io/en/latest/?badge=latest) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10.5281/zenodo.3379603.svg)](https://doi.org/10.5281/zenodo.10.5281/zenodo.3379603)\n [![DOI](https://joss.theoj.org/papers/10.21105/joss.01540/status.svg)](https://doi.org/10.21105/joss.01540)\n\n---\n\n\u003cimg src=\"https://raw.githubusercontent.com/maxibor/sourcepredict/master/img/sourcepredict_logo.png\" width=\"300\"\u003e\n\nSourcepredict is a Python package distributed through Conda, to classify and predict the origin of metagenomic samples, given a reference dataset of known origins, a problem also known as source tracking.\nSourcepredict solves this problem by using machine learning classification on dimensionally reduced datasets.\n\n## Installation\n\nWith conda (recommended)\n\n```bash\n$ conda install -c conda-forge -c maxibor sourcepredict\n```\n\nWith pip\n\n```bash\n$ pip install sourcepredict\n```\n\n## Example\n\n### Input\n\n- Sink taxonomic count file (see [example file](https://github.com/maxibor/sourcepredict/blob/master/data/test/dog_test_sink_sample.csv) and [documentation](https://sourcepredict.readthedocs.io/en/latest/usage.html#sink_table))\n- Source taxonomic count file (see [example file](https://github.com/maxibor/sourcepredict/blob/master/data/modern_gut_microbiomes_sources.csv) and [documentation](https://sourcepredict.readthedocs.io/en/latest/usage.html#s-sources))\n- Source label file (see [example file](https://github.com/maxibor/sourcepredict/blob/master/data/modern_gut_microbiomes_labels.csv) and [documentation](https://sourcepredict.readthedocs.io/en/latest/usage.html#l-labels))\n\n### Usage \n\n```bash\n$ wget https://raw.githubusercontent.com/maxibor/sourcepredict/master/data/test/dog_test_sink_sample.csv -O dog_example.csv\n$ wget https://raw.githubusercontent.com/maxibor/sourcepredict/master/data/modern_gut_microbiomes_labels.csv -O sp_labels.csv\n$ wget https://raw.githubusercontent.com/maxibor/sourcepredict/master/data/modern_gut_microbiomes_sources.csv -O sp_sources.csv\n$ sourcepredict -s sp_sources.csv -l sp_labels.csv dog_example.csv\nStep 1: Checking for unknown proportion\n  == Sample: ERR1915662 ==\n\tAdding unknown\n\tNormalizing (GMPR)\n\tComputing Bray-Curtis distance\n\tPerforming MDS embedding in 2 dimensions\n\tKNN machine learning\n\tTraining KNN classifier on 2 cores...\n\t-\u003e Testing Accuracy: 1.0\n\t----------------------\n\t- Sample: ERR1915662\n\t\t known:98.61%\n\t\t unknown:1.39%\nStep 2: Checking for source proportion\n\tComputing weighted_unifrac distance on species rank\n\tTSNE embedding in 2 dimensions\n\tKNN machine learning\n\tPerforming 5 fold cross validation on 2 cores...\n\tTrained KNN classifier with 10 neighbors\n\t-\u003e Testing Accuracy: 0.99\n\t----------------------\n\t- Sample: ERR1915662\n\t\t Canis_familiaris:96.1%\n\t\t Homo_sapiens:2.47%\n\t\t Soil:1.43%\nSourcepredict result written to dog_test_sample.sourcepredict.csv\n```\n\n### Output\n\nSourcepredict output the predicted source contribution to each sink sample, and the embedding of all samples in the lower dimensional space.  See [documentation](https://sourcepredict.readthedocs.io/en/latest/results.html) for details.\n\n### Runtime\n\nDepending on the normalization method (`-n`), the embedding (`-me`) method, the cpus available for parallel processing (`-t`), and the data, the runtime should be between a few seconds and a few minutes per sink sample.\n\n\n## Documentation\n\nThe documentation of SourcePredict is available here: [sourcepredict.readthedocs.io](https://sourcepredict.readthedocs.io/en/latest/)\n\n## Sourcepredict example files\n\n- The sources were obtained with a simple [Nextflow pipeline](https://github.com/maxibor/kraken-nf), with Kraken2 using the [*MiniKraken2_v2_8GB*](https://ccb.jhu.edu/software/kraken2/dl/minikraken2_v2_8GB.tgz).  \nSee the [documentation](https://sourcepredict.readthedocs.io/en/latest/custom_sources.html) for more informations on how to build a custom source file. \n- The example source file is here [modern_gut_microbiomes_sources.csv](https://github.com/maxibor/sourcepredict/raw/master/data/modern_gut_microbiomes_sources.csv)\n- The example label file is here [modern_gut_microbiomes_sources.csv](https://github.com/maxibor/sourcepredict/raw/master/data/modern_gut_microbiomes_labels.csv)\n\n\n### Environments included in the example source file\n\n- *Homo sapiens* gut microbiome ([1](https://doi.org/10.1038/nature11234), [2](https://doi.org/10.1093/gigascience/giz004), [3](https://doi.org/10.1038/s41564-019-0409-6), [4](https://doi.org/10.1016/j.cell.2019.01.001), [5](https://doi.org/10.1038/ncomms7505), [6](http://doi.org/10.1016/j.cub.2015.04.055))\n- *Canis familiaris* gut microbiome ([1](https://doi.org/10.1186/s40168-018-0450-3))\n- Soil microbiome ([1](https://doi.org/10.1073/pnas.1215210110), [2](https://www.ncbi.nlm.nih.gov/bioproject/?term=322597), [3](https://dx.doi.org/10.1128%2FAEM.01646-17))\n\n## Contributing Code, Documentation, or Feedback\n\nIf you wish to contribute to Sourcepredict, you are welcome and encouraged to contribute by opening an issue, or creating a pull-request. All contributions will be made under the GPLv3 license. More informations can found on the [contributing page](https://github.com/maxibor/sourcepredict/blob/master/contributing.md).\n\n## How to cite\n\nSourcepredict has been published in [JOSS](https://joss.theoj.org/papers/10.21105/joss.01540).\n\n```\n@article{Borry2019Sourcepredict,\n\tjournal = {Journal of Open Source Software},\n\tdoi = {10.21105/joss.01540},\n\tissn = {2475-9066},\n\tnumber = {41},\n\tpublisher = {The Open Journal},\n\ttitle = {Sourcepredict: Prediction of metagenomic sample sources using dimension reduction followed by machine learning classification},\n\turl = {http://dx.doi.org/10.21105/joss.01540},\n\tvolume = {4},\n\tauthor = {Borry, Maxime},\n\tpages = {1540},\n\tdate = {2019-09-04},\n\tyear = {2019},\n\tmonth = {9},\n\tday = {4}\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxibor%2Fsourcepredict","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxibor%2Fsourcepredict","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxibor%2Fsourcepredict/lists"}