calour.experiment.Experiment.sort_samples

Experiment.sort_samples(field, **kwargs)[source]

Sort samples by field A convenience function for sort_by_metadata

Parameters:

field (str) – The field to sort the samples by

Keyword Arguments:
 
  • field (str) – Name of the field to sort by
  • axis (0, 1, 's', or 'f') – sort by samples (0 or ‘s’) or by features (1 or ‘f’), i.e. the field is a column in sample_metadata (0 or ‘s’) or feature_metadata (1 or ‘f’)
  • inplace (bool, optional) – False (default) to create a copy True to Replace data in exp
Returns:

Return type:

Experiment with samples sorted according to values in field