{"id":19669931,"url":"https://github.com/dohlee/python-dohlee","last_synced_at":"2025-02-27T04:42:21.976Z","repository":{"id":57423512,"uuid":"130536062","full_name":"dohlee/python-dohlee","owner":"dohlee","description":":package: My personal python utility library.","archived":false,"fork":false,"pushed_at":"2019-11-25T07:21:44.000Z","size":2483,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-01-10T03:24:19.915Z","etag":null,"topics":["bioinformatics","bioinformatics-analysis","mutational-signatures","personal-utility","python3","visualization"],"latest_commit_sha":null,"homepage":"https://python-dohlee.rtfd.io","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/dohlee.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-22T04:47:11.000Z","updated_at":"2020-02-12T18:45:41.000Z","dependencies_parsed_at":"2022-08-29T22:51:43.394Z","dependency_job_id":null,"html_url":"https://github.com/dohlee/python-dohlee","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dohlee%2Fpython-dohlee","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dohlee%2Fpython-dohlee/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dohlee%2Fpython-dohlee/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dohlee%2Fpython-dohlee/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dohlee","download_url":"https://codeload.github.com/dohlee/python-dohlee/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240980773,"owners_count":19888335,"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","bioinformatics-analysis","mutational-signatures","personal-utility","python3","visualization"],"created_at":"2024-11-11T17:03:14.334Z","updated_at":"2025-02-27T04:42:21.957Z","avatar_url":"https://github.com/dohlee.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003epython-dohlee\u003c/h1\u003e\r\n\u003cp align=\"center\"\u003eMy personal python library.\u003c/p\u003e\r\n\u003cp align=\"center\"\u003e\r\n  \u003ca href=\"https://readthedocs.org/projects/python-dohlee\"\u003e\u003cimg src=\"https://readthedocs.org/projects/python-dohlee/badge/?style=flat\" /\u003e\u003c/a\u003e\r\n  \u003ca href=\"https://pypi.python.org/pypi/dohlee\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/dohlee.svg\" /\u003e\u003c/a\u003e\r\n  \u003ca href=\"https://travis-ci.org/dohlee/python-dohlee\"\u003e\u003cimg src=\"https://travis-ci.org/dohlee/python-dohlee.svg?branch=develop\" /\u003e\u003c/a\u003e\r\n  \u003ca href=\"https://coveralls.io/r/dohlee/python-dohlee\"\u003e\u003cimg src=\"https://coveralls.io/repos/dohlee/python-dohlee/badge.svg?branch=develop\u0026service=github\" /\u003e\u003c/a\u003e\r\n\u003c/p\u003e\r\n\r\n\u003ch2 align=\"center\"\u003eInstallation\u003c/h2\u003e\r\n\r\n```\r\npip install dohlee\r\n```\r\n\r\n\u003ch2 align=\"center\"\u003eExamples\u003c/h2\u003e\r\n\r\n### dohlee.plot\r\n\r\nPlotting library. Provides simple ways to produce publication-ready plots.\r\n\r\n***dohlee.plot.mutation_signature***\r\n```python\r\nimport dohlee.plot as plot; plot.set_style()  # Sets plot styles.\r\nax = plot.get_axis(figsize=(20.4, 3.4))\r\nplot.mutation_signature(data, ax=ax)\r\n```\r\n\r\n![mutation_signature](img/mutation_signature.png)\r\n\r\n***dohlee.plot.boxplot***\r\n```python\r\nax = plot.get_axis(preset='wide', transpose=True)\r\nplot.boxplot(data=iris, x='species', y='sepal_length', ax=ax)\r\n```\r\n\r\n\u003cp align='center'\u003e\u003cimg src='img/boxplot.png' width=\"300\" height=\"300\"/\u003e\u003c/p\u003e\r\n\r\n***dohlee.plot.histogram***\r\n```python\r\nax = plot.get_axis(preset='wide')\r\nplot.histogram(iris.sepal_length, bins=22, xlabel='Sepal Length', ylabel='Frequency', ax=ax)\r\n```\r\n\r\n\u003cp align='center'\u003e\u003cimg src='img/histogram.png' width=\"300\" height=\"180\"/\u003e\u003c/p\u003e\r\n\r\n***dohlee.plot.frequency***\r\n```python\r\nax = plot.get_axis(preset='wide')\r\nplot.frequency(data, ax=ax, xlabel='Your numbers', ylabel='Frequency')\r\n```\r\n\r\n\u003cp align='center'\u003e\u003cimg src='img/frequency.png' width=\"300\" height=\"240\"\u003e\u003c/p\u003e\r\n\r\n***dohlee.plot.tsne***\r\n```python\r\nax = plot.get_axis(preset='wide')\r\nplot.tsne(\r\n    iris[['sepal_length', 'sepal_width', 'petal_length', 'petal_width']],\r\n    ax=ax,\r\n    s=5,\r\n    labels=iris['species']\r\n)\r\n```\r\n\u003cp align='center'\u003e\u003cimg src='img/tsne.png' width=\"300\" height=\"300\" /\u003e\u003c/p\u003e\r\n\r\n***dohlee.plot.stacked_bar_chart***\r\n```python\r\n# Generate sample data.\r\nn_samples = 100\r\nsample_dict = {'Sample': ['S%d' % i for i in range(1, n_samples + 1)]}\r\nvalue_dict = {c: np.random.randint(0, 100, size=n_samples) for c in ['Missense', 'Nonsense', 'Silent']}\r\ntest_data = pd.DataFrame({**sample_dict, **value_dict})\r\n# Plot stacked bar chart.\r\nplot.stacked_bar_chart(\r\n    data=test_data,          \r\n    x='Sample',\r\n    y=['Missense', 'Nonsense', 'Silent'],\r\n    ax=plot.get_axis(figsize=(14.4, 3.4)),\r\n    xticklabels=False,\r\n    sort=True,\r\n    ylabel='Number of mutations',\r\n    xlabel='Sample',\r\n    legend_size='xx-large')\r\n```\r\n\u003cp align='center'\u003e\u003cimg src='img/stacked_bar_chart.png'\u003e\u003c/p\u003e\r\n\r\n***dohlee.plot.linear_regression***\r\n```python\r\nax = plot.get_axis(preset='wide')\r\n\r\nx = np.linspace(0, 1, 100)\r\ny = 2 * x + 3 + np.random.normal(0, 0.3, len(x))\r\n\r\nplot.linear_regression(x, y, ax=ax)\r\n```\r\n\u003cp align='center'\u003e\u003cimg src='img/linear_regression.png' width=\"300\" height=\"300\" /\u003e\u003c/p\u003e\r\n\r\n\u003ch2 align='center'\u003eDevelopment\u003c/h2\u003e\r\n\r\nSince this package is updated as needed when I'm doing my research, the development process fits well with TDD cycle.\r\n- When you feel a need to write frequently-used research workflow as a function, write rough tests so that you can be sure that the function you've implemented just meets your need. Write the name of test function as verbose as possible!\r\n-  Run test with following commands. By default, nosetests ignores runnable files while finding test scripts. *--exe* option revokes it.\r\n```shell\r\nnosetests --exe --with-coverage --cover-package=dohlee\r\n```\r\nOR\r\n```shell\r\ntox -e py35,py36\r\n```\r\n- When sufficient progress have been made, test if the package can be published.\r\n```shell\r\ntox\r\n```\r\n- If all tests are passed, distribute the package via PyPI.\r\n```shell\r\npython setup.py sdist\r\ntwine upload dist/dohlee-x.x.x.tar.gz\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdohlee%2Fpython-dohlee","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdohlee%2Fpython-dohlee","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdohlee%2Fpython-dohlee/lists"}