data/nora2012/make_processed_files.py
def calculate_bead_lims(bead_size, region_revs, region_fors):
    """
    Divides a region on a chromosome (or rather, the part of it covered by complete
    restriction fragments) into segments of equal, given length and one last
    segment which is smaller than the others such that the segments completely
    cover the region. These segments will be represented by spherical beads later.
    Returns the limits of the segments
    """
    region_length =   np.max((region_fors[-1,1], region_revs[1,-1])) \
                    - np.min((region_fors[0,0], region_revs[0,0]))
    n_beads = int(round(region_length / bead_size)) + 1
    bead_lims = [np.min((region_fors[0,0], region_revs[0,0])) + i * bead_size
                 for i in range(n_beads)]
    bead_lims[-1] = np.max((region_fors[-1,1], region_revs[1,-1]))

    return np.array(bead_lims)

    Divides a region on a chromosome (or rather, the part of it covered by complete
    restriction fragments) into segments of equal, given length and one last
    segment which is smaller than the others such that the segments completely
    cover the region. These segments will be represented by spherical beads later.
    Returns the limits of the segments
    
Divides a region on a chromosome (or rather, the part of it covered by complete
restriction fragments) into segments of equal, given length and one last
segment which is smaller than the others such that the segments completely
cover the region. These segments will be represented by spherical beads later.
Returns the limits of the segments
Divides a region on a chromosome ( or rather the part of it covered by complete restriction fragments ) into segments of equal given length and one last segment which is smaller than the others such that the segments completely cover the region . These segments will be represented by spherical beads later . Returns the limits of the segments
def calculate_bead_lims(bead_size, region_revs, region_fors):
    region_length =   np.max((region_fors[-1,1], region_revs[1,-1])) \
                    - np.min((region_fors[0,0], region_revs[0,0]))
    n_beads = int(round(region_length / bead_size)) + 1
    bead_lims = [np.min((region_fors[0,0], region_revs[0,0])) + i * bead_size
                 for i in range(n_beads)]
    bead_lims[-1] = np.max((region_fors[-1,1], region_revs[1,-1]))
    return np.array(bead_lims)
def calculate_bead_lims ( bead_size , region_revs , region_fors ) : region_length = np . max ( ( region_fors [ - 1 , 1 ] , region_revs [ 1 , - 1 ] ) ) - np . min ( ( region_fors [ 0 , 0 ] , region_revs [ 0 , 0 ] ) ) n_beads = int ( round ( region_length / bead_size ) ) + 1 bead_lims = [ np . min ( ( region_fors [ 0 , 0 ] , region_revs [ 0 , 0 ] ) ) + i * bead_size for i in range ( n_beads ) ] bead_lims [ - 1 ] = np . max ( ( region_fors [ - 1 , 1 ] , region_revs [ 1 , - 1 ] ) ) return np . array ( bead_lims )
Divides a region on a chromosome (or rather, the part of it covered by complete
restriction fragments) into segments of equal, given length and one last
segment which is smaller than the others such that the segments completely
cover the region.
Divides a region on a chromosome ( or rather the part of it covered by complete restriction fragments ) into segments of equal given length and one last segment which is smaller than the others such that the segments completely cover the region .
"""
    Divides a region on a chromosome (or rather, the part of it covered by complete
    restriction fragments) into segments of equal, given length and one last
    segment which is smaller than the others such that the segments completely
    cover the region. These segments will be represented by spherical beads later.
    Returns the limits of the segments
    """
bead_size
region_revs
region_fors