spatialcells.preprocessing

Access via either spatialcells.preprocessing or spatialcells.prep.

setGate

spatialcells.prep.setGate(adata, target_marker, gate, marker_suffix='_positive', debug=True)

A new column will be added for the marker. E.g., for a marker named by SOX10, SOX10_positive will be added, which has two values: True or False.

Parameters:
  • adata – AnnData object

  • target_marker – the marker to be gated

  • gate – the gate value

  • marker_suffix – the suffix of the new column name

  • debug – if True, print the value counts of the new column

Returns:

None

setGates

spatialcells.prep.setGates(adata, gate_file, marker_suffix='_positive', debug=True)

A new column will be added for a marker. E.g., for SOX10, SOX10_positive will be added, which has two values: True or False.

Parameters:
  • adata – AnnData object

  • gate_file – the file containing the gate values for each marker

  • marker_suffix – the suffix of the new column name

  • debug – if True, print the value counts of the new column