CompassAnalyzer: CompassAnalyzer

Description Public fields Methods

Description

An object through which you can access several useful functions for your COMPASS analysis.

Public fields

settings

The CompassSettings instance specifying the settings for this CompassAnalyzer instance.

Methods

Public methods


Method new()

Initialize the CompassAnalyzer instance.

Usage
CompassAnalyzer$new(settings)
Arguments
settings

The CompassSettings instance specifying the settings for this CompassAnalyzer instance.

Returns

NULL.


Method print()

Prints a human-readable representation of this CompassAnalyzer instance.

Usage
CompassAnalyzer$print(...)
Arguments
...

Unused.

Returns

NULL.


Method repr()

Returns a human-readable representation of this CompassAnalyzer instance.

Usage
CompassAnalyzer$repr(...)
Arguments
...

Unused.

Returns

An output.


Method conduct_wilcoxon_test()

Description.

Usage
CompassAnalyzer$conduct_wilcoxon_test(
  consistencies_matrix,
  group_A_cell_ids,
  group_B_cell_ids,
  ...,
  for_metareactions = TRUE
)
Arguments
consistencies_matrix

Either your CompassData instance's reaction_consistencies matrix, or its metareaction_consistencies matrix, depending on whether you want a table whose rows correspond to reactions or metareactions.

group_A_cell_ids

A character vector containing the IDs of the cells that constitute group A.

group_B_cell_ids

A character vector containing the IDs of the cells that constitute group B.

...

Unused.

for_metareactions

Whether the first argument is your reaction_consistencies matrix or your metareaction_consistencies matrix. This argument doesn't affect the contents of the returned tibble, but merely ensures that its column names are appropriate.

Returns

A tibble, where each row represents a Wilcoxon rank-sum test for whether a reaction or metareaction achieves a higher consistency among the group A cells than among the group B cells. It has the following columns: reaction_id or metareaction_id, wilcoxon_statistic, cohens_d, p_value, and adjusted_p_value.


Method get_umap_components()

Description.

Usage
CompassAnalyzer$get_umap_components(
  consistencies_matrix,
  ...,
  num_components = 2
)
Arguments
consistencies_matrix

Either your CompassData instance's reaction_consistencies matrix, or its metareaction_consistencies matrix, depending on whether the high-dimensional representation of each cell should encapsulate the cell's reaction consistencies or its metareaction consistencies. In the former case the UMAP algorithm will find a num_components-dimensional embedding for each cell in (# reactions)-dimensional space, and in the latter case the UMAP algorithm will find a num_components-dimensional embedding for each cell in (# metareactions)-dimensional space.

...

Unused.

num_components

The number of UMAP components to calculate (i.e. the dimensionality of the embedding).

Returns

A tibble, where each row represents the low-dimensional UMAP embedding of a cell. It has the following columns: Your CompassSettings instance's cell_id_col_name, component_1, component_2, ..., component_num_components.


Method clone()

The objects of this class are cloneable with this method.

Usage
CompassAnalyzer$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


YosefLab/compassR documentation built on May 3, 2021, 7:31 a.m.