Skip to contents

This function provides access to supplementary information stored as attributes during the layout rendering process in quad_layout()/ggheatmap() or stack_layout() object. 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.

Usage

ggalign_attr(x, field = NULL)

ggalign_attr_set(x, values)

ggalign_attr_get(x)

Arguments

x

Input data for the function used to transform the layout data.

field

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

values

A list to be attached.

Value

The specified data from the attached attribute or NULL if it is unavailable.

Details

The attached attributes play a vital role in cases where input data undergo transformations that limit access to complete information, such as the total number of observations. For example, fortify_matrix.MAF() may filter mutation data while adding relevant attributes for detailed analysis.

Users can utilize the ggalign_attr function to extract this information during the rendering process. Additionally, developers can use ggalign_attr_set and ggalign_attr_get to manage these attributes while defining new methods or extensions for fortify_matrix() or fortify_data_frame().

User-Facing:

  • ggalign_attr: Retrieves specific or complete data from the attached attributes for use in the rendering process.

Developer-Focused:

  • ggalign_attr_set: Attaches supplementary data to the input, facilitating downstream use.

  • ggalign_attr_get: Extracts previously attached supplementary data during the transformation process.