Skip to content

GC.normalize() ​

Normalise the positions of the genes: even gaps between them.

Links made before by links(group=) move with their genes. Links given as data (e.g. alignments) keep their positions, with a warning: add them after normalize().

Usage ​

python
chart.normalize(
    group,
    cluster,
    normalize,
    preserve_gene_length,
    gap,
    custom_gaps,
)

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 custom_gaps. Default: the group of the chart.
clusterint, str or list, optionalThe clusters, by number (from 1) or name. Default: all.
normalizeboolWhether to normalise the gaps. Default True.
preserve_gene_lengthboolWhether genes keep their length. Default True.
gapfloat, optionalThe gap between genes, as a share of the cluster.
custom_gapsdictFactors of the gap before genes, by group, e.g. {"tnsA": 2}.

Value ​

GC: The chart, with the new positions in its data.