Skip to contents

ggalign_attr provides access to supplementary information stored as attributes during the layout rendering process. These attributes, commonly attached during data transformation by functions like fortify_matrix() or fortify_data_frame(), can include essential details such as filtered or supplementary data that inform downstream operations.

An additional attribute, which stores the factor levels, can be accessed with ggalign_lvls.

Usage

ggalign_attr(x, field = NULL, check = TRUE)

ggalign_lvls(x)

Arguments

x

Data used, typically inherited from the layout quad_layout()/ggheatmap() or stack_layout() object.

field

A string specifying the particular data to retrieve from the attached attribute. If NULL, the entire attached attribute list will be returned.

check

A boolean indicating whether to check if the field exists. If TRUE, an error will be raised if the specified field does not exist.

Value

  • ggalign_attr: The specified data from the attached supplementary data or NULL if it is unavailable.

  • ggalign_lvls: The attached supplementary levels or NULL if it is unavailable.

Details

Attributes attached to the data are especially useful when the input data is transformed in ways that limit access to the complete dataset. For example, fortify_matrix.MAF() might filter mutation data while adding attributes that retain important context, such as the total number of observations, for detailed or aggregated analyses. Additionally, it stores the levels of Variant_Classification for further usage.