python/cell_cycle_gating/cellcycle_phases.py
def plot_edu_dna_scatter(dna, edu, offset_edu,
                         dna_gates, edu_gates,
                         dna_lims, edu_lims,
                         x_dna=None, px_edu=None,
                         ax=None):
    """Plots EdU and DNA scatter plot, plots gates pre-computed on
        EdU and DNA content
    
    Parameters
    ----------
    dna : 1D array
        DNA content across cells in a given well
    edu : 1D array
        EdU intensity across cells in a given well
    offset_edu : float

    dna_gates : list of float
        inner and outer gates obtained `get_dna_gates` function
    dna_lims : list of float
        x-axis limits of plot obtained from `get_dna_gates` function
    edu_gates : list of float
        gates obtained from `get_edu_gates` function
    edu_lims : list of float
        y-axis limits of plot obtained from `get_edu_gates` function
    x_dna : 1D array
        x-axis grid for DNA based on expected range of DNA content
    px_edu : 1D array
        y-xis grid for EdU based on expected range of EdU intensity
    ax : subplot object
        subplot to provide positional reference in plot output
    
    Returns
    -------

    """
    if x_dna is None:
        x_dna = np.arange(2.5, 8, 0.02)
    if px_edu is None:
        px_edu = np.arange(-0.2, 5.3, .02)
    log_dna = compute_log_dna(dna, x_dna)
    log_edu = compute_log_edu(edu, px_edu, offset_edu)
    xy = np.vstack([log_dna, log_edu])
    z = gaussian_kde(xy)(xy)
    if ax is not None:
        ax.scatter(log_dna, log_edu, c=z, s=2, rasterized=True)
        ax.plot([dna_gates[i] for i in [0, 0, 3, 3, 0, 0, 1, 1, 0, 2, 2, 3]],
                [-1, edu_gates[1], edu_gates[1], -1,
                 np.nan, edu_gates[0], edu_gates[0],
                 -1, np.nan, -1, edu_gates[0], edu_gates[0]],
                '--', color='red')
        ax.set_xlabel('log10 (DNA content)')
        ax.set_ylabel('log10 (EdU)')
        ax.set_xlim(dna_lims)
        ax.set_ylim(edu_lims)
Plots EdU and DNA scatter plot, plots gates pre-computed on
        EdU and DNA content
    
    Parameters
    ----------
    dna : 1D array
        DNA content across cells in a given well
    edu : 1D array
        EdU intensity across cells in a given well
    offset_edu : float

    dna_gates : list of float
        inner and outer gates obtained `get_dna_gates` function
    dna_lims : list of float
        x-axis limits of plot obtained from `get_dna_gates` function
    edu_gates : list of float
        gates obtained from `get_edu_gates` function
    edu_lims : list of float
        y-axis limits of plot obtained from `get_edu_gates` function
    x_dna : 1D array
        x-axis grid for DNA based on expected range of DNA content
    px_edu : 1D array
        y-xis grid for EdU based on expected range of EdU intensity
    ax : subplot object
        subplot to provide positional reference in plot output
    
    Returns
    -------

    
Plots EdU and DNA scatter plot, plots gates pre-computed on
EdU and DNA content

Parameters

dna : 1D array
DNA content across cells in a given well
edu : 1D array
EdU intensity across cells in a given well
offset_edu : float



Returns
Plots EdU and DNA scatter plot plots gates pre - computed on EdU and DNA content Parameters dna : 1D array DNA content across cells in a given well edu : 1D array EdU intensity across cells in a given well offset_edu : float Returns
def plot_edu_dna_scatter(dna, edu, offset_edu,
                         dna_gates, edu_gates,
                         dna_lims, edu_lims,
                         x_dna=None, px_edu=None,
                         ax=None):
    if x_dna is None:
        x_dna = np.arange(2.5, 8, 0.02)
    if px_edu is None:
        px_edu = np.arange(-0.2, 5.3, .02)
    log_dna = compute_log_dna(dna, x_dna)
    log_edu = compute_log_edu(edu, px_edu, offset_edu)
    xy = np.vstack([log_dna, log_edu])
    z = gaussian_kde(xy)(xy)
    if ax is not None:
        ax.scatter(log_dna, log_edu, c=z, s=2, rasterized=True)
        ax.plot([dna_gates[i] for i in [0, 0, 3, 3, 0, 0, 1, 1, 0, 2, 2, 3]],
                [-1, edu_gates[1], edu_gates[1], -1,
                 np.nan, edu_gates[0], edu_gates[0],
                 -1, np.nan, -1, edu_gates[0], edu_gates[0]],
                '--', color='red')
        ax.set_xlabel('log10 (DNA content)')
        ax.set_ylabel('log10 (EdU)')
        ax.set_xlim(dna_lims)
        ax.set_ylim(edu_lims)
def plot_edu_dna_scatter ( dna , edu , offset_edu , dna_gates , edu_gates , dna_lims , edu_lims , x_dna = None , px_edu = None , ax = None ) : if x_dna is None : x_dna = np . arange ( 2.5 , 8 , 0.02 ) if px_edu is None : px_edu = np . arange ( - 0.2 , 5.3 , .02 ) log_dna = compute_log_dna ( dna , x_dna ) log_edu = compute_log_edu ( edu , px_edu , offset_edu ) xy = np . vstack ( [ log_dna , log_edu ] ) z = gaussian_kde ( xy ) ( xy ) if ax is not None : ax . scatter ( log_dna , log_edu , c = z , s = 2 , rasterized = True ) ax . plot ( [ dna_gates [ i ] for i in [ 0 , 0 , 3 , 3 , 0 , 0 , 1 , 1 , 0 , 2 , 2 , 3 ] ] , [ - 1 , edu_gates [ 1 ] , edu_gates [ 1 ] , - 1 , np . nan , edu_gates [ 0 ] , edu_gates [ 0 ] , - 1 , np . nan , - 1 , edu_gates [ 0 ] , edu_gates [ 0 ] ] , '--' , color = 'red' ) ax . set_xlabel ( 'log10 (DNA content)' ) ax . set_ylabel ( 'log10 (EdU)' ) ax . set_xlim ( dna_lims ) ax . set_ylim ( edu_lims )
Plots EdU and DNA scatter plot, plots gates pre-computed on
EdU and DNA content
Plots EdU and DNA scatter plot plots gates pre - computed on EdU and DNA content
"""Plots EdU and DNA scatter plot, plots gates pre-computed on
        EdU and DNA content
    
    Parameters
    ----------
    dna : 1D array
        DNA content across cells in a given well
    edu : 1D array
        EdU intensity across cells in a given well
    offset_edu : float

    dna_gates : list of float
        inner and outer gates obtained `get_dna_gates` function
    dna_lims : list of float
        x-axis limits of plot obtained from `get_dna_gates` function
    edu_gates : list of float
        gates obtained from `get_edu_gates` function
    edu_lims : list of float
        y-axis limits of plot obtained from `get_edu_gates` function
    x_dna : 1D array
        x-axis grid for DNA based on expected range of DNA content
    px_edu : 1D array
        y-xis grid for EdU based on expected range of EdU intensity
    ax : subplot object
        subplot to provide positional reference in plot output
    
    Returns
    -------

    """
dna
edu
offset_edu
dna_gates
edu_gates
dna_lims
edu_lims
x_dna
px_edu
ax