pegasus.mark_doublets

pegasus.mark_doublets(data, demux_attr='demux_type', dbl_clusts=None)[source]

Convert doublet prediction into doublet annotations that Pegasus can recognize. In addition, clusters in dbl_clusts will be marked as doublets.

Must run infer_doublets first.

Parameters
  • data (pegasusio.MultimodalData) – Annotated data matrix with rows for cells and columns for genes.

  • demux_attr (str, optional, default: demux_type) – Attribute indicating singlets/doublets that Pegasus can recognize. Currently this is ‘demux_type’, which is also used for hashing.

  • dbl_clusts (str, optional, default: None) – Indicate which clusters should be marked as all doublets. It takes the format of ‘clust:value1,value2,…’, where ‘clust’ refers to the cluster attribute.

Return type

None

Returns

  • None

  • Update data.obs

    • data.obs[demux_attr]: Singlet/doublet annotation.

Examples

>>> pg.mark_doublets(data, dbl_clusts='Annotation:B/T doublets')