def sample_ids_from_metadata_description(mapping_f, valid_states_str):
 (map_data, map_header, map_comments) = parse_mapping_file(mapping_f)
 valid_states = parse_metadata_state_descriptions(valid_states_str)
 sample_ids = get_sample_ids(map_data, map_header, valid_states)
 if (len(sample_ids) < 1):
  raise ValueError('All samples have been filtered out for the criteria described in the valid states')
 return sample_ids

def sample_ids_from_metadata_description ( mapping_f , valid_states_str ) : ( map_data , map_header , map_comments ) = parse_mapping_file ( mapping_f ) valid_states = parse_metadata_state_descriptions ( valid_states_str ) sample_ids = get_sample_ids ( map_data , map_header , valid_states ) if ( len ( sample_ids ) < 1 ) : raise ValueError ( 'All samples have been filtered out for the criteria described in the valid states' ) return sample_ids
given a description of metadata .