2021-06-04

#! /bin/bash
# 上面一行宣告这个script的语法使用bash语法,当程序被执行时,能够载入bash的相关环境配置文件。
# Program:
#       This program is used for computeMatrix scale-regions.
#History:
# 2021/05/07         zexing              First release
# In the scale-regions mode, all regions in the BED file are stretched or shrunken to the length (in bases) indicated by the user.
# 参数-R 指定作图位置的BED或GTF格式文件,可用#标记同一组区域,默认无。
# 参数-S 输入bigwig文件。
# 参数-o 指定输出为文件名用于plotHeatmap, plotProfile
# 参数-b上游(默认0bp),-a下游(默认0bp)设定感兴趣的区域,如果该区域是基因,则为基因TSS上游或TES下游。
# 参数--skipZeros设定0分区域的处理
# 参数-p 设置线程数

dir=/f/xudonglab/zexing/projects/zhaoyingying/ChIP_seq/2021_05_01
bed=${dir}/macs2_callpeak
bw=${dir}/bam_bw
results=${dir}/matrix_reference_point

# 对H3K4me1查看区间(2.5k)信号分布

# 查看2.5k信号分布
# 使用scale-region模式,以TSS为中心计算信号强度
computeMatrix scale-region \
-R ${bed}/JV85_H3K4me1_H3K27ac_peaks.broadPeak \
-S ${bw}/JV85_H3K4me1.bam.sort.bw ${bw}/AJV93_H3K4me1.bam.sort.bw \
-o ${results}/matrix_reference_H3K4me1_2.5k.gz \
-b 2500 -a 2500 \
-p 16
# 使用plotHeatmap对结果绘制热图并聚类
plotHeatmap -m ${results}/matrix_reference_H3K4me1_2.5k.gz \
-o ${results}/reference_H3K4me1_2.5k_heatmap.png \
--dpi 750 \
--colorMap Blues \
--whatToShow 'heatmap and colorbar' \
--regionsLabel H3K4me1 \
--samplesLabel WT KO
# 使用plotProfile对结果绘制密度图并聚类
plotProfile -m ${results}/matrix_reference_H3K4me1_2.5k.gz \
-o ${results}/reference_H3K4me1_2.5k_profile.png \
--dpi 750 \
--legendLocation upper-right \
--regionsLabel H3K4me1 \
--samplesLabel WT KO \
--perGroup


# 对H3K27ac查看区间(2.5k)信号分布

# 查看2.5k信号分布
# 使用reference-point模式,以TSS为中心计算信号强度
computeMatrix scale-region \
-R ${bed}/JV85_H3K4me1_H3K27ac_peaks.broadPeak \
-S ${bw}/JV85_H3K27ac.bam.sort.bw ${bw}/AJV93_H3K27ac.bam.sort.bw \
-o ${results}/matrix_reference_H3K27ac_2.5k.gz \
-b 2500 -a 2500 \
-p 16
# 使用plotHeatmap对结果绘制热图并聚类
plotHeatmap -m ${results}/matrix_reference_H3K27ac_2.5k.gz \
-o ${results}/reference_H3K27ac_2.5k_heatmap.png \
--dpi 750 \
--colorMap Blues \
--whatToShow 'heatmap and colorbar' \
--regionsLabel H3K27ac \
--samplesLabel WT KO
# 使用plotProfile对结果绘制密度图并聚类
plotProfile -m ${results}/matrix_reference_H3K27ac_2.5k.gz \
-o ${results}/reference_H3K27ac_2.5k_profile.png \
--dpi 750 \
--legendLocation upper-right \
--regionsLabel H3K27ac \
--samplesLabel WT KO \
--perGroup

# 对H2AK119ub查看区间(5k,10k)信号分布

# 查看5k信号分布
# 使用reference-point模式,以TSS为中心计算信号强度
computeMatrix scale-region \
-R ${bed}/JV85_H3K4me1_H3K27ac_peaks.broadPeak \
-S ${bw}/JV21_H2AK119ub.bam.sort.bw ${bw}/AJV32_H2AK119ub.bam.sort.bw \
-o ${results}/matrix_reference_H2AK119ub_5k.gz \
-b 5000 -a 5000 \
-p 16
# 使用plotHeatmap对结果绘制热图并聚类
plotHeatmap -m ${results}/matrix_reference_H2AK119ub_5k.gz \
-o ${results}/reference_H2AK119ub_5k_heatmap.png \
--dpi 750 \
--colorMap Blues \
--whatToShow 'heatmap and colorbar' \
--regionsLabel H2A119ub1 \
--samplesLabel WT KO
# 使用plotProfile对结果绘制密度图并聚类
plotProfile -m ${results}/matrix_reference_H2AK119ub_5k.gz \
-o ${results}/reference_H2AK119ub_5k_profile.png \
--dpi 750 \
--legendLocation upper-right \
--regionsLabel H2A119ub1 \
--samplesLabel WT KO \
--perGroup

# 查看10k信号分布
# 使用reference-point模式,以TSS为中心计算信号强度
computeMatrix scale-region \
-R ${bed}/JV85_H3K4me1_H3K27ac_peaks.broadPeak \
-S ${bw}/JV21_H2AK119ub.bam.sort.bw ${bw}/AJV32_H2AK119ub.bam.sort.bw \
-o ${results}/matrix_reference_H2AK119ub_10k.gz \
-b 10000 -a 10000 \
-p 16
# 使用plotHeatmap对结果绘制热图并聚类
plotHeatmap -m ${results}/matrix_reference_H2AK119ub_10k.gz \
-o ${results}/reference_H2AK119ub_10k_heatmap.png \
--dpi 750 \
--colorMap Blues \
--whatToShow 'heatmap and colorbar' \
--regionsLabel H2A119ub1 \
--samplesLabel WT KO
# 使用plotProfile对结果绘制密度图并聚类
plotProfile -m ${results}/matrix_reference_H2AK119ub_10k.gz \
-o ${results}/reference_H2AK119ub_10k_profile.png \
--dpi 750 \
--legendLocation upper-right \
--regionsLabel H2A119ub1 \
--samplesLabel WT KO \
--perGroup




#! /bin/bash
# 上面一行宣告这个script的语法使用bash语法,当程序被执行时,能够载入bash的相关环境配置文件。
# Program:
#       This program is used for computeMatrix scale-regions.
#History:
# 2021/05/07         zexing              First release
# In the scale-regions mode, all regions in the BED file are stretched or shrunken to the length (in bases) indicated by the user.
# 参数-R 指定作图位置的BED或GTF格式文件,可用#标记同一组区域,默认无。
# 参数-S 输入bigwig文件。
# 参数-o 指定输出为文件名用于plotHeatmap, plotProfile
# 参数-b上游(默认0bp),-a下游(默认0bp)设定感兴趣的区域,如果该区域是基因,则为基因TSS上游或TES下游。
# 参数--skipZeros设定0分区域的处理
# 参数-p 设置线程数

dir=/f/xudonglab/zexing/projects/zhaoyingying/ChIP_seq/2021_05_01
bed=${dir}/macs2_callpeak
bw=${dir}/bam_bw
results=${dir}/zyy

# 查看2.5k信号分布
# 使用scale-regions模式,以TSS为中心计算信号强度
scale-regions \
-R ${bed}/JV21_H3K27me3_intersect_peaks.broadPeak \
-S ${bw}/JV21_H3K27me3.bam.sort.bw ${bw}/AJV32_H3K27me3.bam.sort.bw \
-o ${results}/matrix_reference_H3K27me3_2.5k.gz \
-b 2500 -a 2500 \
-p 16
# 使用plotHeatmap对结果绘制热图并聚类
plotHeatmap -m ${results}/matrix_reference_H3K27me3_2.5k.gz \
-o ${results}/reference_H3K27me3_2.5k_heatmap.png \
--dpi 750 \
--colorMap Blues \
--whatToShow 'heatmap and colorbar' \
--regionsLabel H3K27me3 \
--samplesLabel WT KO
# 使用plotProfile对结果绘制密度图并聚类
plotProfile -m ${results}/matrix_reference_H3K27me3_2.5k.gz \
-o ${results}/reference_H3K27me3_2.5k_profile.png \
--dpi 750 \
--legendLocation upper-right \
--regionsLabel H3K27me3 \
--samplesLabel WT KO \
--perGroup

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值