HotSpotAUC#

class astropathdb.analysis.quantized_tiles.density_auc.HotSpotAUC(hotspot_data, groups_df, negative_correlations='axis_defaults', expression_marker='pd1', metric='AUC', group_filters='axis_defaults')#

class for computing the AUC Heatmap.

Parameters:
  • hotspot_data (DataFrame) – A DataFrame containing the hotspot data.

  • groups_df (DataFrame) – A DataFrame containing the group information.

  • negative_correlations (str | list[str]) – A list of negative correlations to consider.

  • expression_marker (str) – The expression marker to use.

  • metric (str) – The metric to use.

  • group_filters (str | list[str]) – A list of group filters to apply.

HotSpotAUC Attributes#

HotSpotAUC References#

Attribute Reference#

attribute auc_data#

Private Attribute Reference#

attribute __metric = ''#
attribute __groups_df#

Private Method Reference#

static __handle_default_mappings(variable, default_mapping)#
Parameters:
Return type:

list[str]

method __handle_default_negative_correlations(negative_correlations)#
Parameters:

negative_correlations (str | list[str])

Return type:

None

method __handle_default_group_filters(group_filters, expression_marker)#
Parameters:
Return type:

None

method __parse_columns(hotspot_data, expression_marker)#
Parameters:
Return type:

DataFrame

method __filter_hotspot_data(hotspot_data)#

Filter hotspot output data on the expression marker and group_filters.

Valid group filters are:
  • quantile: Remove the data without a tertile specification (always keep negatives)

  • binary: Remove the data with quantile expressions

  • list of phenotypes to exclude, will be passed to an isin regex search of ‘mytype’ with an | separator.

Parameters:

hotspot_data (DataFrame)

Return type:

DataFrame

method __compute_auc(filtered_hotspot_data)#

Estimate AUC of filtered hotspot data.

may need to add ‘all;PDL1-’ to the group filters.

Parameters:

filtered_hotspot_data (DataFrame)

Return type:

DataFrame

method __pivot_auc_data(auc_data_formatted)#
Parameters:

auc_data_formatted (DataFrame)

Return type:

DataFrame

method __sort_auc_pivot_data(auc_pivot_data)#
Parameters:

auc_pivot_data (DataFrame)

Return type:

DataFrame

method __compute_hotspot_auc(hotspot_data)#
Parameters:

hotspot_data (DataFrame)

Return type:

DataFrame