1. bam 文件 转 bw 文件
# bam 文件 转 bw 文件
bamCoverage -b ck.final.bam -o ck.final.bw \--numberOfProcessors 8 \
--effectiveGenomeSize 2862010428 \
--normalizeUsing RPGC \
--outFileFormat bigwig \
(这个命令 我把输入和输出文件写在后面就报错,不知道因为啥原因 )
参数解释:
numberOfProcessors 8 : 8 线程
effectiveGenomeSize: 根据物种选择,参考网址如下:
Effective Genome Size — deepTools 3.5.6 documentation
2.下面是形成矩阵文件,用 ComputeMatrix 计算全基因组范围内 peaks 在基因特征的分布情况。
computeMatrix reference-point --referencePoint TSS -p 15 -b 10000 -a 10000 -R annoation/gene_chr.bed -S ck/ck.final.bw --skipZeros -o ck/TSS/ck_TSS.gz --outFileSortedRegions ck/TSS/ck_genes.bed
输入文件:
gene_chr.bed 是来自 Homo_sapiens - Ensembl genome browser 113 ensembl 官网下载gene annoation 基因注释文件 gff3 格式
下载下来是gff3.gz 格式 ,gunzip 解压 ;用awk 转变格式到bed
awk '$3 == "gene"' gene.gff3 | awk 'BEGIN{FS="\t|=|;";OFS="\t"}{print $1,$4-1,$4}' > gene.bed
computeMatrix 这一步 我用之前的atac_test 环境报错 skip 一些区域, 解决起来有点麻烦,感觉像是包的版本问题,这一步就用回了课题组的一个做chip的环境,具体包版本如下:
# 环境版本如下
_libgcc_mutex=0.1=conda_forge
_openmp_mutex=4.5=1_gnu
_r-mutex=1.0.1=anacondar_1
binutils_impl_linux-64=2.35.1=h193b22a_2
binutils_linux-64=2.35=h67ddf6f_30
bowtie=1.3.0=py37ha6cad0b_2
bowtie2=2.4.3=py37h13ad519_0
brotlipy=0.7.0=py37h5e8e339_1001
bwidget=1.9.14=ha770c72_0
bz2file=0.98=py_0
bzip2=1.0.8=h7f98852_4
c-ares=1.17.1=h7f98852_1
ca-certificates=2021.10.26=h06a4308_2
cairo=1.16.0=h6cf1ce9_1008
certifi=2021.10.8=py37h06a4308_0
cffi=1.14.5=py37hc58025e_0
chardet=4.0.0=py37h89c1867_1
click=8.0.0=py37h89c1867_0
colorama=0.4.4=pyh9f0ad1d_0
coloredlogs=15.0=py37h89c1867_0
colormath=3.0.0=py_2
commonmark=0.9.1=py_0
cryptography=3.4.7=py37h5d9358c_0
curl=7.76.1=hea6ffbf_2
cutadapt=1.18=py37h14c3975_1
cycler=0.10.0=py_2
decorator=4.4.2=py_0
deeptools=3.5.1=py_0
deeptoolsintervals=0.1.9=py37h73a75cf_3
expat=2.2.10=h9c3ff4c_0
fastqc=0.11.9=hdfd78af_1
font-ttf-dejavu-sans-mono=2.37=hab24e00_0
font-ttf-inconsolata=3.000=h77eed37_0
font-ttf-source-code-pro=2.038=h77eed37_0
font-ttf-ubuntu=0.83=hab24e00_0
fontconfig=2.13.1=hba837de_1005
fonts-conda-ecosystem=1=0
fonts-conda-forge=1=0
freetype=2.10.4=h0708190_1
fribidi=1.0.10=h36c2ea0_0
future=0.18.2=py37h89c1867_3
gcc_impl_linux-64=9.3.0=h70c0ae5_19
gcc_linux-64=9.3.0=hf25ea35_30
gettext=0.19.8.1=h0b5b191_1005
gfortran_impl_linux-64=9.3.0=hc4a2995_19
gfortran_linux-64=9.3.0=hdc58fab_30
ghostscript=9.18=1
graphite2=1.3.13=h58526e2_1001
gsl=2.6=he838d99_2
gxx_impl_linux-64=9.3.0=hd87eabc_19
gxx_linux-64=9.3.0=h3fbe746_30
harfbuzz=2.8.1=h83ec7ef_0
hdf5=1.10.6=nompi_h6a2412b_1114
homer=4.11=pl5262h7d875b9_4
htslib=1.12=h9093b5e_1
humanfriendly=9.1=py37h89c1867_0
icu=68.1=h58526e2_0
idna=2.10=pyh9f0ad1d_0
importlib-metadata=4.0.1=py37h89c1867_0
jinja2=3.0.0=pyhd8ed1ab_0
joblib=1.0.1=pyhd3eb1b0_0
jpeg=9d=h36c2ea0_0
kernel-headers_linux-64=2.6.32=h77966d4_13
kiwisolver=1.3.1=py37h2527ec5_1
krb5=1.19.1=hcc1bbae_0
lcms2=2.12=hddcbb42_0
ld_impl_linux-64=2.35.1=hea4e1c9_2
ldc=1.13.0=h02c9852_1
libblas=3.9.0=9_openblas
libcblas=3.9.0=9_openblas
libcurl=7.76.1=h2574ce0_2
libdeflate=1.7=h7f98852_5
libedit=3.1.20191231=he28a2e2_2
libev=4.33=h516909a_1
libffi=3.3=h58526e2_2
libgcc=7.2.0=h69d50b8_2
libgcc-devel_linux-64=9.3.0=h7864c58_19
libgcc-ng=9.3.0=h2828fa1_19
libgfortran-ng=9.3.0=hff62375_19
libgfortran5=9.3.0=hff62375_19
libglib=2.68.2=h3e27bee_0
libgomp=9.3.0=h2828fa1_19
libiconv=1.16=h516909a_0
libidn2=2.3.1=h7f98852_0
liblapack=3.9.0=9_openblas
libnghttp2=1.43.0=h812cca2_0
libopenblas=0.3.15=pthreads_h8fe5266_0
libpng=1.6.37=h21135ba_2
libssh2=1.9.0=ha56f1ee_6
libstdcxx-devel_linux-64=9.3.0=hb016644_19
libstdcxx-ng=9.3.0=h6de172a_19
libtiff=4.2.0=hdc55705_1
libunistring=0.9.10=h14c3975_0
libuuid=2.32.1=h7f98852_1000
libwebp-base=1.2.0=h7f98852_2
libxcb=1.13=h7f98852_1003
libxml2=2.9.12=h72842e0_0
libxslt=1.1.33=h15afd5d_2
lz4-c=1.9.3=h9c3ff4c_0
lzstring=1.0.4=py_1001
macs2=2.2.7.1=py37h73a75cf_2
make=4.3=hd18ef5c_1
manorm=1.3.0=py_0
markdown=3.3.4=pyhd8ed1ab_0
markupsafe=2.0.0=py37h5e8e339_0
matplotlib-base=3.4.2=py37hdd32ed1_0
meme=5.3.0=py37pl5262h2b62359_2
mpi=1.0=openmpi
multiqc=1.10.1=pyhdfd78af_1
ncbi-ngs-sdk=2.11.0=hff44eed_0
ncurses=6.2=h58526e2_4
networkx=2.5.1=pyhd8ed1ab_0
numpy=1.20.2=py37h038b26d_0
olefile=0.46=pyh9f0ad1d_1
openjdk=10.0.2=h14c3975_1015
openjpeg=2.4.0=hb52868f_1
openmpi=4.1.1=hbfc84c5_0
openssl=1.1.1l=h7f8727e_0
ossuuid=1.6.2=hf484d3e_1000
pango=1.48.4=hb8ff022_1
pcre=8.44=he1b5a44_0
pcre2=10.36=h032f7d1_1
perl=5.26.2=h36c2ea0_1008
perl-app-cpanminus=1.7044=pl526_1
perl-base=2.23=pl526_1
perl-business-isbn=3.004=pl526_0
perl-business-isbn-data=20140910.003=pl526_0
perl-carp=1.38=pl526_3
perl-cgi=4.44=pl526h14c3975_1
perl-common-sense=3.74=pl526_2
perl-constant=1.33=pl526_1
perl-data-dumper=2.173=pl526_0
perl-dbi=1.642=pl526_0
perl-encode=2.88=pl526_1
perl-exporter=5.72=pl526_1
perl-extutils-makemaker=7.36=pl526_1
perl-file-path=2.16=pl526_0
perl-file-temp=0.2304=pl526_2
perl-file-which=1.23=pl526_0
perl-html-parser=3.72=pl526h6bb024c_5
perl-html-tagset=3.20=pl526_3
perl-html-template=2.97=pl526_1
perl-html-tree=5.07=pl526_1
perl-json=4.02=pl526_0
perl-json-xs=2.34=pl526h6bb024c_3
perl-log-log4perl=1.49=pl526_0
perl-math-cdf=0.1=pl526h14c3975_5
perl-mime-base64=3.15=pl526_1
perl-parent=0.236=pl526_1
perl-scalar-list-utils=1.52=pl526h516909a_0
perl-types-serialiser=1.0=pl526_2
perl-uri=1.76=pl526_0
perl-xml-libxml=2.0132=pl526h7ec2d77_1
perl-xml-namespacesupport=1.12=pl526_0
perl-xml-parser=2.44=pl526h4e0c4b3_7
perl-xml-sax=1.02=pl526_0
perl-xml-sax-base=1.09=pl526_0
perl-xml-sax-expat=0.51=pl526_3
perl-xml-simple=2.25=pl526_1
perl-xsloader=0.24=pl526_0
perl-yaml=1.29=pl526_0
picard=2.26.1=hdfd78af_0
pigz=2.6=h27826a3_0
pillow=8.1.2=py37h4600e1f_1
pip=21.1.1=pyhd8ed1ab_0
pixman=0.40.0=h36c2ea0_0
plotly=4.14.3=pyh44b312d_0
pthread-stubs=0.4=h36c2ea0_1001
py2bit=0.3.0=py37h73a75cf_5
pybigwig=0.3.18=py37hbd7a627_1
pycparser=2.20=pyh9f0ad1d_2
pygments=2.9.0=pyhd8ed1ab_0
pyopenssl=20.0.1=pyhd8ed1ab_0
pyparsing=2.4.7=pyh9f0ad1d_0
pysam=0.16.0.1=py37h45aed0b_3
pysocks=1.7.1=py37h89c1867_3
python=3.7.10=hffdb5ce_100_cpython
python-dateutil=2.8.1=py_0
python_abi=3.7=1_cp37m
pyyaml=5.4.1=py37h5e8e339_0
qualimap=2.2.2a=1
r-base=4.0.5=h9e01966_1
readline=8.1=h46c0cb4_0
requests=2.25.1=pyhd3deb0d_0
retrying=1.3.3=py_2
rich=10.2.0=py37h89c1867_0
sambamba=0.6.8=h89e63da_2
samtools=1.12=h9aed4be_1
scikit-learn=0.24.2=py37ha9443f7_0
scipy=1.6.3=py37h29e03ee_0
sed=4.8=he412f7d_0
setuptools=49.6.0=py37h89c1867_3
simplejson=3.17.2=py37h5e8e339_2
six=1.16.0=pyh6c4a22f_0
soapaligner=2.21=0
spectra=0.0.11=py_1
sqlite=3.35.5=h74cdb3f_0
sra-tools=2.11.0=pl5262h314213e_0
sysroot_linux-64=2.12=h77966d4_13
tbb=2020.2=h4bd325d_4
threadpoolctl=2.1.0=pyh5ca1d4c_0
tk=8.6.10=h21135ba_1
tktable=2.10=hb7b940f_3
tornado=6.1=py37h5e8e339_1
tree=1.8.0=h7f98852_2
trim-galore=0.6.6=hdfd78af_1
trimmomatic=0.39=hdfd78af_2
typing_extensions=3.7.4.3=py_0
unzip=6.0=h7f98852_2
urllib3=1.26.4=pyhd8ed1ab_0
wget=1.20.1=h22169c7_0
wheel=0.36.2=pyhd3deb0d_0
xopen=0.7.3=py_0
xorg-kbproto=1.0.7=h7f98852_1002
xorg-libice=1.0.10=h7f98852_0
xorg-libsm=1.2.3=hd9c2040_1000
xorg-libx11=1.7.0=h7f98852_0
xorg-libxau=1.0.9=h7f98852_0
xorg-libxdmcp=1.1.3=h7f98852_0
xorg-libxext=1.3.4=h7f98852_1
xorg-libxrender=0.9.10=h7f98852_1003
xorg-libxt=1.2.1=h7f98852_2
xorg-renderproto=0.11.1=h7f98852_1002
xorg-xextproto=7.3.0=h7f98852_1002
xorg-xproto=7.0.31=h7f98852_1007
xz=5.2.5=h516909a_1
yaml=0.2.5=h516909a_0
zipp=3.4.1=pyhd8ed1ab_0
zlib=1.2.11=h516909a_1010
zstd=1.4.9=ha95c52a_0
3.绘制热图:
plotHeatmap -m ck/TSS/ck_TSS.gz -out ck/TSS/ck_Heatmap.png
最终结果: