[Biojava-l] Setting weights with ambiguity

Schreiber, Mark mark.schreiber@agresearch.co.nz
Mon, 12 Aug 2002 12:06:27 +1200


Hi -

There is a subtle bug in Distribution where the setWeight(Symbol s,
double weight) method misbehaves when setting the wieght with an
ambiguity symbol. Currently the weight is added equally to all atomic
symbols that make up the ambiguity symbol. The getWeight(Symbol s) works
as you would expect.

Discussing this with Thomas we think there are two possible solutions:

1)	Throw an exception if setWeight is given an ambiguity symbol.
2)	Divide the weight amongst the atomic symbols that make up the
ambiguity on the basis of the null model.

I prefer 2 as it is more what you would expect. The current signature of
the setWeight method doesn't suggest the requirement for an Atomic
Symbol and changing it at this stage might break some peoples programs.

Possible lesson from this, it is safer  to "set weights" through a
trainer.

If no one has a better idea I will look at implementing option 2.

Mark Schreiber
Bioinformatics
AgResearch Invermay
PO Box 50034
Mosgiel
New Zealand
 
PH:   +64 3 489 9175
FAX:  +64 3 489 3739

=======================================================================
Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.
=======================================================================