Package chemaxon.util

Class HitColoringAndAlignmentOptions

java.lang.Object
chemaxon.util.HitColoringAndAlignmentOptions
All Implemented Interfaces:
Cloneable

@PublicApi public final class HitColoringAndAlignmentOptions extends Object implements Cloneable
Class for specifying coloring and alignment options.
Since:
JChem 5.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The structure is displayed with the original coordinates.
    static final int
    The substructure part of the target will get the exact coordinates of the query, and new coordinates will be generated for the remainder of the structure.
    static final int
    The structure is rotated according to the substructure.
    static final int
    The dissimilarity score is shown and stored in the MPropertyContainer of the Molecule.
    static final int
    Constant value specifying, that in case of markush searching the markush structure is expanded according to the query structure.
    static final int
    Constant value specifying, that in case of markush searching the markush structure is expanded according to the query structure and homology groups are also replaced by the query structure matching on them.
    static final int
    Constant value specifying, that in case of markush searching hit is displayed on the markush structure.
    static final String
    Label for the query part of a similarity hit.
    static final int
    The similarity score is shown and stored in the MPropertyContainer of the Molecule.
    static final String
    Label for the similarity score part of the hit.
    static final int
    The similarity score is neither shown nor stored in the MPropertyContainer of the Molecule.
    static final String
    Label for the target part of the similarity hit.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Makes an identical copy of the Options
    int
    Returns the alignment mode.
    boolean
    Returns true if markush structures should be hit enumerated according to the query structure.
    Returns the color to be used when coloring the substructure hit.
    Returns the color used for highlighting user defined homologies in a substructure hit.
    int
    Returns the Markush display mode.
    Returns the color to be used when coloring the part of the target which is not matching to the query.
    Returns the color to be used when coloring the part of the 3D target which is not matching to the query.
    int
    Returns the mode of similarity score display.
    static boolean
    Checks if the given option name can be a hit coloring and alignment option.
    boolean
    Specifies if substructure hit coloring should be used.
    boolean
    Gets whether bounding boxes and labels are to be displayed for the components of the search.
    boolean
    Gets whether the query should be displayed in the upper left corner along with the hit.
    boolean
    Gets whether unused definitions should be removed or not.
    void
    setAlignmentMode(int alignmentMode)
    Sets the alignment mode.
    void
    setColoringEnabled(boolean coloringEnabled)
    Sets whether substructure hit coloring should be used.
    void
    setDisplayLabelsAndBoxes(boolean value)
    Set the option to show labels and bounding boxes for the parts of the result: target, query, score.
    void
    setEnumerateMarkush(boolean enumerateMarkush)
    Sets whether markush structures should be hit enumerated according to the query structure.
    void
    setHitColor(Color hitColor)
    Sets the color to be used when coloring the substructure hit.
    void
    setHitHomologyColor(Color hitHomologyColor)
    Set the color of user defined homologies in a substructure hit.
    void
    setMarkushDisplayMode(int markushDisplayMode)
    Sets the Markush display mode.
    void
    setNonHitColor(Color nonHitColor)
    Sets the color to be used when coloring the part of the target which is not matching to the query.
    void
    setNonHitColor3D(Color nonHitColor3D)
    Sets the color to be used when coloring the part of the 3D target which is not matching to the query.
    static void
    setOptions(HitColoringAndAlignmentOptions hcaaOptions, String hitColorAndAlignOptionList)
    Parses the option list given while updating a HitColoringAndAlignmentOptions object.
    void
    setQueryDisplay(boolean value)
    Set query display option
    void
    Sets the remove unused definitions option.
    void
    setSimilarityScoreDisplay(int similarityScoreDisplay)
    Sets the mode of similarity score display.
    Returns a String representation of this object, which can be used in setOptions(HitColoringAndAlignmentOptions, String) to fill another HitColoringAndAlignmentOptions object with parameters.
    toString(String optionSeparator)
    Returns a String representation of this object, which can be used in setOptions(HitColoringAndAlignmentOptions, String) to fill another HitColoringAndAlignmentOptions object with parameters.

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • HitColoringAndAlignmentOptions

      public HitColoringAndAlignmentOptions()
  • Method Details

    • getEnumerateMarkush

      public boolean getEnumerateMarkush()
      Returns true if markush structures should be hit enumerated according to the query structure. (Markush reduction to the hit.)
      Returns:
      true if markush structures should be hit enumerated according to the query structure. (Markush reduction to the hit.)
      Since:
      JChem 5.12
    • setEnumerateMarkush

      public void setEnumerateMarkush(boolean enumerateMarkush)
      Sets whether markush structures should be hit enumerated according to the query structure. (Markush reduction to the hit.)
      Parameters:
      enumerateMarkush - true if markush structures should be hit enumerated according to the query structure. (Markush reduction to the hit.)
      Since:
      JChem 5.12
    • isQueryDisplay

      public boolean isQueryDisplay()
      Gets whether the query should be displayed in the upper left corner along with the hit. Default is false .
      Returns:
      true if query is to be shown, false if not.
    • setQueryDisplay

      public void setQueryDisplay(boolean value)
      Set query display option
      Parameters:
      value - true if query is to be displayed false if not. See:
    • isRemoveUnusedDefitions

      public boolean isRemoveUnusedDefitions()
      Gets whether unused definitions should be removed or not. Default value is true
      Returns:
      true if definitions are to be removed false if not.
      See Also:
    • setRemoveUnusedDefinitions

      public void setRemoveUnusedDefinitions(boolean value)
      Sets the remove unused definitions option. By removing unused definitions readability is increased.
      Default value is true
      Parameters:
      value - true if definitions are to be removed false if not.
      See Also:
    • isDisplayLabelsAndBoxes

      public boolean isDisplayLabelsAndBoxes()
      Gets whether bounding boxes and labels are to be displayed for the components of the search. Used only in case of similarity.
      Returns:
      true for boxes and labels to be displayed, false if no labels or boxes displayed.
    • setHitHomologyColor

      public void setHitHomologyColor(Color hitHomologyColor)
      Set the color of user defined homologies in a substructure hit. Default: Color.green.
      Parameters:
      hitHomologyColor - color used for highlighting homolgies in a hit
    • getHitHomologyColor

      public Color getHitHomologyColor()
      Returns the color used for highlighting user defined homologies in a substructure hit. Default: Color.green.
      Returns:
      the color used for highlighting
    • setDisplayLabelsAndBoxes

      public void setDisplayLabelsAndBoxes(boolean value)
      Set the option to show labels and bounding boxes for the parts of the result: target, query, score. Default is false.
      Parameters:
      value - true if labels and boxes to be displayed false otherwise.
    • isAcceptedOptionName

      public static boolean isAcceptedOptionName(String optionName)
      Checks if the given option name can be a hit coloring and alignment option. The option value is not checked for validity.
      Parameters:
      optionName - the option in question
      Returns:
      true if it is an accepted option name.
    • setOptions

      public static void setOptions(HitColoringAndAlignmentOptions hcaaOptions, String hitColorAndAlignOptionList)
      Parses the option list given while updating a HitColoringAndAlignmentOptions object. This can read in the option string returned by toString(String).
      Parameters:
      hcaaOptions - HitColoringAndAlignmentOptions to be updated based on option list provided
      hitColorAndAlignOptionList - options list to be parsed Can set multiple options. Name and value of an option should be separated by ":", and different pairs of names/values by spaces. Instead of spaces an alternative option separator string (even more than 1 character) can be specified at the beginning of optionString by the syntax "sep='separator string' ...". After 'separator string' there must be at least 1 space character!)
      E.g.
      • setOptions("hitColoring:y")
      • setOptions(" hitColoring:y align:r")
      • setOptions("sep=*-* align:r*-*markushDisplayMode:rhg")
      Throws:
      IllegalArgumentException - in case of wrong option value string
      See Also:
    • toString

      public String toString()
      Returns a String representation of this object, which can be used in setOptions(HitColoringAndAlignmentOptions, String) to fill another HitColoringAndAlignmentOptions object with parameters.
      Overrides:
      toString in class Object
      Returns:
      a String representation of this object
      See Also:
    • toString

      public String toString(String optionSeparator)
      Returns a String representation of this object, which can be used in setOptions(HitColoringAndAlignmentOptions, String) to fill another HitColoringAndAlignmentOptions object with parameters.
      Parameters:
      optionSeparator - the separator string used between parameters, null means space (" ")
      Returns:
      a String representation of this object
      See Also:
    • clone

      public Object clone()
      Makes an identical copy of the Options
      Overrides:
      clone in class Object
      Returns:
      the copy
    • getMarkushDisplayMode

      public int getMarkushDisplayMode()
      Returns the Markush display mode. Possible values:
      Returns:
      the Markush display mode
      Since:
      JChem 5.10
    • setMarkushDisplayMode

      public void setMarkushDisplayMode(int markushDisplayMode)
      Sets the Markush display mode. Possible values:
      Parameters:
      markushDisplayMode - the Markush display mode
      Since:
      JChem 5.10
    • getAlignmentMode

      public int getAlignmentMode()
      Returns the alignment mode. Possible values:
      Returns:
      the alignment mode
      Since:
      JChem 5.10
    • setAlignmentMode

      public void setAlignmentMode(int alignmentMode)
      Sets the alignment mode. Possible values:
      Parameters:
      alignmentMode - the alignment mode
      Since:
      JChem 5.10
    • isColoringEnabled

      public boolean isColoringEnabled()
      Specifies if substructure hit coloring should be used. Default: false.
      Returns:
      true if substructure hit coloring should be used
      Since:
      JChem 5.10
    • setColoringEnabled

      public void setColoringEnabled(boolean coloringEnabled)
      Sets whether substructure hit coloring should be used. Default: false.
      Parameters:
      coloringEnabled - true if substructure hit coloring should be used
      Since:
      JChem 5.10
    • getHitColor

      public Color getHitColor()
      Returns the color to be used when coloring the substructure hit. Default: Color.blue.
      Returns:
      the hitColor
      Since:
      JChem 5.10
    • setHitColor

      public void setHitColor(Color hitColor)
      Sets the color to be used when coloring the substructure hit. Default: Color.blue.
      Parameters:
      hitColor - the hitColor to set
      Since:
      JChem 5.10
    • getNonHitColor

      public Color getNonHitColor()
      Returns the color to be used when coloring the part of the target which is not matching to the query. Default: Color.black.
      Returns:
      the nonHitColor
      Since:
      JChem 5.10
    • setNonHitColor

      public void setNonHitColor(Color nonHitColor)
      Sets the color to be used when coloring the part of the target which is not matching to the query. Default: Color.black.
      Parameters:
      nonHitColor - the nonHitColor to set
      Since:
      JChem 5.10
    • getNonHitColor3D

      public Color getNonHitColor3D()
      Returns the color to be used when coloring the part of the 3D target which is not matching to the query. Default: Color.gray.
      Returns:
      the nonHitColor3D
      Since:
      JChem 5.10
    • setNonHitColor3D

      public void setNonHitColor3D(Color nonHitColor3D)
      Sets the color to be used when coloring the part of the 3D target which is not matching to the query. Default: Color.gray.
      Parameters:
      nonHitColor3D - the nonHitColor3D to set
      Since:
      JChem 5.10
    • getSimilarityScoreDisplay

      public int getSimilarityScoreDisplay()
      Returns the mode of similarity score display. Possible values:
      Returns:
      the similarityScoreDisplay
      Since:
      JChem 5.10
    • setSimilarityScoreDisplay

      public void setSimilarityScoreDisplay(int similarityScoreDisplay)
      Sets the mode of similarity score display. Possible values:
      Parameters:
      similarityScoreDisplay - the similarityScoreDisplay to set
      Since:
      JChem 5.10