示例#1
0
def chip_10_plus_one(names):

    df = pd.read_table("tests/chip_10_plus_one.bed", header=None, names=names)

    gr = PyRanges(df)

    assert gr.stranded

    gr.df = gr.df.reindex(np.random.permutation(gr.df.index))

    return gr
示例#2
0
def dfs_min(draw):
    df = draw(better_dfs_min)
    df.loc[:, "End"] += df.Start
    df.insert(3, "Name", "a")
    df.insert(4, "Score", 0)

    gr = PyRanges(df)

    np.random.seed(draw(st.integers(min_value=0, max_value=int(1e6))))
    # this is the same as allowing users to arbitrarily sort
    # their underlying dataframes in whichever way they choose
    # an the PyRanges functionality still works! Wowaweeva
    gr.df = df.reindex(np.random.permutation(df.index.values))

    return gr