MarkerDetectionState

MarkerDetectionState

This step performs marker detection for each cluster of cells by performing pairwise comparisons to each other cluster. This wraps the scoreMarkers function from scran.js. The clustering is obtained from the upstream ChooseClusteringState.

Methods not documented here are not part of the stable API and should not be used by applications.

Classes

MarkerDetectionState

Methods

compute(parameters)

Description:
  • This method should not be called directly by users, but is instead invoked by runAnalysis.

Source:
Parameters:
Name Type Description
parameters object

Parameter object, equivalent to the marker_detection property of the parameters of runAnalysis.

Properties
Name Type Description
lfc_threshold number

Log-fold change threshold to use when computing the Cohen's d and AUC for each pairwise comparison.

compute_auc boolean

Whether to compute the AUCs. Setting this to false will skip AUC calculations and improve speed and memory efficiency.

Returns:

The state is updated with new results.

computeVersus(left, right) → {object}

Description:
  • Extract markers for a pairwise comparison between two clusters for more detailed examination of the differences between them. It is assumed that runAnalysis was already run on this MarkerDetectionState instance before calling this method.

Source:
Parameters:
Name Type Description
left number

Index of one cluster in which to find upregulated markers.

right number

Index of another cluster to be compared against left.

Returns:

Object containing:

  • results: object containing the marker statistics for the comparison between two clusters. Each key is a modality name and each value is a ScoreMarkersResults object.
  • left: index of the group corresponding to the left cluster in each ScoreMarkersResults object, e.g., Cohen's d for the RNA markers of the left cluster are defined as output.results.RNA.cohen(output.left).
  • right: index of the group corresponding to the right cluster in each ScoreMarkersResults object. e.g., Cohen's d for the RNA markers of the left cluster are defined as output.results.RNA.cohen(output.right).
Type
object

fetchParameters() → {object}

Description:
  • Parameters used to compute the results. It is assumed that runAnalysis was already run on this MarkerDetectionState instance before calling this method.

Source:
Returns:

Object containing the parameters.

Type
object

fetchResults() → {object}

Description:
  • Obtain the marker detection results for all modalities. It is assumed that runAnalysis was already run on this MarkerDetectionState instance before calling this method.

Source:
Returns:

Object where each key is a modality name and each value is an ScoreMarkerResults object, containing marker detection statistics for all clusters.

Type
object

free()

Description:
  • Frees all resources associated with this instance.

Source:

(static) defaults() → {object}

Source:
Returns:

Default parameters that may be modified and fed into compute.

Type
object