hicrep的重新实现,增加了对稀疏矩阵和多染色体的支持。

hicrepp的Python项目详细描述


乡巴佬

cmdoret

PyPI versionBuild StatuscodecovLanguage grade: Python

这是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建议。我们使用pytestpytest-doctestpytest-pylint插件作为我们的测试框架。理想情况下,新函数应该有相关的单元测试,放在tests文件夹中。在

要测试代码,可以运行:

pytest --doctest-modules --pylint --pylint-error-types=EF --pylint-rcfile=.pylintrc hicreppy tests

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java重写父类中的特定行   java Apache Commons CLI订购帮助选项?   java如何将数据添加到网格视图   java如何在Apache Camel批处理后移动文件?   java如何为日期范围的between子句编写hql查询?   雅加达ee开始Java编程,我应该从哪里开始?   排序Java8+流:检查我的objectinstances的两个字段的列表顺序是否正确   java如何将json转换为Map<String,Object>确保整数为整数   java不能在Spring数据JPA批处理过程中创建TransactionException   java损坏的PDF文件从FTP下载到使用Apache Common Net的设备   java无法使用Spring批处理和Wso2为XML架构命名空间找到Spring NamespaceHandler   java Android ImageView未显示在SherlockFragment中   Maven在构建时出错=无法识别Java路径   java如何使用批处理文件调用关闭处理程序?   java admob广告横幅重叠我的游戏屏幕安卓