以下是ChIP-seq 数据转换链悄的一个示例用法
-b, --bam : 输入的bam文件
-o :输出的bw文件
-bs, --binSize :分割的bin size
--normalizeUsing :每个bins中read counts的校正单位,可以从 RPKM , CPM , BPM , RPM , RPGC 中选择
--effectiveGenomeSize :可比对基因组区域的大小(bp),可以从这里查 http://deeptools.readthedocs.io/en/latest/content/feature/effectiveGenomeSize.html
--scaleFactor :数值,可以是由spike-in推算的校正因子
--numberOfProcessors, -p :使用的线程数
bamCompare 的基本用法如下
其中,
-b1 :处理组的bam文件
-b2 :控制组的bam文件
-o :输出的bw文件
--scaleFactorsMethod : Possible choices: readCount, SES, None。用于校正样本间文库测序深度的方法,也可以将该参数设置为 None ,然后使用 --normalizeUsing 进行校正。
--operation :Possible choices: log2, ratio, subtract, add, mean, reciprocal_ratio, first, second.
--pseudocount : 添加一个较小的数值避免分芹逗母为0,默认是 1
另外棚首渣, bamCoverage 中使用的多数参数在 bamCompare 中都能使用。
本文只是简单总结了 bamCoverge , bamCompare 两个命令中的部分参数,关于其详细的参数列表可以到其官方文档,或者在linux下加上 --help 参数查看。
完。
ATAC后续可视化生成的热图和平均图可以用R包进行绘制,我这里选的是deeptools里的bamCoverage和computeMatrix功能
deeptools安装是用conda一键式安装,我直接安在base环境下,不需要再另外配置环境
看一下deeptools的手册,可以更快帮助自己了解deeptools的参数
先将之前bowtie比对的bam文件进行归一化,转为bigwig文件
需要用samtools先建索引:ls *.rmdum.bam |xargs -i samtools index {}
bamCoverage命令转bw文件,-b是输入文件,-o是是输出文件
bamCoverage -b /home/huilin_hu/Arabidopsis/output/5.clean/57.bowtie.clean.sort.exc.sort.reheader.rmdup.bam -o 57.bw
computeMatrix 有两种不同的模式
reference-point ( relative to a point ): 计算某个点的信号丰度
scale-regions(over a set of regions ): 把所有基因组区段缩放判明至同样大小,然后计算其信号丰度
我这里是输入多个样本
-b 10000是指上游区域10000bp -a是指下游区域10000bp
-R是拟南芥基因组注释文件中提取的bed文件,共三列,染色体,起始坐标运冲旦和终止坐标
-S是bamCoverage转的bw文件
会输出两个文件:matrix1_test_TSS.gz regions1_test_genes.bed 自己命名就好,这两个文件用于后期画热图和平均图
computeMatrix reference-point --referencePoint TSS -p 15 \
-b 10000 -a 10000 \
-R /home/huilin_hu/Arabidopsis/output/5.clean/genes.bed \
-S /home/huilin_hu/Arabidopsis/output/5.clean/*.bw \
--skipZeros -o matrix1_test_TSS.gz \
--outFileSortedRegions regions1_test_genes.bed
使用上述命令的时候运行的比较慢
plotHeatmap -m matrix1_test_TSS.gz -out 57_Heatmap_1K.png
我这里会报这个错,但是也出图了,下方所示,这个错误的网址目前我没打开
Bad key "text.kerning_factor" on line 4 in
/home/huilin_hu/miniconda3/lib/python3.7/site-packages/matplotlib/mpl-data/stylelib/_classic_test_patch.mplstyle.
You probably need to get an updated matplotlibrc file from
https://github.com/matplotlib/matplotlib/blob/v3.1.3/matplotlibrc.template
or from the matplotlib source distribution
平均旁扰图:plotProfile -m matrix1_test_TSS.gz -out 57_test.png
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)