Exemplo n.º 1
0
 def BinsFromBigWig(bwfile,binsize):
     ''' Read bins from BigWig file.'''
     Bins={}
     chroms=Utils.getBigWigChroms(bwfile)
     for chrom in chroms:
         Bins[chrom]=numpy.zeros(chroms[chrom]/binsize)
         for start,stop,val in IO.BigWigReader(bwfile,chrom):
             Bins[chrom][start/binsize]=val
     return Bins