def check_column_names(sample_metadata, feature_ranks, feature_metadata=None):
    """Checks that column names in input data will work properly in Qurro.

       See https://github.com/biocore/qurro/issues/55 for a list of these
       restrictions.
    """
    sugg = ' Try changing the name of this column.'
    sm_cols = sample_metadata.columns
    fr_cols = feature_ranks.columns
    fm_cols = []
    if feature_metadata is not None:
        fm_cols = feature_metadata.columns
    if 'Sample ID' in sm_cols:
        raise ValueError(
            'Sample metadata can\'t contain any columns called "Sample ID" (aside from the first column in the metadata).{}'
            .format(sugg))
    if 'Feature ID' in fr_cols or 'Feature ID' in fm_cols:
        raise ValueError(
            'Feature rankings/metadata can\'t contain any columns called "Feature ID" (aside from the first column in these files).{}'
            .format(sugg))
    if 'qurro_balance' in sm_cols:
        raise ValueError(
            'Sample metadata can\'t contain any columns called "qurro_balance".{}'
            .format(sugg))
    if 'qurro_classification' in fr_cols or 'qurro_classification' in fm_cols:
        raise ValueError(
            'Feature rankings/metadata can\'t contain any columns called "qurro_classification".{}'
            .format(sugg))
    if 'qurro_x' in fr_cols or 'qurro_x' in fm_cols:
        raise ValueError(
            'Feature rankings/metadata can\'t contain any columns called "qurro_x".{}'
            .format(sugg))
    if 'qurro_spc' in fr_cols or 'qurro_spc' in fm_cols:
        raise ValueError(
            'Feature rankings/metadata can\'t contain any columns called "qurro_spc".{}'
            .format(sugg))
    if len(set(fr_cols) & set(fm_cols)) > 0:
        raise ValueError(
            'Column names for the feature metadata and feature ranks must be distinct. Try creating a copy of your feature metadata with identical columns renamed, and use that with Qurro.'
            )
