deeptools / HiCExplorer

HiCExplorer is a powerful and easy to use set of tools to process, normalize and visualize Hi-C data.
https://hicexplorer.readthedocs.org
GNU General Public License v3.0
231 stars 70 forks source link

chromatin state border color issue #660

Closed Drosophilid closed 3 years ago

Drosophilid commented 3 years ago

Hi, I am using HiC explorer to plot the TADs along with chromatin states. I was trying to remove the border color, but it looks given command is not taking this option (border_color = none) as it suggested in the given example.

Thank you

[chrom states]

this is a case of a bed file that is plotted 'collapsed'

useful to plot chromatin states if the bed file contains

the color to plot

file = chromatinStates.bed title = chromatin states

color is replaced by the color in the bed file

in this case

color = bed_rgb

default behaviour when plotting intervals from a

bed file is to 'expand' them such that they

do not overlap. The display = collapsed

directive overlaps the intervals.

display = collapsed width = 0.3

set to none to remove the border

border_color = black Screenshot 2021-01-14 at 15 25 46

lldelisle commented 3 years ago

Hi, Are you sure it is border color? In my case with pgt 3.6 it worked: image On the left with border_color = none, on the right without anything. Can you zoom a lot so we can see each individual region and copy paste the corresponding bed file? Thanks,

Drosophilid commented 3 years ago

Thanks for the quick reply, I did the same but it didn't work in my case. here is the zoom in view Screenshot 2021-01-14 at 16 29 59 and the bed file I have used. Screenshot 2021-01-14 at 16 35 07

lldelisle commented 3 years ago

Can you put the version of the tool you used, the ini file (please use a code block), the command, the output of the command (also in code block). For my part it was:

...
[tad state]
file = chromatinStates_kc.bed.gz
height = 0.5
title = bed display = collapsed; color = bed_rgb
labels = false
color = bed_rgb
display = collapsed
border_color = none
..

Command line:

 pgt --tracks ./pygenometracks/tests/test_data/temp.ini --region X:3000000-3500000 --trackLabelFraction 0.2 --width 38 --dpi 130  -o ./pygenometracks/tests/test_data/temp_plot.png

Output:

100%|████████████████████████████████████████████████████████████████████████████████████████████| 11/11 [00:00<00:00, 18272.22it/s]
INFO:pygenometracks.tracksClass:initialize 1. [x-axis]
INFO:pygenometracks.tracksClass:initialize 2. [spacer]
INFO:pygenometracks.tracksClass:initialize 3. [tads]
100%|████████████████████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 17810.21it/s]
INFO:pygenometracks.tracksClass:initialize 4. [tads 2]
100%|████████████████████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 19862.53it/s]
INFO:pygenometracks.tracksClass:initialize 5. [spacer]
INFO:pygenometracks.tracksClass:initialize 6. [tad state]
100%|████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [00:00<00:00, 20317.82it/s]
INFO:pygenometracks.tracksClass:initialize 7. [spacer]
INFO:pygenometracks.tracksClass:initialize 8. [tad state]
100%|████████████████████████████████████████████████████████████████████████████████████████████| 46/46 [00:00<00:00, 21459.01it/s]
INFO:pygenometracks.tracksClass:initialize 9. [spacer]
INFO:pygenometracks.tracksClass:initialize 10. [test bedgraph]
100%|████████████████████████████████████████████████████████████████████████████████████████| 1316/1316 [00:00<00:00, 29569.47it/s]
INFO:pygenometracks.tracksClass:initialize 11. [test arcs]
100%|██████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 12710.01it/s]
INFO:pygenometracks.tracksClass:initialize 12. [test bigwig]
INFO:pygenometracks.tracksClass:initialize 13. [spacer]
INFO:pygenometracks.tracksClass:initialize 14. [test bigwig overlay]
INFO:pygenometracks.tracksClass:initialize 15. [test bigwig overlay]
INFO:pygenometracks.tracksClass:initialize 16. [spacer]
INFO:pygenometracks.tracksClass:initialize 17. [tads 3]
100%|████████████████████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 13468.46it/s]
INFO:pygenometracks.tracksClass:initialize 18. [test arcs overlay]
100%|██████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 10663.48it/s]
INFO:pygenometracks.tracksClass:initialize 19. [test arcs]
100%|██████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 11848.32it/s]
INFO:pygenometracks.tracksClass:initialize 20. [spacer]
INFO:pygenometracks.tracksClass:initialize 21. [genes 2]
100%|████████████████████████████████████████████████████████████████████████████████████████████| 45/45 [00:00<00:00, 17922.67it/s]
INFO:pygenometracks.tracksClass:initialize 22. [spacer]
INFO:pygenometracks.tracksClass:initialize 23. [test gene rows]
100%|████████████████████████████████████████████████████████████████████████████████████████████| 45/45 [00:00<00:00, 19697.73it/s]
INFO:pygenometracks.tracksClass:initialize 24. [spacer]
INFO:pygenometracks.tracksClass:initialize 25. [test bed6]
100%|████████████████████████████████████████████████████████████████████████████████████████████| 45/45 [00:00<00:00, 23440.60it/s]
INFO:pygenometracks.tracksClass:initialize 26. [test bed6]
100%|██████████████████████████████████████████████████████████████████████████████████████████| 334/334 [00:00<00:00, 24343.11it/s]
INFO:pygenometracks.tracksClass:initialize 27. [x-axis]
INFO:pygenometracks.tracksClass:time initializing track(s):
INFO:pygenometracks.tracksClass:0.2557947635650635
DEBUG:pygenometracks.tracksClass:Figure size in cm is 38.0 x 64.76063829787235. Dpi is set to 130

INFO:pygenometracks.tracksClass:plotting 1. [x-axis]
INFO:pygenometracks.tracksClass:plotting 2. [spacer]
INFO:pygenometracks.tracksClass:plotting 3. [tads]
INFO:pygenometracks.tracksClass:plotting 4. [tads 2]
INFO:pygenometracks.tracksClass:plotting 5. [spacer]
INFO:pygenometracks.tracksClass:plotting 6. [tad state]
DEBUG:pygenometracks.tracks.GenomeTrack:ylim 2.08,-0.08
INFO:pygenometracks.tracksClass:plotting 7. [spacer]
INFO:pygenometracks.tracksClass:plotting 8. [tad state]
DEBUG:pygenometracks.tracks.GenomeTrack:ylim 1.08,-0.08
INFO:pygenometracks.tracksClass:plotting 9. [spacer]
INFO:pygenometracks.tracksClass:plotting 10. [test bedgraph]
INFO:pygenometracks.tracksClass:plotting 11. [test arcs]
DEBUG:pygenometracks.tracks.GenomeTrack:3 were links plotted
INFO:pygenometracks.tracksClass:plotting 12. [test bigwig]
INFO:pygenometracks.tracksClass:plotting 13. [spacer]
INFO:pygenometracks.tracksClass:plotting 14. [test bigwig overlay]
INFO:pygenometracks.tracksClass:plotting 15. [test bigwig overlay]
INFO:pygenometracks.tracksClass:plotting 16. [spacer]
INFO:pygenometracks.tracksClass:plotting 17. [tads 3]
INFO:pygenometracks.tracksClass:plotting 18. [test arcs overlay]
DEBUG:pygenometracks.tracks.GenomeTrack:3 were links plotted
INFO:pygenometracks.tracksClass:plotting 19. [test arcs]
DEBUG:pygenometracks.tracks.GenomeTrack:3 were links plotted
INFO:pygenometracks.tracksClass:plotting 20. [spacer]
INFO:pygenometracks.tracksClass:plotting 21. [genes 2]
DEBUG:pygenometracks.tracks.GenomeTrack:ylim 21.78,-0.08
INFO:pygenometracks.tracksClass:plotting 22. [spacer]
INFO:pygenometracks.tracksClass:plotting 23. [test gene rows]
DEBUG:pygenometracks.tracks.GenomeTrack:ylim 7.9799999999999995,-0.08
INFO:pygenometracks.tracksClass:plotting 24. [spacer]
INFO:pygenometracks.tracksClass:plotting 25. [test bed6]
DEBUG:pygenometracks.tracks.GenomeTrack:ylim 24.08,-0.08
INFO:pygenometracks.tracksClass:plotting 26. [test bed6]
DEBUG:pygenometracks.tracks.GenomeTrack:max number of rows set to {'chrX': 16}
DEBUG:pygenometracks.tracks.GenomeTrack:ylim 37.879999999999995,-0.08
INFO:pygenometracks.tracksClass:plotting 27. [x-axis]
Drosophilid commented 3 years ago

Version: pgt 3.1

Input format:

[x-axis] where = top

[hic matrix] file = Tm.hic_corrected.h5 title = Hi-C data

depth = 700000 colormap = RdYlBu_r show_masked_bins = false file_type = hic_matrix

''' [tad state] file = Tm_15_segments.color.sort.bed

height = 0.5

width = 0.3 labels = false display = collapsed color = bed_rgb border_color = none ''' command: pgt --tracks Tm_2.track.ini --region X:10000000-11000000 -o image.png

''' title not set for 'section 3. [tad state]' INFO:hicmatrix.HiCMatrix:Number of poor regions to remove: 40 {'2': 2, '3': 1, '4': 1, 'Dot': 2, 'X': 3, 'Y_1': 19, 'Y_2': 9, 'Y_3': 3} INFO:hicmatrix.HiCMatrix:found existing 40 nan bins that will be included for masking INFO:pygenometracks.tracksClass:time initializing track(s): INFO:pygenometracks.tracksClass:31.980139017105103 DEBUG:pygenometracks.tracksClass:Figure size in cm is 40 x 16.4198. Dpi is set to 72

INFO:pygenometracks.tracksClass:plotting 1. [x-axis] INFO:pygenometracks.tracksClass:plotting 2. [hic matrix] INFO:pygenometracks.tracks.GenomeTrack:setting min, max values for track 2. [hic matrix] to: 0.0, 73.40842514756925

INFO:pygenometracks.tracksClass:plotting 3. [tad state] DEBUG:pygenometracks.tracks.GenomeTrack:ylim 100,0 '''

lldelisle commented 3 years ago

3.1... This explains, we are now 3.6... I guess border color = none should work.

Drosophilid commented 3 years ago

I'll try after updating my software, hope it works. Thanks

Drosophilid commented 3 years ago

Thank you so much, it worked perfectly with pgt-3.6. Thanks

lldelisle commented 3 years ago

You are welcome.