从Hichip数据中查找峰值的工具
hichip-peaks的Python项目详细描述
Hichip峰值
此包可用于从hichip数据集中查找丰富的峰值区域,然后将其用作可用循环调用工具的输入或进行差分峰值分析。
它接受hic pro输出并将其转换为限制站点级分辨率图。然后,它从对角线(默认值为2)中选择指定数量限制站点内的读取,并将背景建模为负二项式。它称之为明显超过背景的峰值区域。 输出是一个具有其属性的峰值列表和一个限制站点级分辨率的床状图,描述每个站点的读取。 使用差异分析命令,它可以用于创建一致的峰值集,然后识别样本之间的差异绑定区域。
该软件包的结果可用于进一步分析,并作为各种循环调用软件的峰值数据集输入。
目录
开始
安装
这个包需要bedtools才能运行。然后可以通过pip安装软件包
pip install hichip-peaks
我们建议使用conda环境以避免混乱
conda create --name hichip-peaks python=3.7 bedtools pip
pip install hichip-peaks
使用量
峰值呼叫
使用hic pro清除原始读取并与正常设置对齐,确保这些设置设置如下(对于mboi摘要库):
#######################################################################
## Digestion Hi-C
#######################################################################
GENOME_FRAGMENT = MboI_resfrag_hg38.bed
LIGATION_SITE = GATCGATC
MIN_FRAG_SIZE =
MAX_FRAG_SIZE =
MIN_INSERT_SIZE =
MAX_INSERT_SIZE =
#######################################################################
## Hi-C processing
#######################################################################
MIN_CIS_DIST =
GET_ALL_INTERACTION_CLASSES = 1
GET_PROCESS_SAM = 0
RM_SINGLETON = 1
RM_MULTI = 1
RM_DUP = 1
使用峰值呼叫命令
usage: peak_call [-h] -i HICPRO_RESULTS -o OUTPUT_DIRECTORY -r RESFRAG
[-p PREFIX] [-f FDR] [-a SIZES] [-t TEMPORARY_LOC]
[-w THREADS] [-k] [-d] [-s OFF_DIAG] [-x] [-c]
Peak calling from HiChIP data
optional arguments:
-h, --help show this help message and exit
-i HICPRO_RESULTS, --input HICPRO_RESULTS
HiC-Pro results directory containing validPairs file
and others
-o OUTPUT_DIRECTORY, --output OUTPUT_DIRECTORY
Output directory
-r RESFRAG, --resfrag RESFRAG
HiCpro resfrag file
-p PREFIX, --prefix PREFIX
Output file name prefix, if not provided will be name
of HiC-Pro results directory
-f FDR, --FDR FDR False discovery rate, default = 0.01
-a SIZES, --annotation SIZES
HiCpro chromosome annotation file, default uses human
chromosomes, excludes chrY
-t TEMPORARY_LOC, --temporary_loc TEMPORARY_LOC
Temporary directory. If not supplied will be output
directory
-w THREADS, --worker_threads THREADS
Number of threads, minimum 4. Warning: Increasing this
significantly increases RAM usage
-k, --keep_temp Keep temporary files
-d, --keep_diff Prepare files for differential analysis
-s OFF_DIAG, --offdiag OFF_DIAG
How many off diagonal needs to be included (default =
2)
-x, --chromX Want to compensate Sex chromosomes weights? Requires
specify annotation(SIZES) containing chrX and chrY
-c, --class_store Store sparse site_matrix object for further use
此命令需要hicpro_results/hic_results/data/sample/output文件夹,其中包含所有有效对文件。 该命令要求该文件夹中的所有文件都存在,包括.repairs、scpairs和depairs文件。
此命令将生成以下文件:
- log.log文件,包含所有使用的输入、日志和计算的质量度量,例如调用的峰值数和峰值中的读取分数。
- bdg文件,包含在峰值调用步骤中使用的所有读取的覆盖率跟踪。
- bed文件,包含所有调用的峰值。3个附加信息列是:
- 峰值平均信号
- 峰值中的最大信号
- -峰值p值log10
- report.pdf,包含一些有用的绘图和质量度量。
如果启用,此命令还将生成:
- diffpeak_data.pickle,包含差分峰分析所需信息的文件。
- pickle,包含所有交互的限制站点级稀疏矩阵表示的文件。目前正在开发中,但您可以查看site_matrix_class.py以了解其工作原理。
示例运行
假设数据在hic pro_results/hic_results/data/sample/中,并且hic pro的安装在hicpro_dir中/ 您可以使用以下命令运行软件:
peak_call -i HICPRO_RESULTS/hic_results/data/sample/ -o ./results -r HICPRO_dir/annotation/MboI_resfrag_hg38.bed
一些示例结果可以在example_results中找到。
微分峰分析
在启用--keepdiff标志的情况下运行前面的命令。这将生成一个临时文件,可与diff_peaks命令一起使用,将所有样本集成在一起。此实用程序将在指定文件夹中查找所有正确的文件,合并片段站点级别a的峰值,生成一个表,其中包含来自每个示例的每个峰值中的信号。然后可以将其导入r或其他语言中,并使用deseq2或其他微分表达式分析工具进行分析。灵感请参见示例R脚本。
usage: diff_peaks [-h] -i hichip_peaks_RESULTS -o OUTPUT_FILE -r RESFRAG
[-a SIZES] [-m MINIMUM]
input directory with outputfiles from peak_call and create table for
differential analysis. Make sure to activate --keep_diff in the previous step!
optional arguments:
-h, --help show this help message and exit
-i hichip_peaks_RESULTS, --input hichip_peaks_RESULTS
directory containing previous step results
-o OUTPUT_FILE, --output OUTPUT_FILE
Output file
-r RESFRAG, --resfrag RESFRAG
HiCpro resfrag file
-a SIZES, --annotation SIZES
HiCpro chromosome annotation file, default uses human
chromosomes, excludes chrY
-m MINIMUM, --minimum MINIMUM
How many samples need to be peak to be considered peak
for analysis
作者
该软件包由曼彻斯特大学的Chenfu Shi1、Magnus Rattray2,3和Gisela Orozco1,3开发。
- 遗传学和基因组学与关节炎中心。除数英国曼彻斯特大学生物、医学和健康学院生物科学学院肌肉骨骼和皮肤科n
- 英国曼彻斯特大学生物、医学和健康学院信息学、成像和数据科学系。
- NIHR曼彻斯特生物医学研究中心,曼彻斯特大学NHS基金信托,曼彻斯特学术健康科学中心,曼彻斯特,英国。
这项工作由Wellcome Trust(奖励参考号207491/Z/17/Z和215207/Z/19/Z)和关节炎(奖励参考号21754)、NIHR Manchester BRC和医学研究委员会(奖励参考号MR/N00017X/1)资助。 利益冲突:未声明。
许可证
软件发布时带有BSD-3条款许可证
BSD-3-Clause License
Copyright 2019 Chenfu Shi
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
引文
请引用我们的论文时,使用这个包为您的研究!
Shi,C. et al. (2019) HiChIP-Peaks: A HiChIP peak calling algorithm. bioRxiv, 682781.
https://doi.org/10.1101/682781