Coder Social home page Coder Social logo

hicplotter's People

Contributors

akdemirlab avatar dyndna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hicplotter's Issues

Missing module

Hi, I ran the command as:
python2.7 HiCPlotter.py -f /Users/xiaoyongfu/Documents/bioinformatics/HiC_data/Jin_TCC_MCF7/SRR6493702/raw/500000/SRR6493702_500000.matrix -chr chr14 -o Jin_P_TamR -r 500000 -tri 1 -bed /Users/xiaoyongfu/Documents/bioinformatics/HiC_data/Jin_TCC_MCF7/SRR6493702/raw/500000/SRR6493702_500000_abs.bed -n MCF7 -s 650 -e 700
I got the following error:
Traceback (most recent call last):
File "HiCPlotter.py", line 14, in
from mpl_toolkits.axes_grid1 import make_axes_locatable
ImportError: No module named mpl_toolkits.axes_grid1
I have numpy, scipy, and matplotlib installed under python2.7. Am I missing anything?
Thanks for help!
Xiaoyong

How to draw normalized HiC map with blue_red color?

Hi,

Recently, I tried to use HiCPlotter to draw normalized HiC matrix. Because my normalized matrix includes negative value (such as -4.606-08), so I was wondering how to draw this matrix as a HiC map with blue-red color?

Thanks!
Best,
Garen

Visualization question

Dear Sir,

Has any parameter change the range of heatmap color ? Because the output format is always from 0 to 10, but my matrix is relative sparse, so I want to change the color range form 0 to 4?

Could you give me some advise?
Thank you!

some error when Plot the genome-wide map at 40000kb resolution

Professor,
I met some error when I plot the genome-wide map at 40000kb resolution.Could you help me?
[@n-1-29 HiCPlotter-0.6.6]$ python HiCPlotter.py -f /data3/users/HiC/Mus_musculus/GSM862720_results/hic_results/matrix/GSM862720/iced/40000/GSM862720_40000_iced.matrix -o GSM862720 -r 40000 -tri 1 -bed /data3/users/HiC/Mus_musculus/GSM862720_results/hic_results/matrix/GSM862720/raw/40000/GSM862720_40000_abs.bed -n hES -wg 1 -chr chrX
Plotting now!!
Traceback (most recent call last):
File "HiCPlotter.py", line 1715, in
HiCplotter(**args)
File "HiCPlotter.py", line 1556, in HiCplotter
plt.savefig(output+'-WholeGenome-'+str(resolution/1000)+'K'+extension,dpi=200)
File "/data/users//miniconda3/lib/python2.7/site-packages/matplotlib/pyplot.py", line 697, in savefig
res = fig.savefig(*args, **kwargs)
File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/figure.py", line 1573, in savefig
self.canvas.print_figure(*args, **kwargs)
File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 2252, in print_figure
**kwargs)
File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 545, in print_png
FigureCanvasAgg.draw(self)
File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 464, in draw
self.figure.draw(self.renderer)
File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/artist.py", line 63, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/figure.py", line 1144, in draw
renderer, self, dsu, self.suppressComposite)
File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/image.py", line 139, in _draw_list_compositing_images
a.draw(renderer)
File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/artist.py", line 63, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/axes/_base.py", line 2426, in draw
mimage._draw_list_compositing_images(renderer, self, dsu)
File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/image.py", line 139, in _draw_list_compositing_images
a.draw(renderer)
File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/artist.py", line 63, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/image.py", line 543, in draw
renderer, renderer.get_image_magnification())
File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/image.py", line 770, in make_image
unsampled=unsampled)
File "/data/users/miniconda3/lib/python2.7/site-packages/matplotlib/image.py", line 373, in _make_image
rgba = np.empty((A.shape[0], A.shape[1], 4), dtype=A.dtype)
MemoryError

Change matrix color

Hi,

I was wondering whether it is possible to plot the contact matrix with only red and white color like 3D genome browser. Thanks!

Best,
Kun

Normalization by number of reads

Hello, my name is Aura Stephenson and I am a student from the UNAM in Mexico from Mayra Furlan's lab. Our lab is working with HiC technique and we are using HiCPlotter to visualize the interaction matrices. We analyzed the HiC data with HiCPro but we have a question about the normalization of the data using HiCPlotter. We want to compare the HiC maps between samples and I saw that it can be done with the tools of HiCPlotter. My question is if the iced normalization that is made by the HiCPro is sufficient for comparing the matrices or if we have to normalize with the number of reads for a real comparison.

Thank you very much.
Aura Stephenson

Lab. 202 sur Instituto de Fisiología Celular, UNAM

Installation issues on Ubuntu/Debian (solved)

Ubuntu/Debian users: Scipy.signal, Numpy and Matplotlib modules should be installed. Default packaged modules via apt-get install may need to be updated, preferably using pip install <module> --upgrade to the current version.

  • uname -a

Tested OK on Linux 3.13.0-45-generic #74~precise1-Ubuntu SMP

  • Install base via apt-get: sudo apt-get install python-pip python-dev build-essential python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose
  • If error related to scipy, e.g., ImportError: cannot import name argrelextrema, please upgrade scipy using sudo pip install scipy --upgrade or to version 0.16.0.dev-e81956b by sudo pip install git+http://github.com/scipy/scipy/
  • If error related to numpy, upgrade numpy to version 1.6.2 or higher by sudo pip install numpy or sudo pip install numpy --upgrade
  • If error related to matplotlib, upgrade matplotlib to v 1.4.3 or higher by sudo pip install matplotlib --upgrade

Expected errors if modules are not up-to-date:

Traceback (most recent call last):
  File "HiCPlotter.py", line 20, in <module>
    from scipy.signal import argrelextrema
ImportError: cannot import name argrelextrema
test run finished successfully
/usr/local/lib/python2.7/dist-packages/scipy/__init__.py:111: UserWarning: Numpy 1.6.2 or above is recommended for this version of scipy (detected version 1.6.1)
  UserWarning)

rao et al 2014 reproducing results

Dear Dr. kadir,
I am trying to plot the interaction matrices from Rao et al. 2014. the one you mentioned in your readme.
I am more interested in the interaction matrices which I downloaded from GSE63525. I downloaded the HMEC cell line.
whenever I try to convert the interaction matrices to a pivot matrix, it doesn't give me the anticipated results. I am not expert as you in programming so, please would you help me plot this file.

error while running command from testRun.sh

Hello,

I'm having some issues running the arc plotting command. I've tried it with my own files, then tried it with the files in the HiCPlotter/data folder and I get the same error in both cases.

Here's the command from testRun.sh that fails:

python HiCPlotter.py -f data/HiC/Mouse/mES.chr3 -n mES -chr chr3 -o Bhlhe22 -r 40000 -s 400 -e 475 -a data/HiC/Mouse/mESC_SMC_ChIPPet.bed -al SMC -hist data/HiC/Mouse/GSM747534_chr3.bedGraph,data/HiC/Mouse/wgEncodeLicrHistoneEsb4H3k27me3ME0C57bl6StdSig.chr3.bedGraph -hl CTCF,H3K27me3 -pi 0 -ptr 0 -t data/HiC/Mouse/mm9_Polycomb_domains.bed -tl Polycomb -tc 00CCFF -ac B4B4B4 -fh 0

This is the error I'm getting:
File "HiCPlotter.py", line 2045, in
HiCplotter(**args)
File "HiCPlotter.py", line 1203, in HiCplotter
pts = get_ellipse_coords(a=rad, b=1.0, x=center, k=1./8)
File "HiCPlotter.py", line 413, in get_ellipse_coords
pts = np.zeros((360*k+1, 2))
TypeError: 'float' object cannot be interpreted as an index

Can you please look into it?

Thanks,

Alina

Keep getting this strange error.

Hi,
I am trying to plot data generated using Dr. Servant's pipeline. I am using the following command line:

python ~/GitHub/HiCPlotter/HiCPlotter.py -f iced/40000/S1_003_40000_iced.matrix -n S1_003 -tri 1 -bed raw/40000/S1_003_40000_ord.bed -r 40000 -chr chr12 -s 50000 -e 51000 -hmc 5 -ptd 1 -pi 1 -o ../../analysis-nov142016/S1_003-plot

I keep getting the following strange error, is am I doing anything wrong?

Traceback (most recent call last): File "/Users/sameet/GitHub/HiCPlotter/HiCPlotter.py", line 1741, in <module> HiCplotter(**args) File "/Users/sameet/GitHub/HiCPlotter/HiCPlotter.py", line 1136, in HiCplotter ax4.plot(np.arange(start,end),nums,'black') File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/axes.py", line 4137, in plot for line in self._get_lines(*args, **kwargs): File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/axes.py", line 317, in _grab_next_args for seg in self._plot_args(remaining, kwargs): File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/axes.py", line 295, in _plot_args x, y = self._xy_from_xy(x, y) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/axes.py", line 237, in _xy_from_xy raise ValueError("x and y must have same first dimension") ValueError: x and y must have same first dimension

HiC-Pro multiple plots

Hello,

I'm trying to use HiCPlotter to plot two HiC-Pro output matrices but I am having trouble. I tried something like this, ignoring extraneous flags:

python HiCPlotter.py -f matrix1 matrix2 -tri 1 -bed bed1 bed2

The output says it doesn't recognize the bed2 file. Then if I try just using bed1 without bed2, since really in my case both are the same, the output says "upps!! please provide equal number of hic matrix and bedgraphs."

Everything works flawlessly when plotted individually, but I really like the joint side by side visualization and would love if I could get that working.

Thank you.

How to view .hic files

What is the best way to view a .hic file which is already storing all the contact matrices? Basically, I have two . files and I want to compare them using the HiC Plotter compare function. It seems that a matrix file is needed for HiC plotter, but I was wondering if there was a way to get a full matrix file from the .hic file
Thanks

mpl_toolkits.axes_grid1 Module Issue

Hi, I am trying to run the command:
python HiCPlotter.py -f data/HiC/Human/HUVEC-chr10_25kb.RAWobserved_KRnormalizedMatrix.txt data/HiC/Human/IMR90-chr10_25kb.RAWobserved_KRnormalizedMatrix.txt -chr chr10 -n HUVEC IMR90 -o comparison -s 4850 -e 5400 -mm 8 -r 25000 -c 1 -t data/HiC/Human/HUVEC_18_core_K27ac_dense2.bed data/HiC/Human/IMR90_18_core_K27ac_dense2.bed -tl States States -spi 1 -hist data/HiC/Human/wgEncodeUwRepliSeqHuvecWaveSignalRep1.bedGraph data/HiC/Human/wgEncodeUwRepliSeqImr90WaveSignalRep1.bedGraph -hl RepliSeq RepliSeq -fhist 1 1
from the manual.

However, I get the error:
Traceback (most recent call last):
File "HiCPlotter.py", line 14, in
from mpl_toolkits.axes_grid1 import make_axes_locatable
ImportError: No module named mpl_toolkits.axes_grid1

I have already:
sudo pip install scipy --upgrade
sudo pip install numpy --upgrade
sudo pip install matplotlib --upgrade

Im using Python 2.7.15

python core dumped when the matrix file is big

Hi! I really like the HiCPlotter scripts! However, when I plotted the whole genome Hi-C interaction heat map with 400 Mb iced matrix file, it seems that HiCPlotter couldn't work very well. The broken message is:
line 35: 71609 Segmentation fault (core dumped)
Could you please fix it for me? Thank you very much in advance!

line 57, SyntaxError emerged while doing the testRun.

When do the testrun (the first line of code as well other cods in Usage subsection), SyntaxError occured. For example,
python HiCPlotter.py -f data/HiC/Mouse/mES.chr2 -n hES -chr chr21 -r 40000 -o default1 -fh 0
File "HiCPlotter.py", line 57
print len(matrix[:,1]),len(matrix[1,:])
^
SyntaxError: invalid syntax

the python --version returns
Python 3.6.8 :: Anaconda, Inc.

error with HI-C pro. invalid literal for int() with base 10

Hi,

thanks a lot for providing such great tools.

When I try to analyze my HI-C data produced from HI-C Pro, I meet a problem.

I want to use iced matrix to analyze my HI-C data, the code is:
python /mnt/d/bioinformatic/package/hicplotter/HiCPlotter.py -f hic_results/matrix/WT/iced/10000/WT_10000_iced.matrix -o exemple -r 10000 -tri 1 -bed hic_results/matrix/WT/raw/10000/WT_10000_abs.bed -n test -chr chr1 -ptr 1
but I meet this error:

ValueError: invalid literal for int() with base 10: '1.000000000000000000e+00 2.000000000000000000e+00 3.000000000000000000e+00 4.000000000000000000e+00 5.000000000000000000e+00 6.000000000000000000e+00 7.000000000000000000e+00 8.000000000000000000e+00

But When I used the raw matrix, everything goes well. The code is:
python /mnt/d/bioinformatic/package/hicplotter/HiCPlotter.py -f hic_results/matrix/WT/raw/10000/WT_10000.matrix -o exemple -r 10000 -tri 1 -bed hic_results/matrix/WT/raw/10000/WT_10000_abs.bed -n test -chr chr1 -ptr 1
Could you please tell me why I can not use the iced matrix?

Hi-C Pro mode problem

Hi,
Thank you very much for this plotting tool! When I was using Hi-CPro format file to plot, it could not generate the TAD plot and triangular plot.
Thanks

TypeError: 'float' object cannot be interpreted as an index

Hi!!

How are you?

I was wondering if you can help me with the following error message:
TypeError: 'float' object cannot be interpreted as an index

I only get it when I use -a option to plot archs. I did not use to get it before, my .bed file may not be correct. Any suggestions?

Thanks!
Ale

pairwise log2 comparisons

Hi Kadir,

I'm trying to use the pairwise comparisons function "-p 1 -c 1" but the plots I get don't have any negative values. Weirdly when I plot log2(A/B) it is not the inverse of the log2(B/A) plot.

astro vs neu-chr1 ofbins 1-200 500k
The top left log2 plot and the one immediately to its right are inverses but don't appear that way. Any ideas what's going on?

-will

Trouble loading matrix

Hi I have Hi-C data I have downloaded from GEO. The files are called GEOxxx-IC-heatmaps.txt. They are tab delimited. The first row/column contains the chromosome and the "bin" that is to be correlated. 2L:0K 2L:20K 2L:40K 2L:60K 2L:80K ect.

When I try to plot using the command : python HiCPlotter.py -wg 1 -f GSE69013_BG3_merged_IC-heatmap-20K.txt -n bg3 -chr chrY -o bg3

I get the message:
Traceback (most recent call last):
File "HiCPlotter.py", line 1485, in
HiCplotter(**args)
File "HiCPlotter.py", line 520, in HiCplotter
matrix,nums,tricks=read_HiCdata(files[exp],fileHeader,fileFooter,cleanNANs,smoothNoise,window,tadRange,plotInsulation,plotTadDomains,randomBins)
File "HiCPlotter.py", line 53, in read_HiCdata
matrix = np.genfromtxt(filename,skip_header=header,filling_values='0',skip_footer=footer)
File "/usr/local/lib/python2.7/dist-packages/numpy/lib/npyio.py", line 1769, in genfromtxt
raise ValueError(errmsg)
ValueError: Some errors were detected !
Line #2 (got 6024 columns instead of 6023)
Line #3 (got 6024 columns instead of 6023)
Line #4 (got 6024 columns instead of 6023)
Line #5 (got 6024 columns instead of 6023)
......
.....
.....
Line #6024 (got 6024 columns ins
tead of 6023)

I tried to fix this using the -fh 1 option. This seems to work (computes for a minute) then gives me this message: 6023 6024
unbalanced matrix(GSE69013_BG3_merged_IC-heatmap-20K.txt)! input should be a square matrix

Any guidance or advise would be vastly appreciated. -Keller

chromosome pair HiC

Dear colleagues,
I have finished the HicPro pipeline, and I want to plot the interaction map of different two (or more) chromosomes, e.g. chr1 and chr6. How should I set the parameters since I found the examples are for a single chromosome or whole genome.
Another way is I can extract the matrix files of two chromosomes I want to look at, and then plot in whole-genome style. Is there any better way?

Best

bedToMatrix.py does not work as it is desgined

Hello,
If I understand correctly, bedToMatrix.py should transform contact list into contact matrix. By saying contact matrix, it should be a symmetric matrix, isn't it? However, bedToMatrix.py will only save contact count to the row of the bin with smaller coordinates. For example:
chr1 2000_4000 16000_18000 5
contact count 5 will only be saved at row 2 column 9, instead of both row 2 column 9 and row 9 column2. Is it something that is specifically designed for HiCPlotter?

Thanks,
Ye

Update manual with -up parameter

I read the code of the HiCPlotter and gladly find that the recent update adds the --upSide parameter to match the current publication style; it has not been updated to the manual page.

HiC-Pro adaption | sparse triplet format

Hej,
I was glad to read you adapted the format of the HiC-Pro pipeline. Nevertheless I can't get things done if I try to pass the sparse triplet file. Can you have a look if I miss a thing/ do it wrong?
I tried:
python HiCPlotter.py -f /my/path/rawdata_1000000_iced.matrix -n hicpro_mm9_iced_wg -chr chrY -o /my/path/contactmaps/hicpro_mm9_iced_wg
Where "rawdata_1000000_iced.matrix" is my sparse triplets file. I get the error message:

unbalanced matrix(/my/path/rawdata_1000000_iced.matrix)! input should be a square matrix

but this is exactly what I like to avoid, converting it to a square matrix before.
Any suggestions?
Thanks,
TK

bedGraph format

I'm trying to add bedgraph histogram plots to my HiC matrix plots. I'm trying to use the example data you included in the data directory:
data/HiC/Human/wgEncodeBroadHistoneK562CtcfStdSig.chr15.bedGraph.gz

I'm testing on 1Mb matrix data but i'm getting this error:
BedGraph(wgEncodeBroadHistoneGm12878CtcfStdSig.chr15.bedGraph.gz) has some missing values

do i need to do any formatting on this? I assumed it would downscale the resolution to fit my window size.

How to set the same coordinate system for two ChIP data?

Dear professor,
I draw two ChIP data under the Hi-C heatmap use HiCPlotter, but there is two different in Y axis. One is labled 0,2,4,the other is 0,8,16. In other word, there is different coordinate scales in Y axis.I want to make the same coordinate scales in Y axis for comparing two different ChIP data.
Could you help me ? Thank you!

Limitations with triple sparse format?

Dear Professor,
first of all thank you for the very useful tool you created. I have few questions about the triple sparse format. When I try to visualize two different matrices at the same time (not raw and iced, but different samples), I fail because I am not allowed to list more than one .bed file. So I was wondering if there is any way I could do that. And related to this, would it be possible to compare two matrices in triple sparse format that don't share the .bed file? Lastly, when I add to the command line the file with gene names (hg19.RefSeq.sorted.bed), I get in response that "Gene File (hg19.RefSeq.sorted.bed) has some missing values". Is it because there is already the matrix's .bed file? My command line looks like this:
python ~/HiCPlotter/HiCPlotter.py -f XXXXX.matrix -bed XXXXX.bed -chr 17 -n Name -o OutputFile -tri 1 -da 1 -ptr 1 -g hg19.RefSeq.sorted.bed -gl 1 -s X -e Y -r 40000
Thank you very much for any help.
Kind regards,
Davide

HiCPlotter 0.8.1 cuts "chr" from sequence titles

HiCPlotter 0.8.1 cuts "chr" from sequence titles. For example, when I run
"python HiCPlotter.py --tripleColumn 1 --resolution 1000 --files ./Sample_1000.matrix --bedFile ./Sample_1000_abs.bed --chromosome "Small_chromosome" --name "Small_chromosome" --output results --dPixels 300"
on the attached files, HiCPlotter will print "Small_omosome" on the picture, not "Small_chromosome". I attach the image too.

archive.zip

-ptr

Dear Kadir,

Thank you for developing HiCPlotter, it's an incredible tool!

I wanted to ask you if it is possible to change the scale of the rotated half matrix. The triangles are cut in half in my case.

Thank you very much!!

Best,
Ale

PS: -ptr default is 0 in the new version, not 1 :)

colorbar

Hi,
Thanks for your software that I can make heatmap very fast.
I hava a question about the colobar,when I draw the whole genome's heatmap,there's no colorbar under the heatmap,how can i draw a colorbar under the whole genome's heatmap?
Best wishes
Ruiqin Zheng

error of plot log2 matrix with peaks

Hi,
Recently, I tried to use HiCPlotter to plot the log2 matrix with loading peaks file, command is as followed:

python HiCPlotter.py -f g1_iced.matrix g2_iced.matrix -n g1 g2 -r 20000 -o compare -chr chr17 -c 1 -peaks loops.bed -ptr 0 -tri 1 -bed ref_20kb.bed

It reports that : Upps!! Please provide equal number of HiC matrix and peak files.

Then, I tried: "-peaks loops.bed loops.bed", but it made an error that: line2123, line 710 and line 245.
hex ='#%02x%02x%02x' %(int(tags[6].split(',)[0]), int(tags[6].split('.')[1]),int(tags[6].split(',')[2]))
ValueError: invalid literal for int() with base 10: '"0'

Could you give me some help?
Thank you!
Best,
Garen

plot multiple bed files as bar plots below the matrix

I am trying to plot H3K27ac peaks, H3K4me3 peaks and TAD regions below the matrix
python HiCPlotter.py -f $file -chr chr22 -o Example -r 10000 -n Neuron_PFC -s 1800 -e 4000 -o Example -ptd 1 -pcd 3 -pcdf $TAD,$H3K4me3_peaks,$H3K27ac_peaks -pdb 1 -ptr 1

I am getting this error

Traceback (most recent call last):
File "HiCPlotter.py", line 2171, in
HiCplotter(**args)
File "HiCPlotter.py", line 663, in HiCplotter
matrix,nums,tricks=read_HiCdata(files[exp],fileHeader,fileFooter,cleanNANs,smoothNoise,window,tadRange,plotInsulation,plotTadDomains,randomBins)
File "HiCPlotter.py", line 61, in read_HiCdata
if plotInsulation or plotTadDomains and not randomBins: nums,tricks=insulation(matrix,ins_window,rel_window)
File "HiCPlotter.py", line 503, in insulation
if current[0] not in pBorders and current[0]+1 not in regions: pBorders.append(current[0])
IndexError: index 0 is out of bounds for axis 0 with size 0

Can not plot exon ?

@kcakdemir
Thanks for the so powerful tools! Recently I used the tools to plot the gene and exon by -g parameter. But no exon information was displayed on the output Pic.
This is my command line :
image
image
Thanks very much if you can give me some advice!

Plotting to PDF/SVG

Hi,

thanks a lot for developing HICPlotter. I was wondering if it is possible to write output files directly to a pdf/svg device. From the code

if 'JPEG' in plt.gcf().canvas.get_supported_filetypes_grouped().keys() or 'Joint Photographic Experts Group' in plt.gcf().canvas.get_supported_filetypes_grouped().keys(): extension='.jpeg' else : extension = '.png'

it seems that only jpeg and png are supported. How could I go about generating a vectorized image?
Thank you in advance.

Best wishes,
FC

numpy error

Hi,

When I tried to use HiCPlotter, it reported an error that:

RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa
Traceback (most recent call last):
File "/share/home/Garen/softwares/HiCPlotter-master/HiCPlotter.py", line 17, in
from mpl_toolkits.axes_grid1 import make_axes_locatable
File "/share/home/Garen/anaconda2/lib/python2.7/site-packages/mpl_toolkits/axes_grid1/init.py", line 6, in
from . import axes_size as Size
File "/share/home/Garen/anaconda2/lib/python2.7/site-packages/mpl_toolkits/axes_grid1/axes_size.py", line 19, in
from matplotlib.axes import Axes
File "/share/home/Garen/anaconda2/lib/python2.7/site-packages/matplotlib/axes/init.py", line 4, in
from ._subplots import *
File "/share/home/Garen/anaconda2/lib/python2.7/site-packages/matplotlib/axes/_subplots.py", line 7, in
from matplotlib.gridspec import GridSpec, SubplotSpec
File "/share/home/Garen/anaconda2/lib/python2.7/site-packages/matplotlib/gridspec.py", line 26, in
import matplotlib.transforms as mtransforms
File "/share/home/Garen/anaconda2/lib/python2.7/site-packages/matplotlib/transforms.py", line 39, in
from matplotlib._path import (affine_transform, count_bboxes_overlapping_bbox,
ImportError: numpy.core.multiarray failed to import

Then I updated my numpy version, but it did not work. Could you give me a hand?

Thank you!

TAD boundary files

Hi,

Can HiCPlotter give the TAD boundary or TAD domain coordinates into an additional file? Many thanks.

some question when comparing two matrix

Hi, Professor,
When I try to compare two matrix and get the differential heatmap, I get stuck in the -c parameter.
python ~data/scripts/hic/HiCPlotter.py -f PA_40000_iced.matrix late_40000_iced.matrix -n PA late -chr chr6 -r 40000 -o comparison -s 1225 -e 1375 -c 1 -spi 1 -hmc 1

usage: HiCPlotter.py -f file1 file2 ... -n name1 name2 ... -chr chr12 -o hES
HiCPlotter.py: error: ambiguous option: -c could match -chr, -cn

How can I solve this problem, any suggestion is welcomed.

The input format of

Dear professor,

I have generated the iced matrix file using HiC-pro with Triplet sparse format (100kb), while I tried to convert it into the format like hES-nij.chr21.2 and run the command below:
python HiCPlotter.py -f matrix -n mES -chr chr2 -r 100000 -o default2 -ptd 1 -pptd 1 -s 600 -e 900 -fh 0 -w 8 -tr 10 -pi 1

but it shows error as below:
Traceback (most recent call last):
File "HiCPlotter.py", line 1398, in
HiCplotter(**args)
File "HiCPlotter.py", line 550, in HiCplotter
cmatrix = log2(pow(2, ceil(log2(max(matrix))/log2(2))))
File "/data4/software/python/2.7.12/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 2297, in amax
out=out, **kwargs)
File "/data4/software/python/2.7.12/lib/python2.7/site-packages/numpy/core/_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity

I am not sure how can I generate the right format of hES-nij.chr21.2 from Triplet sparse format ?

Best,
Yu

Adding gene file to HiCPlotter "missing values" issue

I input a triple sparse matrix as my hic file data. However that triple sparse matrix file represents a specific part in the genome. I then try to use -g flag to add my bed file with gene locations and I get the error:

Gene File (mm9-7-12-2016.bed) has some missing values

The bed file has locations of genes throughout the whole genome. However, my sparse matrix file has hic data only for a specific area in the the genome at a certain resolution. I extract my sparse file data using the straw program provided here: https://github.com/aidenlab/straw/wiki/CPP

I also use the -s and -e flags to match the same start and end positions.

Is the discrepancy in locations between the bed file and the sparse file the reason I am getting the error, and is there any way around it?

Thanks

Shifted plots?

Hi!

Thank you for this great tool!

I am plotting 4kb matrices and I noticed that the pixels of the plot do not mach my 4kb bins.. I think the plot may be shifted by half a bin?

I have attached a picture of the matrix and in light blue there are two example bins.

What do you think?

Thanks!
Ale

screen shot 2017-04-04 at 2 10 28 pm 2

Rotated heatmap plotting

Hi,

Just a suggestion to use this code instead of ndimage.rotate + imshow to create rotated heatmaps: http://stackoverflow.com/a/13477815/1304161
By also setting the axes aspect to 0.5 you can get a perfect rotated heatmap with no distortions and no requirement for interpolation (and that's what ndimage.rotate has to do to rotate by 45 degree).
Hope this is helpful.

why not the figure just like this

image

the comand like this " bsub -J blast -n 1 -R span[hosts=1] -o %J.out -e %J.err -q smp "~/software/anaconda3/envs/hicpro/bin/python ~/software/HiCPlotter-master/HiCPlotter.py -f hap1-hicpro/hic_results/matrix/sample1/iced/20000/sample1_20000_iced.matrix -o tryout1 -r 800 -tri 1 -bed hap1-hicpro/hic_results/matrix/sample1/raw/20000/sample1_20000_abs.bed -n hap1 -wg 1 -chr HiC_scaffold_10 -ext pdf""

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.