schrodinger.application.msv.gui.color module¶
Contains the color scheme constants for msv
Note that color schemes should be always deepcopied by before they’re used so that the original copy in this module doesn’t get modified.
-
class
schrodinger.application.msv.gui.color.
ColorCell
(key, color, description='')¶ Bases:
object
-
class
schrodinger.application.msv.gui.color.
ConsensusSymbols
(color_cells=None, key_func=None, scheme_name='')¶ Bases:
schrodinger.application.msv.gui.color.RowColorScheme
-
getTextColor
(res)¶
-
-
class
schrodinger.application.msv.gui.color.
DisulfideScheme
(color_cells=None, key_func=None, scheme_name='')¶ Bases:
schrodinger.application.msv.gui.color.RowColorScheme
-
getBackgroundBrush
(res, default=None)¶ Returns the brush for the specified residue. See parent class for argument documentation.
-
-
class
schrodinger.application.msv.gui.color.
PositionScheme
(color_cells=None, key_func=None, scheme_name='')¶ Bases:
schrodinger.application.msv.gui.color.RowColorScheme
A scheme that handles coloring residues according to the length of the sequence
setLength must be called to update the color scheme whenever the sequence changes
-
setLength
(sequence_length)¶ Sets the position color scheme based on the length of the sequence
Parameters: sequence_length – The total length of the sequence. Type: int
-
-
class
schrodinger.application.msv.gui.color.
ResnumScheme
(color_cells=None, key_func=None, scheme_name='')¶ Bases:
schrodinger.application.msv.gui.color.RowColorScheme
-
getTextColor
(res)¶
-
-
class
schrodinger.application.msv.gui.color.
RowColorScheme
(color_cells=None, key_func=None, scheme_name='')¶ Bases:
object
A color scheme for a row in MSV
A RowColorScheme instance encapsulates all the color information needed to draw a row, as well as (optionally) the meaning of the colors. This includes foreground and background brushes as well as the handling of selection.
-
DEFAULT_BACKGROUND_SELECTION_BRUSH
= <PyQt5.QtGui.QBrush object>¶
-
getBackgroundBrush
(res, default=None)¶ Returns the brush for the specified residue.
Parameters: - res – The residue whose brush color is to be returned.
- default – The default brush color to be returned
Type: Type: QtGui.QBrush
Return type: QtGui.QBrush
Returns: The brush for the specified residue
-
getBackgroundBrushByKey
(key, default=None)¶ Returns the Brush for a specific key value
-
getBackgroundSelectionBrush
(res)¶ Returns the brush for the background color when the item is selected
Parameters: res – The residue whose background brush color is to be returned Type: schrodinger.protein.residue.Residue
Return type: QtGui.QBrush
Returns: The background brush for a residue of this kind
-
getCustomResColorMap
()¶ Get the map of custom residue colors
Returns: Custom residue color map Return type: dict
-
getTextColor
(res)¶ Returns the text color for the residue
Parameters: res ( schrodinger.protein.residue.Residue
) – The residue for which we want the text colorReturn type: QtGui.QColor
Returns: The text (foreground) color
-
getToolTip
(res)¶ Parameters: res ( schrodinger.protein.residue.Residue
) – The residue for which we want a tooltipReturn type: str Returns: The tooltip matching the residue
-
getToolTipByKey
(key)¶ Return a tooltip for a specific key value
-
keys
()¶ Return type: list Returns: A list of values for which we have brushes in the scheme
-
setBackgroundBrush
(color_cell)¶ Parameters:
-
updateCustomResColors
(color_map)¶ Apply a custom color to a list of residues using a map of residues keyed to
QtGui.QColor
to be applied, or None to remove custom colors.Parameters: color_map (dict) – Map of residues and the colors to apply
-
-
class
schrodinger.application.msv.gui.color.
RulerScheme
(color_cells=None, key_func=None, scheme_name='')¶ Bases:
schrodinger.application.msv.gui.color.RowColorScheme
-
getTextColor
(res)¶
-
-
schrodinger.application.msv.gui.color.
make_scheme_name_map
()¶