Types#
Types used throughout polyflame
- class polyflame.types.PlotInfo#
Dictionary passed to plotting functions
- colorSequential: str#
Palette name to use for sequential colors
- colors: list[str]#
Color palette to use, must be a list of valid RGB color hex codes, with an appropriate length
- cols: dict[str, str]#
Column mappings from the column types expected to the actual column names in data
- title: str#
Title of plot
- xlabel: str#
Label for x-axis
- ylabel: str#
Label for y-axis
- class polyflame.types.DataPlotInfo#
Extension of
polyflame.types.PlotInfoto add data and plot type- data: DataFrame#
Data corresponding to the plot
- type: Literal['pyramid', 'upset', 'proportion'] | None#
Type of plot
- class polyflame.types.SourceInfo#
Source information for analysis functions to load data
- N: int | None#
Number of patients
- checksum: str#
Data integrity checksum
- checksum_file: str#
File for which data integrity checksum is calculated
- path: Path#
Path where source is located
- class polyflame.types.ReadableTermColumnInfo#
Dictionary type defining the mapping from term columns to readable names in a taxonomy
- drop_nulls: bool#
Whether rows containing nulls (after mapping) should be dropped from the data, by default, rows are not dropped
- taxonomy_section: str#
Section in taxonomy file that should be used for mapping. If not given, this is taken to be the same as
term_column
- term_column: Required[str]#
Column in data that should be mapped from codes to readable names