打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
HiC数据分析实战(一)

首先需要明白数据分析流程,可以查看第一讲:三维基因组学习笔记,提炼流程如下:

  • Hi-C标准分析流程(比对及过滤,原始互作图谱构建)

    • 下载参考基因组及构建bowtie2索引

    • 把fq测序数据比对都参考基因组

    • 过滤及挑选符合要求的比对结果

    • 原始互作图谱构建

    • 互作图谱迭代校正

  • Compartment分析

  • TAD分析

  • 显著互作Loops分析

实战数据

来自于Tung B. K. Le et al. Science 2013 :https://www.ncbi.nlm.nih.gov/sra/?term=srr824846

Study: High-resolution mapping of the spatial organization of Caulobacter crescentus chromosome by chromosome conformation capture in conjunction with next-generation sequencing (Hi-C)

数据下载后转为fq文件如下:

858M Jul  3 16:21 SRR824846_Q20L10_1.fastq.gz
857M Jul  3 16:22 SRR824846_Q20L10_2.fastq.gz

如果想看其它数据:PRJNA196826 · SRP020913 · All experiments · All runs

下载参考基因组并且构建bowtie2的索引

物种是:新月柄杆菌 Caulobacter crescentus,它是一种经常用于实验室实验中的细菌,通常含有扁平囊泡(绿色),包裹着贮存颗粒(橙色)。

WC Nierman - ‎2001的文章就发表了该物种的基因组 - ‎被引用次数:500 The complete genome sequence of Caulobacter crescentus was determined to be 4,016,942 base pairs in a single circular chromosome encoding 3,767 genes.

mkdir -p ~/project/hic/ref
cd ~/project/hic/ref
wget ftp://ftp.ensemblgenomes.org/pub/bacteria/release-40/fasta/bacteria_20_collection/caulobacter_crescentus_na1000/dna/Caulobacter_crescentus_na1000.ASM2200v1.dna.toplevel.fa.gz
gunzip Caulobacter_crescentus_na1000.ASM2200v1.dna.toplevel.fa.gz
bowtie2-build  Caulobacter_crescentus_na1000.ASM2200v1.dna.toplevel.fa   bacteria

得到

5.3M Jul 25 19:28 bacteria.1.bt2
988K Jul 25 19:28 bacteria.2.bt2
  17 Jul 25 19:28 bacteria.3.bt2
988K Jul 25 19:28 bacteria.4.bt2
5.3M Jul 25 19:28 bacteria.rev.1.bt2
988K Jul 25 19:28 bacteria.rev.2.bt2

这个参考基因组fa文件节选如下:

>Chromosome dna:chromosome chromosome:ASM2200v1:Chromosome:1:4042929:1 REF
GAATTCTTAACGTCCTGAGACACGACAGCGACCTCTGACCGGACTCGTTCCGCGTCTTTG
GACAATCGGGATTCAGACTTCGGGGGATGCGGCGCAGGCTTGGGGATGATAGGCGAGCAA
TGCGACCGTTGATCACAGCGGCGCCGTGTCACGACGCTGTTGGGGCCGTTCGGCGCCCGG

下载必备软件

软件大全来源于:https://omictools.com/3c-4c-5c-hi-c-chia-pet-category

如果没有conda就先安装咯:

wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
source ~/.bashrc
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda
conda config --set show_channel_urls yes

然后安装一系列软件哈:

conda create -n hic  python=2 bowtie2
conda info --envs
source activate hic
conda search hiclab
conda install -y sra-tools samtools 

有些软件不在conda里面,需要自行查看软件说明书文档,主要是:

  • https://bitbucket.org/mirnylab/hiclib

  • https://github.com/nservant/HiC-Pro

其中特别值得推荐,可以处理各种各样的hic数据,包括:

  • Hi-C

  • in situ Hi-C

  • DNase Hi-C

  • Micro-C

  • capture-C

  • capture Hi-C

  • HiChip

安装hiclib代码如下:

source activate hic
conda install numpy scipy matplotlib h5py cython numexpr statsmodels  scikit-learn pandas 
pip install https://bitbucket.org/mirnylab/mirnylib/get/tip.tar.gz
pip install https://bitbucket.org/mirnylab/hiclib/get/tip.tar.gz ##  17.7MB 44kB/s

安装hiclib代码如下:

# conda install numpy scipy matplotlib h5py cython numexpr statsmodels  scikit-learn pandas
## 依赖软件比较多
source activate hic
conda install -y pysam bx-python numpy scipy 
conda install  -y R  

R -e 'install.packages(c('ggplot2','RColorBrewer') repos='https://mirrors.tuna.tsinghua.edu.cn/CRAN/')'
R -e 'library(ggplot2)'
R -e 'library(RColorBrewer)'

mkdir -p ~/biosoft/hicpro
cd ~/biosoft/hicpro
git clone https://github.com/nservant/HiC-Pro.git
cd HiC-Pro/
which bowtie2
which R
which samtools
which python
cat config-install.txt
mkdir /home/zengjianming/biosoft/hicpro/bin

这个时候一定要根据自己的系统环境,修改目录下的config-install.txt文件哦:

PREFIX =/home/zengjianming/biosoft/hicpro/bin
BOWTIE2_PATH =/home/zengjianming/miniconda3/envs/hic/bin/bowtie2
SAMTOOLS_PATH =/home/zengjianming/miniconda3/envs/hic/bin/samtools
R_PATH =/home/zengjianming/miniconda3/envs/hic/bin/R
PYTHON_PATH =/home/zengjianming/miniconda3/envs/hic/bin/python
CLUSTER_SYS =SGE

然后就可以编译自己的软件啦:

make configure
make install

依赖非常多,但是用心安装还是问题不大的哦!

/home/zengjianming/biosoft/hicpro/bin/HiC-Pro_2.10.0/bin/HiC-Pro -h

这样如果输出了帮助文档,说明安装成功哦。

hiclib教程

先看官网readme,如下:

  • 0. Download software and data

  • 1. Map reads to the genome

  • 2. Filter the dataset at the restriction fragment level

  • 3. Filter and iteratively correct heatmaps.

打开才发现,居然清一色的python代码,而不是打包好的软件,命令行加上参数的模式来走这个流程,感觉有点难用,先放弃,后续再更新这个使用记录。

Hic-pro教程

其说明书完全不逊于hiclib,详见:http://nservant.github.io/HiC-Pro

大体上看就6个步骤,比对、过滤HiC比对结果、检测有效HiC序列、结果合并、构建HiC关联图谱以及关联图谱标准化。而行使这些不同功能只需要更改参数即可:

 [-s|--step ANALYSIS_STEP] : run only a subset of the HiC-Pro workflow; if not specified the complete workflow is run
      mapping: perform reads alignment - require fast files
      proc_hic: perform Hi-C filtering - require BAM files
      quality_checks: run Hi-C quality control plots
      merge_persample: merge multiple inputs and remove duplicates if specified - require .validPairs files
      build_contact_maps: Build raw inter/intrachromosomal contact maps - require _allValidPairs files
      ice_norm : run ICE normalization on contact maps - require .matrix files

只使用s 参数才会分步运行,因为5步中还是mapping花的时间最多,如果其它步骤需要调整参数,分步运行还是会快很多,比如调整BIN_SIZE等等。

当然,不得不提的是其特色功能:位基因特异性HiC分析

今天有点晚了,明天继续实战哦。

其它实战数据集

上面的是细菌基因组,测序文件也小很多,适合练手,如果熟练了也可以找其它数据集,比如Rose基因组的HiC原始数据下载地址:

  • http://sra-download.ncbi.nlm.nih.gov/srapub/SRR6189546

  • http://sra-download.ncbi.nlm.nih.gov/srapub/SRR6189547

每个数据都12G左右。

还可以是 An Osteoporosis Risk SNP at 1p36.12 Acts as an Allele-Specific Enhancer to Modulate LINC00339 Expression via Long-Range Loop Formation 文章的数据,等等。

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
conda第一步,你确定安装成功了吗?
​什么,你嫌bioconda下载速度太慢?
如何使用蟒蛇在WSL+UBUNTU20.04+python3.8上安装openCV?
miniconda配置
服务器搭建: git, miniconda以及bioconda
创建独立的Python化学信息学环境
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服