mantispy.get.controls

Contents

mantispy.get.controls#

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

Boolean mask of control rows.

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

  • kind (str (default: 'negcon')) – "negcon" reads Metadata_Control_Type == "negcon"; "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:
  • ValueError – kind is neither "negcon" nor "poscon".

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