stacker.visualization.create_axis_labels

stacker.visualization.create_axis_labels#

create_axis_labels(res_indices, tick_distance=10)[source]#

Designates the axis labels to use in the SSF plot.

Helper function for visualizing SSFs. Returns the x-axis tick positions and labels to use on the ticks based on the residues used in a specific SSF analysis. Meant to be used when many disjoint sets of residue indices are used. Ticks will be present every tick_distance residues in a collection of adjacent residues, and a tick will exist at both ends of any consecutive residue sequence.

Parameters:
res_indiceslist

The list of residue indices used in the pairwise analysis. Parameter residue_desired passed to filter_traj()

tick_distanceint, default = 10

Distance between ticks in blocks of consecutive residues.

Returns:
tick_locationslist

List of tick positions (0-based) to place labels on in the axes.

tick_labelslist

List of labels to place at the adjacent tick locations.

See also

filter_traj

Filters an input trajectory to desired residues

Examples

Residues 0-12,98-100 were used. The SSF will label 0,10,12,98,100, provided in the second returned list. The first returned list gives the positions on the axes to place each label.

>>> create_axis_labels([0,1,2,3,4,5,6,7,8,9,10,11,12,98,99,100])
[0, 10, 12, 13, 15], [0, 10, 12, 98, 100]
>>> create_axis_labels([94,95,96,97,98,99,100,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428])
[0, 6, 7, 17, 27], [94, 100, 408, 418, 428]