calour.experiment.Experiment.filter_ids

Experiment.filter_ids(ids, axis=1, negate=False, inplace=False)[source]

Filter samples or features based on a list IDs.

Note

the order of samples or features is updated as the order given in ids.

Parameters:
  • ids (iterable of str) – the feature/sample ids to filter (index values)
  • axis (0, 1, 's', or 'f', optional) – 1 or ‘f’ (default) to filter features; 0 or ‘s’ to filter samples
  • negate (bool, optional) – negate the filtering
  • inplace (bool, optional) – False (default) to create a copy of the experiment, True to filter inplace
Returns:

filtered so contains only features/samples present in exp and in ids

Return type:

Experiment