快来学!你不知道的TSS富集热图中的小细节

今天小果有点忧伤,为什么论文里面的TSS富集图那么美观,小果的却略显丑陋呢

下面是论文中的TSS富集图,大家欣赏一下

下面呢则是相比起来略显不行的小果做的TSS富集图,大家欣赏一下

不比不知道,一比吓一跳!

小果做的图里面有很多的”黑线”,十分影响美观!

这可怎么办呢,小果赶紧又去仔细阅读了deeptools的帮助文档

–plotType {lines,fill,se,std}

“lines” will plot the profile line based on the

average type selected. “fill” fills the region between

zero and the profile curve. The fill in color is semi

transparent to distinguish different profiles. “se”

and “std” color the region between the profile and the

standard error or standard deviation of the data.

(default: lines)

–sortUsingSamples SORTUSINGSAMPLES [SORTUSINGSAMPLES …]

List of sample numbers (order as in matrix), which are

used by –sortUsing for sorting. If no value is set,

it uses all samples. Example: –sortUsingSamples 1 3

(default: None)

–linesAtTickMarks Draw dashed lines from all tick marks through the

heatmap. This is then similar to the dashed line draw

at region bounds when using a reference point and

–sortUsing region_length (default: False)

–clusterUsingSamples CLUSTERUSINGSAMPLES [CLUSTERUSINGSAMPLES …]

List of sample numbers (order as in matrix), that are

used for clustering by –kmeans or –hclust if not

given, all samples are taken into account for

clustering. Example: –ClusterUsingSamples 1 3

(default: None)

–averageTypeSummaryPlot {mean,median,min,max,std,sum}

Define the type of statistic that should be plotted in

the summary image above the heatmap. The options are:

“mean”, “median”, “min”, “max”, “sum” and “std”.

(default: mean)

–missingDataColor MISSINGDATACOLOR

If –missingDataAsZero was not set, such cases will be

colored in black by default. Using this parameter, a

different color can be set. A value between 0 and 1

will be used for a gray scale (black is 0). For a list

of possible color names see: http://packages.python.or

g/ete2/reference/reference_svgcolors.html. Other

colors can be specified using the #rrggbb notation.

(default: black)

–colorNumber COLORNUMBER

N.B., –colorList is required for an effect. This

controls the number of transitions from one color to

the other. If –colorNumber is the number of colors in

–colorList then there will be no transitions between

the colors. (default: 256)

–heatmapHeight HEATMAPHEIGHT

Plot height in cm. The default for the heatmap height

is 28. The minimum value is 3 and the maximum is 100.

(default: 28)

–heatmapWidth HEATMAPWIDTH

Plot width in cm. The default value is 4 The minimum

value is 1 and the maximum is 100. (default: 4)

上面几个参数是小果仔细阅读之后发现有可能影响“黑线”的关键参数,不过小果感觉一个一个去实验太麻烦了,只能去求助万能的度娘,里面有小伙伴说出现黑线是因为在使用computeMatrix形成矩阵文件没有添加参数–missingDataAsZero!小果没有想到是因为形成矩阵文件的问题,幸亏小果没有一个个参数实验,那怕不是白白浪费时间!

在了解到了问题所在之后,小果快马加鞭去实验了一下,下面是小果的使用computeMatrix命令形成矩阵文件的参数:

computeMatrix reference-point –referencePoint TSS -p 15 -b 10000 -a 10000 -R gene.bed -S test.bw –skipZeros –missingDataAsZero -o test_TSS.gz –outFileSortedRegions test_genes.bed

下面是参数的解释:

reference-point # 选择模式

-p 15 # 线程数

–referencePoint TSS # 选择参考点,还可以选择TES, center

-b 10000 -a 10000 # 感兴趣的区域,-b上游,-a下游

-R # 基因注释信息

-S # 提供的 bigwig 文件

–skipZeros # 是否包含零分区域

–missingDataAsZero # 不显示0的数据

下面是missingDataAsZero 参数的官方解释,大家可以试着理解一下嗷

If set, missing data (NAs) will be treated as zeros.

The default is to ignore such cases, which will be

depicted as black areas in a heatmap. (see the

–missingDataColor argument of the plotHeatmap command

for additional options). (default: False)

下面来欣赏一下小果新的TSS富集热图吧

果然没有了黑线,是不是比之前更美观了呢?

今天的关于TSS富集热图的小细节学习就到这里啦,感兴趣的小伙伴可以找小果讨论哦,我们明天见咯~