hicrep的重新实现,增加了对稀疏矩阵和多染色体的支持。
hicrepp的Python项目详细描述
乡巴佬
cmdoret
这是hicrep算法的python重新实现,增加了对稀疏矩阵的支持(以.cool格式)。在
hicrep通过计算地层调整相关系数(SCC)来衡量Hi-C样本之间的相似性。在这个实现中,分别计算每个染色体的SCC,并计算SCC的染色体长度加权平均值。在
hicrep发布于:
HiCRep: assessing the reproducibility of Hi-C data using a stratum-adjusted correlation coefficient. Tao Yang, Feipeng Zhang, Galip Gurkan Yardimci, Ross C Hardison, William Stafford Noble, Feng Yue, Qunhua Li, 2017, Genome Research, doi: 10.1101/gr.220640.117
在R中的原始实现可以在https://github.com/MonkeyLB/hicrep处找到
安装
您可以使用pip安装软件包:
pip install --user hicreppy
用法
要找到平滑参数h的最佳值,可以使用htrain子命令:
^{pr2}$要计算两个矩阵之间的SCC,请使用SCC子命令。使用httrain获得的最佳h值应提供给标志-v
:
Usage: hicreppy scc [OPTIONS] COOL1 COOL2
Compute the stratum-adjusted correlation coefficient for input matrices
Options:
-v, --h-value INTEGER Value of the smoothing parameter h to use. Should
be an integer value >= 0. [default: 10]
-m, --max-dist INTEGER Maximum distance at which to compute the SCC, in
basepairs. [default: 100000]
-s, --subsample INTEGER Subsample contacts from both matrices to target
value. Leave to 0 to disable subsampling.
[default: 0]
-b, --blacklist TEXT Exclude those chromosomes in the analysis. List of
comma-separated chromosome names.
-w, --whitelist TEXT Only include those chromosomes in the analysis.
List of comma-separated chromosome names.
--help Show this message and exit.
当运行多个成对比较时,在两个高度相似的样本之间计算一次最佳h值,并将h值重新用于所有scc
命令
贡献
欢迎各位投稿。在记录函数时,我们对docstring使用numpy standard。在
我们使用的代码格式标准是black,其中--line length=79以遵循PEP8建议。我们使用pytest
和pytest-doctest
和pytest-pylint
插件作为我们的测试框架。理想情况下,新函数应该有相关的单元测试,放在tests
文件夹中。在
要测试代码,可以运行:
pytest --doctest-modules --pylint --pylint-error-types=EF --pylint-rcfile=.pylintrc hicreppy tests
- 项目
标签: