{"id":31805816,"url":"https://github.com/theislab/superexacttestpy","last_synced_at":"2025-10-11T02:58:58.861Z","repository":{"id":51490399,"uuid":"497878824","full_name":"theislab/superexacttestpy","owner":"theislab","description":"Python implementation of the SuperExactTest package","archived":false,"fork":false,"pushed_at":"2022-09-22T09:21:20.000Z","size":2083,"stargazers_count":10,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-30T12:46:55.754Z","etag":null,"topics":["intersection","python3","set","statistics","visualization"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/theislab.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":"2022-05-30T09:41:57.000Z","updated_at":"2024-10-14T07:19:31.000Z","dependencies_parsed_at":"2023-01-18T19:02:27.806Z","dependency_job_id":null,"html_url":"https://github.com/theislab/superexacttestpy","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/theislab/superexacttestpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theislab%2Fsuperexacttestpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theislab%2Fsuperexacttestpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theislab%2Fsuperexacttestpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theislab%2Fsuperexacttestpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theislab","download_url":"https://codeload.github.com/theislab/superexacttestpy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theislab%2Fsuperexacttestpy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005951,"owners_count":26084009,"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-10-11T02:00:06.511Z","response_time":55,"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":["intersection","python3","set","statistics","visualization"],"created_at":"2025-10-11T02:58:57.168Z","updated_at":"2025-10-11T02:58:58.856Z","avatar_url":"https://github.com/theislab.png","language":"Jupyter Notebook","readme":"# superexacttestpy\n\n[![Tests][badge-tests]][link-tests]\n[![Documentation][badge-docs]][link-docs]\n\n[badge-tests]: https://img.shields.io/github/workflow/status/ilibarra/superexacttestpy/Test/main\n[link-tests]: https://github.com/theislab/superexacttestpy/actions/workflows/test.yml\n[badge-docs]: https://img.shields.io/readthedocs/superexacttestpy\n\nPython implementation of the SuperExactTest algorithm\n\n## Getting started\n\nPlease refer to the [documentation][link-docs]. In particular, the\n\n-   [API documentation][link-api].\n\n## What is superexacttestpy ?\n\nSuperextractestpy is a python reimplementation of the R package [SuperExactTest][r-package] allowing to perform tests on the statistical distribution as well as to visualize multiset intersection.\n\nThis algorithm calculates the intersection probability of a large number of genes in a genetic set with linear complexity.\n\n### How to use it?\n\nImport the package\n\n```python\nimport superexacttestpy as stest\n```\n\nFor example, we want to make the test on this fictive set:\n\n```python\nSet1 = [\n    \"A\",\n    \"B\",\n    \"C\",\n    \"D\",\n    \"E\",\n    \"F\",\n    \"G\",\n    \"H\",\n    \"I\",\n    \"J\",\n    \"K\",\n    \"L\",\n    \"M\",\n    \"N\",\n    \"O\",\n    \"P\",\n    \"Q\",\n]\nSet2 = [\"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\"]\nSet3 = [\"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\"]\n\ndata = [Set1, Set2, Set3]\nnames = [\"Set1\", \"Set2\", \"Set3\"]\n\nbackground_size = 1000\n```\n\nIf you just want the data frame with the results, you can use the function `stest.tl.supertest()`\n\n```python\nstest.tl.supertest(data=data, n=background_size, names=names).head()\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./sketch/df.jpg?raw=true\" style=\"width:75%\"\u003e\n\u003c/p\u003e\n\nThe function `tl.supertest` has some optional arguments:\n\n-   `degree`: the degree of the intersection you want to compute.\n-   `lower_tail`: Let m be the number of elements shared in the sets : if True, p = P[overlap \u003c m] and if False, p = P[overlap \u003e= m].\n\nIf you want to plot the results, you can use the function `stest.pl.plot()`\n\n```python\nstest.pl.plot(data=data, n=background_size, names=names)\n```\n\nThe function plot has some optional arguments:\n\n-   `degree`: the degree of the intersection you want to compute.\n-   `sort_by`: on what you want to sort the bars \"degree\" or \"p_val\"\n-   `show_count`: if True, the number of genes in the intersection is shown.\n-   `size`: tuple of the figsize\n-   `background_color`: the color of the background of the plot.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./sketch/supertest.png?raw=true\" style=\"width:75%\"\u003e\n\u003c/p\u003e\n\nPlotting function output\n\n### Additional functions\n\nAdditional functions are available and will be described in the [readthedocs][link-api]\n\n## Installation\n\nYou need to have Python 3.8 or newer installed on your system. If you don't have\nPython installed, we recommend installing `Miniconda \u003chttps://docs.conda.io/en/latest/miniconda.html\u003e`\\_.\n\nThere are several alternative options to install superexacttestpy:\n\n1. Install the latest release of `superexacttestpy` from `PyPI \u003chttps://pypi.org/project/superexacttestpy/\u003e`\\_:\n\n    ```bash\n    pip install superexacttestpy\n    ```\n\n1. Install the latest development version:\n\n    ```bash\n    pip install git+https://github.com/theislab/superexacttestpy.git@main\n    ```\n\n## Release notes\n\nSee the [changelog][changelog].\n\n## Contact\n\nFor questions and help requests, you can reach out in the [scverse discourse][scverse-discourse].\nIf you found a bug, please use the [issue tracker][issue-tracker].\n\n## Citation\n\nIf superexactestpy is relevant for your work, please cite the following:\n\n```bibtex\n@software{superexacttest,\n  author = {Ibarra, Mauger-Birocheau},\n  doi = {},\n  month = {},\n  title = {{superexacttest}},\n  url = {https://github.com/theislab/superexacttestpy},\n  year = {2022}\n}\n```\n\n## References\n\nWang, M., Zhao, Y. \u0026 Zhang, B. Efficient Test and Visualization of Multi-Set Intersections. Sci Rep 5, 16923 (2015). [doi](https://doi.org/10.1038/srep16923)\n\n[scverse-discourse]: https://discourse.scverse.org/\n[issue-tracker]: https://github.com/theislab/superexacttestpy/issues\n[changelog]: https://superexacttestpy.readthedocs.io/en/latest/changelog.html\n[link-docs]: https://superexacttestpy.readthedocs.io/en/latest/#\n[link-api]: https://superexacttestpy.readthedocs.io/en/latest/api.html\n[r-package]: https://github.com/mw201608/SuperExactTest\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheislab%2Fsuperexacttestpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheislab%2Fsuperexacttestpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheislab%2Fsuperexacttestpy/lists"}