Example #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)
Example #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)
Example #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)
Example #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)