Uploaded image for project: 'Jalview'
  1. Jalview
  2. JAL-961

Instantaneous alignment calculation API that allows extension of range of dynamic alignment analysis calculations by plugins




      Jalview (as of v2.7) has a (small) number of hardwired calculation threads, which - based on specific user preferences, launch and populate annotation rows reflecting sequence consensus, symbol distribution, amino acid property conservation, and (most recently), RNA watson-crick base pairing conservation for a given secondary structure contact pattern.

      These calculations are performed on either 1) the alignment as a whole, or 2) a group which specifies a set of sequences, and the calculation runs over a range of (visible) columns. The results of most calculations are visualised in alignment annotation rows added to the alignment before the calculation begins. In the case of conservation and consensus calculations, the result is also used in colour schemes that reflect the degree of conservation or consensus for specific positions in the alignment.

      Desired position:
      Future versions of Jalview should support an extensible 'instantaneous' calculation model, that permits developers to add new calculation models, and to perform calculations via web services.

      These calculations should be managed efficiently, in order that they are triggered in a timely manner after edits are performed, and that when they are triggered, they do not take all the available processor power on the users machine.

      It should also be possible for developers to specify a range of options and parameters for calculations, which Jalview will present within its user interface in a way that enables the user to easily modify default settings for new alignments, change current settings for an alignment, and also be able to modify settings for a particular calculation directly from a popup menu opened on the alignment annotation, group or alignment which is associated with its results. Settings should be serializable, enabling them to be stored in user preferences, in annotation, and jalview project files when associated with a particular alignment view or sequence group.

      Finally, there should be no constraint on the number of alignment annotation row or colourscheme associations that a particular calculation's result may be associated to (typically, relationships between an annotation row and its dependent calculation or data is 1:1, but in Jalview's existing scheme, the converse relationship is hardwired and mediated through the alignment viewport or sequence group holding the consensus or conservation result object).

      Optional considerations.
      It is often desirable to specify the display and parameters for calculations as command line arguments. An extensible command line argument model is needed for this (e.g. specify -showcalc <name> [-calcoptions "... series of options for calculation ...")

      Implementation requirements

      1. Calculation worker model
      The Executor/ThreadPool mechanism in java.util.concurrent should be adopted to manage calculations on the platform. An extension of the Callable/Runnable interface will created that enables an alignment dependent calculation to :
        i) advertise its user configurable parameters using the jalview parameter model
       ii) advertise its needed data (minimum number of input sequences, aligned (assumed?)), any constraints on the applicability of the calculation (e.g. DNA, protein or any type of sequence)
      iii) obtain its calculation parameters, input data and any existing result containers from the current context (which may be an alignment view, or group).
       iv) provide methods that generate template result container references for a calculation instance that can be unambiguously associated with the calculation worker and enable the calculation input conditions to be recreated
        v) identify when another calculation of the same type is running, and wait for it to complete (? perhaps make this a property of the scheduler??).
       vi) provide a means to advertise via its result visualization container whether it is currently updating the result set.


          Issue Links



              jprocter Jim Procter
              jprocter Jim Procter
              0 Vote for this issue
              0 Start watching this issue