1.参考文献
Brookes, E. et al. Polycomb associates genome-wide with a specific RNA polymerase II variant, and regulates metabolic genes in ESCs. Cell Stem Cell 10, 157–170 (2012).
2.文章中的原始数据:
ACCESSION NUMBERS(文章中)
ChIP-seq and mRNA-seq data have been submitted to the GEO repository
under accession number GSE34520.GEO网站:GSE34520 显示:
| GSE34518 | Polycomb associates genome-wide with a specific RNA polymerase II variant, and regulates metabolic genes in ES cells (ChIP-Seq) | Organism : Mus musculus | Samples (9) | Overall design:Examination of 4 different RNAPII modifications (S5p, S7p, 8WG16, S2p), and the histone modifications H2Aub1 and H3K36me3 in mouse ES cellsSRA数据ID: https://www.ncbi.nlm.nih.gov/Traces/study/?acc=SRP009883 点击Accession List 下载列表并保存到文件,命名为
SRR_Acc_List.txt
使用prefetch下载。
3.数据分析简要流程图
4.安装必备软件
(1)下载SRR数据的软件,并安装:sratoolkit.2.10.8 和 aspera
#方法1:sratoolkit.2.10.8
#下载(速度比较慢):
>>> wget https://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/2.10.8/sratoolkit.2.10.8-centos_linux64.tar.gz
#解压:
>>> tar xzvf sratoolkit.2.10.8-centos_linux64.tar.gz
#添加环境配置:
>>> echo 'export PATH=/root/usr/local/sratoolkit.2.10.8-centos_linux64/bin:$PATH' >> ~/.bashrc(PATH="/sratoolkit的安装路径/bin")
>>> source ~/.bashrc
#方法2:Aspera(以前可以,现在报错了,不知原因)
>>> wget http://download.asperasoft.com/download/sw/connect/3.7.4/aspera-connect-3.7.4.147727-linux-64.tar.gz
#解压缩
>>> tar zxvf aspera-connect-3.7.4.147727-linux-64.tar.gz
# 安装(不能用root安装,要用user安装)
>>> bash aspera-connect-3.7.4.147727-linux-64.sh
# 环境配置
>>> echo 'export PATH=~/.aspera/connect/bin:$PATH' >> ~/.bashrc
>>> source ~/.bashrc
(2)下载Miniconda3,并安装,创建chipseq镜像,并安装需要的软件
#!/bin/bash
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh
#安装 Miniconda3
bash Miniconda3-latest-Linux-x86_64.sh
#使用conda之前需要对其做环境配置(/root/miniconda3/:miniconda3 安装路径)
export PATH="/root/miniconda3/bin:"$PATH
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
# 创建名字为chipseq的conda
conda create -n chipseq python=2 bwa
conda info --envs
source activate chipseq
# 可以用search先进行检索
conda search trim_galore
## 保证所有的软件都是安装在 wes 这个环境下面
conda install -y sra-tools
conda install -y trim-galore samtools
conda install -y deeptools homer meme
conda install -y macs2 bowtie bowtie2
5.数据分析
(1)数据下载(下载NCBI的SRA数据失败,直接下载EBI的fastq.gz)
使用aspera从EBI下载fastq数据,抛弃NCBI的SRA数据库
ENA主页:https://www.ebi.ac.uk/ena/browser/home
- 1.随便搜索需要的SRR数据:SRR391032
- 2.点击:PRJNA1546325
- 3.查看fastq.gz的数据格式(可以看出该文章的数据为单端测序)
数据下载代码
#!/bin/bash
#source activate chipseq
# ways1:下载SRA数据(下载速度很慢,且下载容易中断):
cat ./SRR_Acc_List.txt | while read id
do ( nohup prefetch $id & )
done
# ways2:ascp下载raw.fastq.gz(下载SRA数据报错:ascp: Failed to open TCP connection for SSH, exiting.Session Stop (Error: Failed to open TCP connection for SSH))
cat SRR_Acc_List.txt | while read i
do
x=$(echo $i | cut -b1-6)
echo era-fasp@fasp.sra.ebi.ac.uk:/vol1/fastq/$x/$i/$i.sra
ascp -QT -l 300m -P33001 -i ~/.aspera/connect/etc/asperaweb_id_dsa.openssh era-fasp@fasp.sra.ebi.ac.uk:/vol1/fastq/$x/$i/$i.fastq.gz /outdir/
(2)trim_galore:自动检测adapter的质控软件
第一步首先去除低质量碱基,然后去除3' 末端的adapter, 如果没有指定具体的adapter,程序会自动检测前1million的序列,然后对比前12-13bp的序列是否符合以下类型的adapter:
- Illumina: AGATCGGAAGAGC
- Small RNA: TGGAATTCTCGG
- Nextera: CTGTCTCTTATA
trim_galore过滤及质控代码:
# 安装
source activate chipseq
conda install trim_galore
# 过滤
analysis_dir=./Data/
ls $analysis_dir/Raw_Fastq/*gz | while read fq1;
do
nohup trim_galore -q 25 --phred33 --length 25 -e 0.1 --stringency 4 -o $analysis_dir/Clean_Fastq/ $fq1 &
done
# 质控Fastqc
ls ./Raw_Fastq/*gz | xargs fastqc -t 10 -o ./Fastq_QC/
ls ./Clean_Fastq/*gz | xargs fastqc -t 10 -o ./Fastq_QC/
(3)下载参考基因组的索引和注释文件(小鼠常用mm10)
# 索引大小为3.2GB, 不建议自己下载基因组构建,可以直接下载索引文件,代码如下:
>>> wget -4 -q ftp://ftp.ccb.jhu.edu/pub/data/bowtie2_indexes/mm10.zip
>>> unzip mm10.zip