Function to transform the total abundance calculation for each sample ID to another
    format based on user given transformation function.

    :type biomf: A BIOM file.
    :param biomf: OTU table format.

    :param fn: Mathematical function which is used to transform smax to another format.
               By default, the function has been given as base 10 logarithm.

    :rtype: dict
    :return: Returns a dictionary similar to output of raw_abundance function but with
             the abundance values modified by the mathematical operation. By default, the
             operation performed on the abundances is base 10 logarithm.

def transform_raw_abundance(biomf, fn=math.log10, sampleIDs=None, sample_abd=True):
    """
    Function to transform the total abundance calculation for each sample ID to another
    format based on user given transformation function.

    :type biomf: A BIOM file.
    :param biomf: OTU table format.

    :param fn: Mathematical function which is used to transform smax to another format.
               By default, the function has been given as base 10 logarithm.

    :rtype: dict
    :return: Returns a dictionary similar to output of raw_abundance function but with
             the abundance values modified by the mathematical operation. By default, the
             operation performed on the abundances is base 10 logarithm.
    """
    totals = raw_abundance(biomf, sampleIDs, sample_abd)
    return {sid: fn(abd) for sid, abd in totals.items()}