hicrep

Python implementation of HiCRep stratum-adjusted correlation coefficient of Hi-C data with Cooler sparse contact matrix support

https://github.com/dejunlin/hicrep

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
    1 of 5 committers (20.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.3%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

Python implementation of HiCRep stratum-adjusted correlation coefficient of Hi-C data with Cooler sparse contact matrix support

Basic Info
  • Host: GitHub
  • Owner: dejunlin
  • License: gpl-3.0
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 61.5 MB
Statistics
  • Stars: 31
  • Watchers: 1
  • Forks: 6
  • Open Issues: 1
  • Releases: 0
Created over 6 years ago · Last pushed over 2 years ago
Metadata Files
Readme License

README.md

hicrep

Build Status License: GPL v3 PyPI version Python version

Python implementation of the HiCRep: a stratum-adjusted correlation coefficient (SCC) for Hi-C data with support for Cooler sparse contact matrices

The algorithm is published in:

HiCRep: assessing the reproducibility of Hi-C data using a stratum-adjusted correlation coefficient. Tao Yang Feipeng Zhang Galip Gürkan Yardımcı Fan Song Ross C. Hardison William Stafford Noble Feng Yue and Qunhua Li, Genome Res. 2017 Nov;27(11):1939-1949. doi: 10.1101/gr.220640.117.

This implementation takes a pair of Hi-C data sets in Cooler format (.cool for single binsize or .mcool multiple binsizes) and computes the HiCRep SCC scores for each pair of chromosomes between the two data sets. A guide for how to convert a file of read-pairs into the appropriate .cool or .mcool format is available in the Cooler documentation here.

The HiCRep SCC computed from this implementaion is consistent with the original R implementaion (https://github.com/MonkeyLB/hicrep/) and it's more than 10x faster than the R version:

comparison

Usage

To use as a python module, install the package

pip install hicrep

and then use the util function readMcool

python from hicrep.utils import readMcool

to read a pair of mcool files and specify the bin size to compute SCC with:

python fmcool1 = "mydata1.mcool" fmcool2 = "mydata2.mcool" binSize = 100000 cool1, binSize1 = readMcool(fmcool1, binSize) cool2, binSize2 = readMcool(fmcool2, binSize)

or a pair of .cool files with built-in bin size:

```python fcool1 = "mydata1.cool" fcool2 = "mydata2.cool" cool1, binSize1 = readMcool(fmcool1, -1) cool2, binSize2 = readMcool(fmcool2, -1)

binSize1 and binSize2 will be set to the bin size built in the cool file

binSize = binSize1 ```

then define the parameters for computing HiCRep SCC:

```python from hicrep import hicrepSCC

smoothing window half-size

h = 1

maximal genomic distance to include in the calculation

dBPMax = 500000

whether to perform down-sampling or not

if set True, it will bootstrap the data set # with larger contact counts to

the same number of contacts as in the other data set; otherwise, the contact

matrices will be normalized by the respective total number of contacts

bDownSample = False

compute the SCC score

this will result in a SCC score for each chromosome available in the data set

listed in the same order as the chromosomes are listed in the input Cooler files

scc = hicrepSCC(cool1, cool2, h, dBPMax, bDownSample)

Optionally you can get SCC score from a subset of chromosomes

sccSub = hicrepSCC(cool1, cool2, h, dBPMax, bDownSample, np.array(['myChr1', 'myOtherChr'], dtype=str))

```

To use as a command line tool, install this package by pip install hicrep then run hicrep mydata1.mcool mydata2.mcool outputSCC.txt --binSize 100000 --h 1 --dBPMax 500000 when passing in an .mcool file with multiple binsizes or hicrep mydata1.cool mydata2.cool outputSCC.txt --h 1 --dBPMax 500000 when passing in a .cool file with a single bultin binsize. The output outputSCC.txt has a list of SCC scores for each chromosome in the input. The output SCC scores are listed in the same order as the chromosomes are listed in the input Cooler files. To see the list of command line options: hicrep -h You can optionally compute SCC scores for a subset of chromosomes using hicrep mydata1.cool mydata2.cool outputSCC_Subset.txt --h 1 --dBPMax 500000 --chrNames 'myChr1' 'myOtherChr'

Related Projects

  • hicrepcm generates a clustermap of multiple Hi-C datasets based on their pairwise hicrep sores
  • hic2cool converts Hi-C dataset from the *.hic format to *.cool or *.mcool format

Owner

  • Login: dejunlin
  • Kind: user

GitHub Events

Total
  • Watch event: 2
  • Issue comment event: 1
Last Year
  • Watch event: 2
  • Issue comment event: 1

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 29
  • Total Committers: 5
  • Avg Commits per committer: 5.8
  • Development Distribution Score (DDS): 0.31
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
dejun.lin@gmail.com d****n@g****m 20
justin sanders j****1@b****u 3
dejunlin d****n 3
Kevin Brick k****k@g****m 2
justin-a-sanders 6****s 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: over 2 years ago

All Time
  • Total issues: 12
  • Total pull requests: 8
  • Average time to close issues: 13 days
  • Average time to close pull requests: about 1 month
  • Total issue authors: 11
  • Total pull request authors: 2
  • Average comments per issue: 2.42
  • Average comments per pull request: 0.75
  • Merged pull requests: 5
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 0
  • Average time to close issues: 13 days
  • Average time to close pull requests: N/A
  • Issue authors: 2
  • Pull request authors: 0
  • Average comments per issue: 1.5
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • YiweiNiu (2)
  • srcoulombe (1)
  • cmdoret (1)
  • redjay8 (1)
  • PanZiwei (1)
  • yardimcilab (1)
  • kevbrick (1)
  • KunFang93 (1)
  • qianXX (1)
  • bskubi (1)
  • hiroyukikato911 (1)
  • mdozmorov (1)
  • JiaoLaboratory (1)
  • zzhoujialu (1)
Pull Request Authors
  • justin-a-sanders (7)
  • kevbrick (1)
Top Labels
Issue Labels
corrupted input data (3) question (2) data standard (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 174 last-month
  • Total dependent packages: 2
  • Total dependent repositories: 1
  • Total versions: 16
  • Total maintainers: 1
pypi.org: hicrep

Python implementation of HiCRep stratum-adjusted correlation coefficient of Hi-C data with sparse contact matrix support

  • Versions: 16
  • Dependent Packages: 2
  • Dependent Repositories: 1
  • Downloads: 174 Last month
Rankings
Dependent packages count: 10.0%
Stargazers count: 12.3%
Forks count: 13.3%
Average: 15.9%
Dependent repos count: 21.7%
Downloads: 22.4%
Maintainers (1)
Last synced: 11 months ago

Dependencies

setup.py pypi
  • Deprecated *
  • cooler *
  • h5py *
  • numpy >=1.17.0
  • pandas *
  • scipy *