ALLHiC icon indicating copy to clipboard operation
ALLHiC copied to clipboard

empty plot

Open GaoChengyu opened this issue 2 years ago • 6 comments

老师您好, 在运行ALLhic对简单基因组进行挂载时,日志似乎表示运行成功,也出现了最后的结果,挂载率也能到90%以上。但绘图时热图却是空白的。简单测试好像是互作矩阵计算为0。请问是什么原因造成这种问题。 谢谢老师! 1669682604(1)

GaoChengyu avatar Nov 29 '22 00:11 GaoChengyu

The first thing need be checked is that the bam file for drawing heatmap was generated by mapping reads to contig level assembly, and the ID of contigs must match with which in agp file. If the bam file was generated by mapping reads to final assembly, the script https://github.com/sc-zhang/ALLHiC_components/blob/main/bam_HiCplotter.py is what you need. The second thing need be checked is that if the ID of chromosomes in agp file and in chromosome length file are same.

sc-zhang avatar Nov 29 '22 01:11 sc-zhang

The first thing need be checked is that the bam file for drawing heatmap was generated by mapping reads to contig level assembly, and the ID of contigs must match with which in agp file. If the bam file was generated by mapping reads to final assembly, the script https://github.com/sc-zhang/ALLHiC_components/blob/main/bam_HiCplotter.py is what you need. The second thing need be checked is that if the ID of chromosomes in agp file and in chromosome length file are same.

十分感谢您的回复。是我在contig命名上出了问题导致错误识别。

GaoChengyu avatar Nov 29 '22 13:11 GaoChengyu

你好,我的agp文件ID是最终组装的scaffold水平的ID,bam文件是比对到contig水平的基因组,图画出来也是空文件,请问这种情况能用这个脚本吗?

ShirelyI avatar Feb 28 '23 08:02 ShirelyI

The first thing need be checked is that the bam file for drawing heatmap was generated by mapping reads to contig level assembly, and the ID of contigs must match with which in agp file. If the bam file was generated by mapping reads to final assembly, the script https://github.com/sc-zhang/ALLHiC_components/blob/main/bam_HiCplotter.py is what you need. The second thing need be checked is that if the ID of chromosomes in agp file and in chromosome length file are same.

十分感谢您的回复。是我在contig命名上出了问题导致错误识别。

@GaoChengyu 你好,很抱歉打扰你~ 在根据上面张老师的说明检查我的文件中contig的Id之后,我的图片还是空的,所以想寻求一下您的帮助,想问一下您当时是如何解决这个问题的。 (Choose ctg000180_np121212121212 as an example)

The format of bam file for drawing heatmap was generated by mapping reads to contig level assembly as follow: A00358:542:H3NTJDSX2:2:1101:22634:1016 99 ctg000180_np121212121212_pilon 5290234 60 57S93M = 5290238 154 A00358:542:H3NTJDSX2:2:1101:22634:1016 2163 ctg000240_np121212121212_pilon 18242702 37 97H53M ctg000180_np1 A00358:542:H3NTJDSX2:2:1101:22634:1016 147 ctg000180_np121212121212_pilon 5290238 60 150M = 5290234 -154 A00358:542:H3NTJDSX2:2:1101:25220:1016 83 ctg001430_np121212121212_pilon 3045738 44 143M7S = 3045703 -178 A00358:542:H3NTJDSX2:2:1101:25220:1016 163 ctg001430_np121212121212_pilon 3045703 48 34S116M = 3045738 178 A00358:542:H3NTJDSX2:2:1101:25220:1016 2211 ctg001160_np121212121212_pilon 13901922 48 33M117H ctg001430_np1 A00358:542:H3NTJDSX2:2:1101:26449:1047 83 ctg000250_np121212121212_pilon 808319 60 106M44S = 808272 -153

And my groups.agp file looks like this: group2 22211055 29697479 3 W ctg000560_np121212121212_pilon 1 7486425 + group2 29697480 29697579 4 U 100 contig yes map group2 29697580 39544802 5 W ctg000180_np121212121212_pilon 1 9847223 - group2 39544803 39544902 6 U 100 contig yes map group2 39544903 60637849 7 W ctg000230_np121212121212_pilon 1 21092947 +

The chrn.list file looks like this: group1 60941085 group10 28967154 group11 27419351 group12 24016781 group13 22413972 group14 21552824 group15 19670054 group16 18231391 group17 17526495 group18 16397261 group19 14933825 group2 60637849 group20 14699490 group21 12557559

从上面的文件内容看,符合contigs的ID与agp文件中的一致,以及agp文件中染色体的ID与染色体长度文本中的ID一致这些要求(至少在我看来)

您能给我一些建议吗?非常感谢!

Huangxc01 avatar Apr 17 '23 10:04 Huangxc01

@Huangxc01 for the data you post here, it may caused by the line 72 in the ALLHiC_plot, that we remove the '_pilon' while adding contig to the dictionary when reading agp file, the only thing need to be done is:

# Modify line 72 of ALLHiC_plot  from:
ctg = data[5].replace('_pilon', '')
# to
ctg = data[5]

sc-zhang avatar Apr 17 '23 10:04 sc-zhang

@Huangxc01 for the data you post here, it may caused by the line 72 in the ALLHiC_plot, that we remove the '_pilon' while adding contig to the dictionary when reading agp file, the only thing need to be done is:

# Modify line 72 of ALLHiC_plot  from:
ctg = data[5].replace('_pilon', '')
# to
ctg = data[5]

谢谢张老师的建议~ 在对ALLHiC_plot脚本进行修改之后,我成功得到了HiC交互信号图。但随后又遇到了一个问题,如图所示,在2号和3号位置我无法准确的区分是由几个groups组成,而1号位置存在的与对角线成正交的信号也使我感到困惑。由于我的是二倍体物种,具有较高的杂合度,所以我也用了ALLHiC_prune进行了过滤,但是效果仍然不是很理想。所以想请问老师我还可以做哪方面的改进尝试,从而获得一个比较理想的HiC的挂载效果。 屏幕截图 2023-04-17 205735

Huangxc01 avatar Apr 17 '23 12:04 Huangxc01