def clr_transformed(df, masked=False):
    """ return a center log-ratio (clr)-transformed dataframe for a dataframe with raw counts """
    from skbio.stats.composition import clr
    from skbio.stats.composition import multiplicative_replacement
    import pandas as pd
    if masked:
        df2 = df[df['masked'] == False]
        df2.select_dtypes(include=int).apply(multiplicative_replacement).apply(
            clr)
        df[df.select_dtypes(include=int).columns.tolist()] = None
        df.update(df2)
    else:
        df[df.select_dtypes(include=int).columns.tolist()] = df.select_dtypes(
            include=int).apply(multiplicative_replacement).apply(clr)
    return df
