python/cell_cycle_gating/cellcycle_phases.py
def smooth_1d(y, lm=5):
    """Reproduces Marc's smoothing function which smooths the distribution
    of a 2D histogram, for instance 2D histogram of logEdU and logDNA

    Parameters
    ----------
    y : ndarray
      2D histogram of logEdU and logDNA
    lm : int
       smoothing patameter. Default is 5

    Returns:
    --------
    z[0] : ndarray
       Should have the same shape as y
    """
    m, n = y.shape
    e = np.identity(m)
    d1 = np.diff(e, 1).T
    d2 = np.diff(d1.T, 1).T
    p = (lm ** 2) * np.matmul(d2.T, d2) + 2 * lm * np.matmul(d1.T, d1)
    z = np.linalg.lstsq((e + p), y)
    return z[0]
Reproduces Marc's smoothing function which smooths the distribution
    of a 2D histogram, for instance 2D histogram of logEdU and logDNA

    Parameters
    ----------
    y : ndarray
      2D histogram of logEdU and logDNA
    lm : int
       smoothing patameter. Default is 5

    Returns:
    --------
    z[0] : ndarray
       Should have the same shape as y
    
Reproduces Marc's smoothing function which smooths the distribution
of a 2D histogram, for instance 2D histogram of logEdU and logDNA

Parameters

y : ndarray
2D histogram of logEdU and logDNA
lm : int
smoothing patameter. Default is 5
Reproduces Marc ' s smoothing function which smooths the distribution of a 2D histogram for instance 2D histogram of logEdU and logDNA Parameters y : ndarray 2D histogram of logEdU and logDNA lm : int smoothing patameter . Default is 5
def smooth_1d(y, lm=5):
    m, n = y.shape
    e = np.identity(m)
    d1 = np.diff(e, 1).T
    d2 = np.diff(d1.T, 1).T
    p = (lm ** 2) * np.matmul(d2.T, d2) + 2 * lm * np.matmul(d1.T, d1)
    z = np.linalg.lstsq((e + p), y)
    return z[0]
def smooth_1d ( y , lm = 5 ) : m , n = y . shape e = np . identity ( m ) d1 = np . diff ( e , 1 ) . T d2 = np . diff ( d1 . T , 1 ) . T p = ( lm ** 2 ) * np . matmul ( d2 . T , d2 ) + 2 * lm * np . matmul ( d1 . T , d1 ) z = np . linalg . lstsq ( ( e + p ) , y ) return z [ 0 ]
Reproduces Marc's smoothing function which smooths the distribution
of a 2D histogram, for instance 2D histogram of logEdU and logDNA
Reproduces Marc ' s smoothing function which smooths the distribution of a 2D histogram for instance 2D histogram of logEdU and logDNA
"""Reproduces Marc's smoothing function which smooths the distribution
    of a 2D histogram, for instance 2D histogram of logEdU and logDNA

    Parameters
    ----------
    y : ndarray
      2D histogram of logEdU and logDNA
    lm : int
       smoothing patameter. Default is 5

    Returns:
    --------
    z[0] : ndarray
       Should have the same shape as y
    """
None
y
lm