mantispy.get.controls

Contents

mantispy.get.controls#

mantispy.get.controls(adata, kind='negcon')#

Boolean mask of control rows.

Parameters:
  • adata (AnnData) – Object to read.

  • kind (str (default: 'negcon')) – "negcon" reads Metadata_Control; "poscon" reads Metadata_Control_Type == "poscon" and is all-False when that column is absent.

Return type:

ndarray

Returns:

A boolean mask over obs, true on the control rows.

Raises:
  • ValueErrorkind is neither "negcon" nor "poscon", or Metadata_Control has missing values.

  • KeyError"negcon" was asked for and obs has no Metadata_Control column.

  • TypeErrorMetadata_Control is not boolean, so it would select every row.