{"id":18932039,"url":"https://github.com/koonimaru/easy_heatmapper","last_synced_at":"2025-10-26T00:34:32.055Z","repository":{"id":103664875,"uuid":"210989623","full_name":"koonimaru/easy_heatmapper","owner":"koonimaru","description":"A python module to create clustered heatmaps and output clusters.","archived":false,"fork":false,"pushed_at":"2020-02-06T00:30:08.000Z","size":782,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-31T20:20:15.742Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/koonimaru.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2019-09-26T03:15:20.000Z","updated_at":"2019-11-05T08:07:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"5e84e2b4-7070-4ba1-bfa3-a3a815229dd2","html_url":"https://github.com/koonimaru/easy_heatmapper","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/koonimaru%2Feasy_heatmapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koonimaru%2Feasy_heatmapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koonimaru%2Feasy_heatmapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koonimaru%2Feasy_heatmapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koonimaru","download_url":"https://codeload.github.com/koonimaru/easy_heatmapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239930374,"owners_count":19720313,"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":[],"created_at":"2024-11-08T11:47:56.351Z","updated_at":"2025-10-26T00:34:31.975Z","avatar_url":"https://github.com/koonimaru.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# easy_heatmapper\nA python module to create clustered heatmaps and output clusters.\n\nIntroduction\n------------\neasy_heatmapper is a python module to easily draw clustered heatmaps, clustered scatter plot and write cluster information in a text file.\n\nTo draw a heatmap, a function called \"heatmapper\" uses hierarchical clustering with euclidean distance and ward method. It can also apply PCA, t-SNE, UMAP to reduce the dimension of data before hierarchical clustering. \n\nThis module also includes a scatter plot function to plot dimension-reduced data colored by automatically detected clusters with hierarchical clustering.\n\nInstallation\n------------\n\nSystem-wide installation..\n\n\tgit clone https://github.com/koonimaru/easy_heatmapper.git\n\tcd easy_heatmapper\n\tsudo pip3 install .\n\nUsing a virtual environment..\n\t\n\tsudo apt-get install python3-venv #If you do not have one.\n\tgit clone https://github.com/koonimaru/easy_heatmapper.git\n\tcd easy_heatmapper\n\tpython3 -m venv ./\n\tsource bin/activate\n\tpip3 install .\n\nTest installation\n-----------------\n\n\tcd easy_heatmapper\n\tpython3 test.py\n\nwill create a random heatmapper.\n\nUsage\n-----\n\n**easy_heatmapper.heatmapper(X, xLabels=[],yLabels=[], save=, WRITE_CLUSTER=True, methods=\"tsne\",CPU=, cluster_both=True, SHOW=True, tCOLOR='nipy_spectral', hCOLOR=\"YlGnBu\", _spectral=18, _n_neighbors=5, _min_dist=0.1, _perplexity=50, _n_iter=5000, _pca_comp=2, _color_threshold=0.1)**\n\nX: M x N array.\n\nxLabels: N array. The labels/names of data X by column.\n\nyLabels: M array. The labels/names of data X by row.\n\nsave: a saving directory with a prefix, e.g., \"/home/foo/test\". Default is a current directory. If you set as \"\", no files will be saved.\n\nWRITE_CLUSTER: True or False. Choose if cluster information is output or not. Default=True.\n\nmethods: \"\", \"tsne\", \"umap\", \"pca\". Dimension reduction methods to apply before hierarchical clustering.\n\nCPU: CPU number to use. It has effect only when tsne methods is used.\n\ncluster_both: True or False. If True, cluster both x and y axis of data.\n\nSHOW: True or False. If True, show a heatmap in runtime.\n\ntCOLOR: Takes the name of matlab colormaps. It sets the colors of clusters in a dendrogram. Default: 'nipy_spectral'.\n\nhCOLOR: Takes the name of matlab colormaps. It sets the colors of clusters in a heatmap. Default: \"YlGnBu\".\n\n_spectral: Takes an integer. The number of colors to use. If you see different clusters with a same color, increase this number. Default: 18.\n\n_color_threshold: Takes a float number from 0.0 to 1.0. \n\n\u0026nbsp;\n\n\n**easy_heatmapper.scatter(X,yLabels=[], save=, WRITE_CLUSTER=True, methods=\"tsne\",CPU=os.cpu_count()//2, SHOW=True, COLOR='nipy_spectral', _spectral=18,_n_neighbors=5, _min_dist=0.1, _perplexity=50, _n_iter=5000, _color_threshold=0.1)**\n\nX: M x N array.\n\nxLabels: N array. The labels/names of data X by column.\n\nyLabels: M array. The labels/names of data X by row.\n\nsave: a saving directory with a prefix, e.g., \"/home/foo/test\". Default is a current directory. If you set as \"\", no files will be saved. \n\nWRITE_CLUSTER: True or False. Choose if cluster information is output or not. Default=True.\n\nmethods: Takes \"\", \"tsne\", \"umap\", \"pca\". Dimension reduction methods to apply before hierarchical clustering.\n\nCPU: CPU number to use. It has effect only when tsne methods is used. Default is half of available CPUs.\n\ncluster_both: True or False. If True, cluster both x and y axis of data. Default=True.\n\nSHOW: True or False. If True, show a heatmap in runtime. Default=True.\n\nCOLOR: Takes the name of matlab colormaps. It sets the colors of clusters. Default: 'nipy_spectral'.\n\n_spectral: Takes an integer. the number of colors to use. If you see different clusters with a same color, increase this number.\n\n\nExample\n-------\n\n~~~python\nimport easy_heatmapper as eh\nimport numpy as np\n\n#creating noisy matrix\nb=np.random.normal(0,1, size=(25,25))\nfor i in range(10):\n\tb=np.concatenate((b, np.random.normal(i+1, 1, size=(25,25) )), axis=0)\nb[:]+=np.arange(25)/5.0\nnp.random.shuffle(b)\n\neh.heatmapper(b)\n~~~\n\n![heatmap](heatmapper.png)\n\n~~~python\nimport easy_heatmapper as eh\nimport numpy as np\n\n#creating noisy matrix\nb=np.random.normal(0,1, size=(25,25))\nfor i in range(10):\n\tb=np.concatenate((b, np.random.normal(i+1, 1, size=(25,25) )), axis=0)\nb[:]+=np.arange(25)/5.0\nnp.random.shuffle(b)\n\n\neh.scatter(b)\n~~~\n\n![scatter](tsne_with_color.png)\n\n~~~python\nfrom sklearn.datasets import load_iris\nimport easy_heatmapper as eh\niris = load_iris()\nX = iris.data\ny = iris.target\neh.scatter(X, methods=\"umap\",yLabels=y)\n~~~\n![scatter](_umap_scatter.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoonimaru%2Feasy_heatmapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoonimaru%2Feasy_heatmapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoonimaru%2Feasy_heatmapper/lists"}