Skip to content

GC.genes() ​

Set how the genes are drawn.

Usage ​

python
chart.genes(
    group,
    marker,
    marker_size,
    show,
    color_scheme,
    custom_colors,
    cluster,
    item_style,
    group_style,
    style_by,
    corner_radius,
    **options,
)

An argument shown without a default is optional too: left out, the chart keeps its default.

chart is a GC chart.

Arguments ​

ArgumentTypeDescription
groupstr, optionalColumn of groups, for the gene colours. Default: the group of the chart.
markerstr, optionalThe shape of the genes: "arrow", "boxarrow", "box", "cbox" or "rbox".
marker_sizestr, optional"small", "medium" or "large".
showboolWhether to show the genes. Default True.
color_schemestr, optionalA d3 colour scheme (e.g. "schemeSet2") or a geneviewer palette (e.g. "okabeIto", see geneviewer_palette). Without cluster, the legend uses the same colours.
custom_colorslist or dict, optionalColours recycled over the groups, or a dict of colours by group; groups left out of a dict keep the colours of the scheme.
clusterint, str or list, optionalThe clusters, by number (from 1) or name. Default: all.
item_stylelist of dictStyles of single genes, e.g. [{"index": 2, "fill": "red"}].
group_styledict of dict, optionalStyles by group, applied to every gene of that group, e.g. {"promoter": {"marker": "box", "fill": "grey"}}. item_style takes precedence.
style_bystr, optionalThe column group_style is matched against, or "geneTrack". Default: group.
corner_radiusfloat, optionalRadius in pixels of the rounded corners of "arrow", "boxarrow", "box" and "rbox" markers. Default: sharp corners, and 5 for "rbox".
**optionsFurther gene options, e.g. stroke="black", stroke_width=1, marker_height=12.

Value ​

GC: The chart.