python/cell_cycle_gating/process_brdu_ph3.py
def process_metadata_file(dfmeta):
    """Merge agent and concentration columns in the case of
       combination experiments.

    Parameters
    ----------
    dfmeta : pandas dataframe
       metadata file with wells mapped to treatment condition.
    Returns
    -------
    dfm : pandas dataframe
       metadata file with agent and concentration columns merged in the case of
    combination experiments.
    """
    dfm = dfmeta.copy()
    agent_cols = [a for a in dfm.columns.tolist() if 'agent' in a]
    if len(agent_cols) > 1:
        dfm[agent_cols] = dfm[agent_cols].replace(['', ' '], np.nan)
        dfm['agent'] = dfm[agent_cols].apply(
            lambda x: ','.join(x[x.notnull()]), axis=1)
        conc_cols = [a for a in dfm.columns.tolist() if 'concentration' in a]
        dfm[conc_cols] = dfm[conc_cols].astype(str)
        dfm[conc_cols] = dfm[conc_cols].replace(['0.0', '0'], np.nan)
        dfm['concentration'] = dfm[conc_cols].apply(
            lambda x: ','.join(x[x.notnull()]), axis=1)
    return dfm
Merge agent and concentration columns in the case of
       combination experiments.

    Parameters
    ----------
    dfmeta : pandas dataframe
       metadata file with wells mapped to treatment condition.
    Returns
    -------
    dfm : pandas dataframe
       metadata file with agent and concentration columns merged in the case of
    combination experiments.
    
Merge agent and concentration columns in the case of
combination experiments.

Parameters

dfmeta : pandas dataframe
metadata file with wells mapped to treatment condition.
Returns

dfm : pandas dataframe
metadata file with agent and concentration columns merged in the case of
combination experiments.
Merge agent and concentration columns in the case of combination experiments . Parameters dfmeta : pandas dataframe metadata file with wells mapped to treatment condition . Returns dfm : pandas dataframe metadata file with agent and concentration columns merged in the case of combination experiments .
def process_metadata_file(dfmeta):
    dfm = dfmeta.copy()
    agent_cols = [a for a in dfm.columns.tolist() if 'agent' in a]
    if len(agent_cols) > 1:
        dfm[agent_cols] = dfm[agent_cols].replace(['', ' '], np.nan)
        dfm['agent'] = dfm[agent_cols].apply(
            lambda x: ','.join(x[x.notnull()]), axis=1)
        conc_cols = [a for a in dfm.columns.tolist() if 'concentration' in a]
        dfm[conc_cols] = dfm[conc_cols].astype(str)
        dfm[conc_cols] = dfm[conc_cols].replace(['0.0', '0'], np.nan)
        dfm['concentration'] = dfm[conc_cols].apply(
            lambda x: ','.join(x[x.notnull()]), axis=1)
    return dfm
def process_metadata_file ( dfmeta ) : dfm = dfmeta . copy ( ) agent_cols = [ a for a in dfm . columns . tolist ( ) if 'agent' in a ] if len ( agent_cols ) > 1 : dfm [ agent_cols ] = dfm [ agent_cols ] . replace ( [ '' , ' ' ] , np . nan ) dfm [ 'agent' ] = dfm [ agent_cols ] . apply ( lambda x : ',' . join ( x [ x . notnull ( ) ] ) , axis = 1 ) conc_cols = [ a for a in dfm . columns . tolist ( ) if 'concentration' in a ] dfm [ conc_cols ] = dfm [ conc_cols ] . astype ( str ) dfm [ conc_cols ] = dfm [ conc_cols ] . replace ( [ '0.0' , '0' ] , np . nan ) dfm [ 'concentration' ] = dfm [ conc_cols ] . apply ( lambda x : ',' . join ( x [ x . notnull ( ) ] ) , axis = 1 ) return dfm
Merge agent and concentration columns in the case of
combination experiments.
Merge agent and concentration columns in the case of combination experiments .
"""Merge agent and concentration columns in the case of
       combination experiments.

    Parameters
    ----------
    dfmeta : pandas dataframe
       metadata file with wells mapped to treatment condition.
    Returns
    -------
    dfm : pandas dataframe
       metadata file with agent and concentration columns merged in the case of
    combination experiments.
    """
dfmeta