API - plotting#
- class found.pl.PlotHiDDENOutput(adata, p_hat, labs, *, layer=None)[source]#
class which when provided with pipeline outputs (see fields), can be used to create various diagnostic plots.
can be indexed to plot only a subset of the data.
- Parameters:
adata (
AnnData) – object containing input datap_hat (
Series) – HiDDEN-generated p_hat values (regression step outputs)labs (
Series) – HiDDEN-adjusted condition labels (binarization step outputs)layer (
str|None) – name of layer to use when accessing layer-specific data fromself.adata,Xslot is used if set toNone
- reg_vln(group_by=None, split_mode='n', vertical=True, n=100)[source]#
method used to generate violin plots of p_hat values
- Parameters:
group_by (
str|Series|None) – key in self.adata to group violin plot bysplit_mode (
Literal[False,'area','width','n']) – if the violin plot should be split by the refined HiDDEN labels, and if yes, how should the splits be scaled (options:"area"- meaning they have equivalent area,"n"- scaled by proportion of observations,"width"- min/max scaling so that they have the same width,False- no splitting)vertical (
bool) – should the plot be vertical (like a violin plot) or horizontal (e.g. like a density plot)n (
int) – number of bins for density estimation
- Return type:
- bin_bar(orig_labs, ctrl_val, group_by=None, vertical=True, scale=True)[source]#
method used to generate stacked bar plots showing levels of case, control, and HiDDEN-adjusted labels
- Parameters:
orig_labs (
str|Series) – key inself.adatafor original condition labelsctrl_val (
object) – value corresponding to control in condition labelsgroup_by (
str|Series|None) – optional key inself.adatato group calculation byvertical (
bool) – should the plot be vertical (i.e. metric on Y axis, groups on X axis) or horizontal (i.e. metric on X axis, groups on Y axis)scale (
bool) – should columns height be scaled by group size (i.e. turns into representation of group fractions instead raw numbers)
- Return type:
- class found.pl.PlotTunerOutput(adata, sel, outs, *, layer=None)[source]#
class which when provided with tuner outputs (see fields), can be used to create various diagnostic plots.
can be indexed to return PlotHiDDENOutput objects for diagnostics on specific hyperparameters.
- Parameters:
adata (
AnnData) – object containing input datasel (
object) – HiDDENt-returned selected hyperparameter configurationouts (
Mapping[Any,tuple[Series,Series,Any]]) – HiDDENt-returned output dictionarylayer (
str|None) – name of layer to use when accessing layer-specific data fromself.adata,Xslot is used if set toNone