def read_file_precision(file,precision):
    """ Read in the file converting floats to the given precision """
    file_data=[]
    with open(file) as file_handle:
        for line in file_handle:
            formatted_data=[]
            for data in line.rstrip().split("\t"):
                try:
                    data_float=float(data)
                    data="{:.{digits}f}".format(data_float, digits=precision)
                except ValueError:
                    pass
                formatted_data.append(data)
            file_data.append("\t".join(formatted_data))
    return file_data