Class AbstractUserArgumentProcessor

  • All Implemented Interfaces:
    UserArgumentProcessor
    Direct Known Subclasses:
    CeUserArgumentProcessor, FatCatUserArgumentProcessor, SmithWatermanUserArgumentProcessor

    public abstract class AbstractUserArgumentProcessor
    extends java.lang.Object
    implements UserArgumentProcessor
    Base class for a new structure alignment CLI.

    To add a new StructureAlignment with a CLI similar to CE or FATCAT,

    1. Implement StructureAlignment with the main algorithm
    2. Implement ConfigStrucAligParams. This provides the parameters for the GUI.
    3. Subclass StartupParameters (can be an inner class) with the same parameters described in the ConfigStrucAligParams.
    4. Subclass AbstractUserArgumentProcessor, with the getStartupParams() method returning a fresh instance of the custom StartupParameters
    5. Implement the getParameters() method to copy values from the StartupParameters to the ConfigStrucAligParams.

    Note that reflection is used in a number of places, so the CLI argument names must match the get/set functions in both parameter beans.

    • AlignmentGUI automatically takes parameter names and types from the ConfigStrucAligParams
    • AbstractUserArgumentProcessor also takes parameter names and help descriptions from ConfigStrucAligParams, but it saves arguments to the StartupParameter bean.
    This means that both beans should be kept in sync.
    Author:
    Andreas, Spencer
    • Field Detail

      • newline

        public static java.lang.String newline
      • mandatoryArgs

        public static final java.util.List<java.lang.String> mandatoryArgs
    • Constructor Detail

      • AbstractUserArgumentProcessor

        protected AbstractUserArgumentProcessor()
    • Method Detail

      • getStartupParametersInstance

        protected abstract StartupParameters getStartupParametersInstance()
        StartupParameters is a bean to store all the possible command line parameters. The `StartupParameter` class contains the basic set of CLI parameters common to all `StructureAligmnent`s. This method should return a subclass of StartupParameters which has been extended to store values for all additional parameters.
        Returns:
        A new instance of the correct StartupParameters subclass
      • getParameters

        public abstract java.lang.Object getParameters()
      • getDbSearchLegend

        public abstract java.lang.String getDbSearchLegend()
      • process

        public void process​(java.lang.String[] argv)
        Description copied from interface: UserArgumentProcessor
        Process user arguments that have been provided from the command line
        Specified by:
        process in interface UserArgumentProcessor
      • printAboutMe

        public static void printAboutMe()
      • getDbSearchResult

        public java.lang.String getDbSearchResult​(AFPChain afpChain)