mantispy.pp.annotate_controls#
- mantispy.pp.annotate_controls(adata, negcon=('DMSO',), poscon=None, perturbation_key=None, copy=False)#
Mark negative (and optionally positive) controls.
- Parameters:
adata (
AnnData) – Object to annotate.negcon (
Sequence[str] (default:('DMSO',))) – Perturbation values that are negative controls.poscon (
Sequence[str] |None(default:None)) – Perturbation values that are positive controls, if any.perturbation_key (
str|None(default:None)) – Column holding the perturbation, auto-detected fromPERTURBATION_KEYSwhen omitted.copy (
bool(default:False)) – Return a modified copy instead of mutating in place.
- Return type:
- Returns:
None, or the modified copy whencopy=True. Writesobs["Metadata_Control"]and, whenposconis given,obs["Metadata_Control_Type"].