Commits

Davide Cittaro  committed eaf1558

bugfix

  • Participants
  • Parent commits 653a6ce

Comments (0)

Files changed (1)

File bighilbert.py

 Sample1 = bx.bbi.bigwig_file.BigWigFile(open(sys.argv[1], 'rb'))
 Sample2 = bx.bbi.bigwig_file.BigWigFile(open(sys.argv[2], 'rb'))
 csize = getChromosomeSizesFromBigWig(sys.argv[1])
-imsize = 640
-n = imsize - 1
+n = 1 << 10
+#imsize = 640
 
 for chrom in csize.keys():
   if '_' in chrom: continue
   
   chrom_length = csize[chrom]
   sys.stderr.write("Processing Sample1\n")
-  hc = np.zeros((imsize, imsize))
+  hc = np.zeros((n, n))
   data = Sample1.get_as_array(chrom, 0, chrom_length)
   data[np.isnan(data)] = 0
   for i in xrange(0, chrom_length):
   plt.imshow(hc, origin=0, alpha=0.5, cmap=plt.cm.Blues)  
 
   sys.stderr.write("Processing Sample2\n")
-  hc = np.zeros((imsize, imsize))
+  hc = np.zeros((n, n))
   data = Sample2.get_as_array(chrom, 0, chrom_length)
   data[np.isnan(data)] = 0
   for i in xrange(0, chrom_length):