{"id":15292982,"url":"https://github.com/tian-dechao/diffdomain","last_synced_at":"2025-04-13T12:28:19.651Z","repository":{"id":44749440,"uuid":"424090652","full_name":"Tian-Dechao/diffDomain","owner":"Tian-Dechao","description":"DiffDomain is a statistically sound method for detecting differential TADs between conditions","archived":false,"fork":false,"pushed_at":"2024-10-14T13:58:45.000Z","size":11642,"stargazers_count":13,"open_issues_count":9,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-03T14:12:18.345Z","etag":null,"topics":["3d-genome","differential","hi-c","python","r","tads"],"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/Tian-Dechao.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":"2021-11-03T04:24:33.000Z","updated_at":"2024-10-14T13:58:50.000Z","dependencies_parsed_at":"2024-08-20T05:28:25.445Z","dependency_job_id":"64669bc4-a904-487e-8a3a-2886810966a9","html_url":"https://github.com/Tian-Dechao/diffDomain","commit_stats":{"total_commits":120,"total_committers":6,"mean_commits":20.0,"dds":0.6083333333333334,"last_synced_commit":"8581bf67b0fa5ff93422e9088e0709754e14ac4e"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tian-Dechao%2FdiffDomain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tian-Dechao%2FdiffDomain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tian-Dechao%2FdiffDomain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tian-Dechao%2FdiffDomain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tian-Dechao","download_url":"https://codeload.github.com/Tian-Dechao/diffDomain/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240304560,"owners_count":19780312,"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":["3d-genome","differential","hi-c","python","r","tads"],"created_at":"2024-09-30T16:36:49.769Z","updated_at":"2025-02-23T10:32:16.439Z","avatar_url":"https://github.com/Tian-Dechao.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# diffDomain \n\n## A short description\n\ndiffDomain is a new computational method for identifying reorganized TADs using chromatin contact maps from two biological conditions.   \n  \n## A long description diffDomain\n\nThe workflow of diffDomain is illustrated down below.  \n\nThe goal is to test if a TAD identified in one biological condition has structural changes in another biological condition.  \n\nThe core of diffDomain is formulating the problem as a hypothesis testing problem where the null hypothesis is that the TAD doesn't undergo significant structural reorganization at later condition.\nThe input are Hi-C contact matrices of the TAD region in the two biological conditions (*A*).\nThe Hi-C contact matrices are  log-transformed to adjust for the exponential decay of Hi-C contacts between chromosome bins with increased distances.  \n\nTheir entry-wise difference is calculated (*B*).  \n\nThe difference matrix *D* is normalized by iteratively standardizing its *k*-off diagonal parts, *-N+2 \u003c= k \u003c= N-2*, adjusting absolute differences in contact frequencies due to different sequencing depths in the two biological conditions (*C*).  \n\nNote that, standardization is TAD-specific. Each TAD has its own parameters that are only estimated from its contact matrices in a pair of biological conditions.  \n\nIntuitively, if a TAD is not significantly reorganized, normalized *D* would resemble a random matrix with white noise entries, enabling us to borrow theoretical results in random matrix theory.\nIndeed, normalized *D* is a generalized Wigner matrix (D), a well studied high-dimensional random matrices.  \n\nIts largest singular value is proved to be fluctuating around 2 under the null hypothesis.\nArmed with the fact, diffDomain reformulates the reorganized TAD identification problem into a hypothesis testing problem:  \n1. H0: the largest singular value equals to 2;  \n2. H1: the largest singular value is greater than  2.  \n\nFor a user given set of TADs, *P* values are adjusted for multiple comparisons using *BH* method as default.  \nOnce we identify the subset of reorganized TADs, we classify them into six subtypes to aid biological analysis and interpretations (F).  \nA few examples of reorganized TADs identified by diffDomain in two datasets are shown in (G).  \n\n\n![workflow](/figures/workflow.jpg)\n\n## Installation instructions\n\ndiffDomain is tested on MacOS \u0026 Linux (Centos).   \n\n## Dependences\n\ndiffDomain-py2 is dependent on \n- Python 2.7\n- hic-straw==0.0.6 \n\ndiffDomain-py3 is dependent on\n- Python 3\n- hic-straw==1.3.1\n\nand\n- cooler\n- hicexplorer\n- TracyWidom \n- pandas \n- numpy \n- docopt \n- tqdm\n- matplotlib \n- statsmodels\n- h5py \n- seaborn\n\n\n## Installation\n\nFirst of all, we recommend you to have a package manager, such as [conda](https://docs.conda.io/en/latest/miniconda.html), and create a new independent environment for diffDomain.\n\n### Method1: to install the conda environment\nStep1:\n```\ngit clone https://github.com/Tian-Dechao/diffDomain\ncd diffDomain\n```\n  \nStep2:  \n  \nFor Linux \n\n```\nconda env create --name diffdomain -f environment_linux.yml\n```\n  \nFor MacOS \n```\nconda env create --name diffdomain -f environment_macos.yml\n```  \n  \nStep3:\n```\nconda activate diffdomain\n```\n  \nIn this environment, all the need of diffDomain(Python3 version) have been installed.\n\n### Method2: to install python3 version from Pypi\n\n```\npip install diffDomain-py3\n```\n\nNote: If you encounter errors when installing hicstraw that diffDomain relies on, you can use [conda](https://docs.conda.io/en/latest/miniconda.html) to install it:\n\n```\nconda install -c bioconda hic-straw\n```\n\n### Method3: Docker image named guming5/diffdomain-centos7:v1\n```\ndocker pull guming5/diffdomain-centos7:v1\ndocker run -it guming5/diffdomain-centos7:v1 /bin/bash\n# shift to the normal user named work\nsu work\ncd ~\nsource activate diffdomain\n```\nIn this image, there is a contact conda environment named diffdomain (/home/work/.conda/envs/diffdomain) meeting all requests, in which you can use the diffDomain Python3 version directly.\n \n\n## Documentation\nPlease see the [wiki](https://github.com/Tian-Dechao/diffDomain/wiki/0.Usage) for extensive documentation and example tutorials.\n\n# Contact information\n\nMore information please contact Dunming Hua at huadm@mail2.sysu.edu.cn, Ming Gu at guming5@mail2.sysu.edu.cn or Dechao Tian at tiandch@mail.sysu.edu.cn.\n\n\n# References\n[![DOI](https://zenodo.org/badge/424090652.svg)](https://zenodo.org/doi/10.5281/zenodo.10205207)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftian-dechao%2Fdiffdomain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftian-dechao%2Fdiffdomain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftian-dechao%2Fdiffdomain/lists"}