示例#1
0
 def stmt1():
     a = np.array(np.random.random(100000), dtype=FLOAT_DTYPE)
     buf = cStringIO.StringIO()
     array_to_bedgraph(a, ref='chr1', start=0, fileh=buf)
示例#2
0
 def stmt1():
     a = np.array(np.random.random(100000), dtype=FLOAT_DTYPE)
     buf = cStringIO.StringIO()
     array_to_bedgraph(a, ref='chr1', start=0, fileh=buf)
示例#3
0
def write_and_read_array(a, ref='chr1', start=0):
    buf = cStringIO.StringIO()
    array_to_bedgraph(a, ref, start, buf)
    contents = buf.getvalue()
    a = bedgraph_to_array(cStringIO.StringIO(contents))
    return a.get(ref, None)
示例#4
0
def write_and_read_array(a, ref='chr1', start=0):
    buf = cStringIO.StringIO()
    array_to_bedgraph(a, ref, start, buf)
    contents = buf.getvalue()
    a = bedgraph_to_array(cStringIO.StringIO(contents))
    return a.get(ref, None)