Open Linhua-Sun opened 2 years ago
Another question came from loops in upper or lower showing above the heatmap. The key code line is HandArc = HiCPeaksCoverage(HandLoop,color="black",line_width=1,score_to_width=1,side="upper")
. I have set side='upper'
, while the output is still confusing. It is OK if side='both'
. It will be quite clean if we can show loops only in one side.
## coolbox 0.3.8
# -*- coding: utf-8 -*-
import coolbox
from coolbox.api import *
#from __future__ import print_function
import sys
import re
Ctrl_mcool='test.mcool'
HandLoop='testLoops.bedpe'
BEDfile='testAnchors.bed'
HandLoops = Arcs(HandLoop, open_region=False,color="red",title="conD Loop",score_to_width=1,line_width=1,height=2,diameter_to_height="max_height-1")
HandArc = HiCPeaksCoverage(HandLoop,color="black",line_width=1,score_to_width=1,side="upper")
AnchorsBED=BED(BEDfile,display="collapsed",color="blue",border_color='blue',height=0.5,title='Anchors')
frame = Arcs(HandLoop, open_region=False,color="red",title="Loop",score_to_width=1,line_width=1,height=2,diameter_to_height="max_height-1") +\
AnchorsBED +\
Spacer() +\
HighLightsFromFile(BEDfile,color='green')
cool1 = Cool(Ctrl_mcool,style='matrix',
balance=True,
normalize="expect",
transform=False,
gaussian_sigma=1,
norm=False,
max_value=100,
resolution=20000,
cmap='bwr',
min_value=10,
color_bar='no') + HandArc + HighLightsFromFile(BEDfile,color='green', alpha=0,border_line_alpha=1,border_line_color='red',border_line_width=1,border_line_style='solid')
sub_frames = {
"top": frame,
"right": frame
}
jv = JointView(cool1,**sub_frames, space=0, padding_left=0)
jv.plot('18:50000000-58000000')
Thanks for your time! Best wishes! Linhua
Hi @Nanguage
Question 1 and 2
I am trying to use
CoolBox
to plot loops above the heatmap likeJuiceBox
(https://github.com/aidenlab/Juicebox/wiki/Loading-Annotations-(Annotations-menu)). While, I found sever bugs.HiCPeaksCoverage
to show loops above heatmap body in style oftriangular
. Only two of all 11 loops are shown, while if we use heatmap body in style ofmatrix
, all loops were shown.Arcs
function with/without diameter_to_height, as you can seen from the tracks, Loop 1 only shows two loops.The Loop bedpe file are:
My code is:
The figure is: