[Biojava-l] calculating properties of SymbolLists

Gerald Loeffler Gerald.Loeffler@vienna.at
Mon, 15 May 2000 10:33:13 +0200


Hi!

I need to calculate some properties (isoelectric point, molecular
weight, ...) of a protein sequence (which is of course a SymbolList) and
thought about introducing a general interface for this purpose:

public interface SymbolListPropertyCalculator {
  /**
   * calculate a property of the given symbol list and return it as an
Object.
   * @param sl the symbol list whose property should be calculate (may
not be null otherwise an
   *           IllegalArgumentException is thrown)
   * @return the calculated property. Never returns null.
   * @exception BioException if calculating the property was not
possible due to mis-usage of the
   *                         method, e.g. because the implementation
requires that the symbol list
   *                         be over a specific Alphabet but sl does not
fulfill this precondition.
   */
  Object calculateProperty(SymbolList sl) throws BioException;
}

The one could add implementations like

  MolecularWeightCalculator (returns the MW in kD as a Double)
  IsoelectricPointCalculator (requires the symbol list to be over the
protein alphabet, return the pI as a Double)

etc.

1) is this needed or is there another way of doing it in BioJava
2) does this make sense to you
3) in which package should this stuff go?

	cheers,
	gerald

-- 
   Gerald.Loeffler@vienna.at _________________ Software Architect
   http://www.imp.univie.ac.at ____ http://www.daemonstration.com
   OOA&D, Java, J2EE, JSP, Servlets, JavaBeans, ODBMS, RDBMS, XML