@staticmethod
def clean_isatab_field_names(field_names):
    """Fixes ISA-Tab header names. Sometimes Pandas adds suffixes to them
        uneccessarily or other junk

        :param field_names: List of field header names
        :return: Fixed field names
        """
    for i, field_name in enumerate(field_names):
        if field_name.startswith('Term Source REF'):
            field_names[i] = 'Term Source REF'
        elif field_name.startswith('Term Accession Number'):
            field_names[i] = 'Term Accession Number'
        elif field_name.startswith('Unit'):
            field_names[i] = 'Unit'
        elif 'Characteristics[' in field_name:
            if 'material type' in field_name.lower():
                field_names[i] = 'Material Type'
            else:
                try:
                    field_names[i] = field_name[field_name.rindex('.') + 1:]
                except ValueError:
                    pass
        elif 'Factor Value[' in field_name:
            try:
                field_names[i] = field_name[field_name.rindex('.') + 1:]
            except ValueError:
                pass
        elif 'Parameter Value[' in field_name:
            try:
                field_names[i] = field_name[field_name.rindex('.') + 1:]
            except ValueError:
                pass
        elif field_name.endswith('Date'):
            field_names[i] = 'Date'
        elif field_name.endswith('Performer'):
            field_names[i] = 'Performer'
        elif 'Protocol REF' in field_name:
            field_names[i] = 'Protocol REF'
        elif field_name.startswith('Sample Name.'):
            field_names[i] = 'Sample Name'
    return field_names
