{"id":21015664,"url":"https://github.com/gersteinlab/hic-spector","last_synced_at":"2026-01-02T01:18:04.024Z","repository":{"id":53706680,"uuid":"66974991","full_name":"gersteinlab/HiC-spector","owner":"gersteinlab","description":"Spectral and reproducibility analysis of Hi-C contact maps","archived":false,"fork":false,"pushed_at":"2021-03-18T22:34:11.000Z","size":50,"stargazers_count":12,"open_issues_count":6,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-20T12:07:52.916Z","etag":null,"topics":["3d-genome","hi-c"],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gersteinlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-30T20:21:46.000Z","updated_at":"2024-11-15T08:29:48.000Z","dependencies_parsed_at":"2022-09-22T01:51:47.025Z","dependency_job_id":null,"html_url":"https://github.com/gersteinlab/HiC-spector","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/gersteinlab%2FHiC-spector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gersteinlab%2FHiC-spector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gersteinlab%2FHiC-spector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gersteinlab%2FHiC-spector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gersteinlab","download_url":"https://codeload.github.com/gersteinlab/HiC-spector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243446928,"owners_count":20292446,"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","hi-c"],"created_at":"2024-11-19T10:10:47.281Z","updated_at":"2026-01-02T01:18:03.961Z","avatar_url":"https://github.com/gersteinlab.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HiC-spector\n\nA matrix library for spectral and reproducibility analysis of Hi-C contact maps. Several useful functions:\n\nget_reproducibility\n  - to calculate the reproducibility metric between 2 HiC contact maps\n  \nknight_ruiz\n  - Knight Ruiz algorithm for matrix balancing\n  \nget_expect_vs_d_single_chr_v0\n  - to find the average contact frequency as a function of genomic distance\n  \nget_compartment_A_B\n  - to find A, B compartment, using method described in Liberman et al. Science 2009\n  \nand a few functions for binning a genome, and reading HiC maps\n\n\u003ch3\u003eInstallation\u003c/h3\u003e \nHiC-spector is mostly written in Julia. It has been tested in Julia 0.4 and 0.5. Both the Julia language (http://julialang.org/) and the required packages have to be installed. Please refer to the beginning of the file HiC_spector.jl for the necessary packages. To get some contact maps for testing the code, please follow the instructions shown in the file data/readme_data.\n\nThere is a Python script available for quantifying reproducibility. The Python version can read files in genomic coordinates as well as the .hic format (https://github.com/theaidenlab/juicebox/wiki/Data). To do so, please download the Python version of the tool straw (straw.py) developed by the Aiden lab (https://github.com/theaidenlab/straw).\n\n\u003ch3\u003eUsage\u003c/h3\u003e\nThe script run_reproducibility.jl is used to get the reproducibility score from a command-line interface. Usage:\n\u003e julia run_reproducibility.jl matrix_file1 matrix_file2 \n\nThe input file here is a simple text delimited format with no header.\n\n1 1 20\n\n1 2 18\n\n...\n\nThe first and second columns represent the row and column indices of a contact map, whereas the third column is the count. To represent a full matrix, only the upper-triangular component is required. Note that the index should begin with 1. \n\nPlease use the files stored in the folder A549 mentioned in ./data/readme_data to test the script run_reproducibility.jl.\n\nJulia users can include the file HiC_spector.jl for their own analysis by simply using\n\u003e include(\"./HiC_spector.jl\");\n\nPlease refer to the file hic_spector_tutorial.jl for how to use some of the functions and how to read files in other formats.\n\nFor non-Julia users, one can use the Python script run_reproducibility.py to obtain the reproducibility score. Usage:\n\u003e python run_reproducibility.py -F matrix_file1 matrix_file2\n\nIf the matrix files are labeled in genomic coordinates of bins, USage:\n\u003e python run_reproducibility.py t matrix_file1 matrix_file2 40000\n\nwhere 40000 is the bin size used in the two files\n\nIn addition to the text delimited input files, the Python script can calculate reproducibility score for contact maps stored in .hic format. Usage:\n\u003e python run_reproducibility.py -f hic_file1 hic_file2 chrid resolution\n\nA script is provided in the tool straw (https://github.com/theaidenlab/straw/tree/master/python) for reading the headers (including chr id and the available resolutions) in .hic file. \n\nRegarding memory, given two contact maps of human chr1 binned in a bin-size of 10kb, the code works fine in a laptop (16GB memory) from our experience. \n\n\u003ch3\u003eAurthor/Support\u003c/h3\u003e\nKoon-Kiu Yan, koonkiu.yan@gmail.com; Mark Gerstein, mark@gersteinlab.org\n\n\u003ch3\u003eReference\u003c/h3\u003e\nYan KK, Galip Gürkan Yardımcı, William S Noble and Gerstein M. HiC-Spector: a matrix library for spectral and reproducibility analysis of Hi-C contact maps. Bioinformatics 22 March 2017. https://doi.org/10.1093/bioinformatics/btx152\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgersteinlab%2Fhic-spector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgersteinlab%2Fhic-spector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgersteinlab%2Fhic-spector/lists"}