def __get_ref_freq(row, sample_name):
    """

    Get the reference base frequency in a row of the database containing detailed mpileup information.

    :param row: the row of the database
    :param sample_name: the name of the sample (str)

    :returns: the value of the reference base frequency (float)

    """
    col_name = row['ref'].upper() + 'freq_' + sample_name
    if row[col_name] >= 0:
        return row[col_name]
    else:
        return 0.0