[Biojava-l] Re: Bug in assembly behaviour

Thomas Down td2@sanger.ac.uk
Sat, 5 Jan 2002 16:27:48 +0000


On Sat, Jan 05, 2002 at 03:46:44PM +0000, David Huen wrote:
> 
> I have changed AssembledSequenceList.length() to return 0 on an empty list
> in my own copy.  Is this value compatible with other existing code?  if
> so, I will commit my change to CVS.

That should be fine -- thanks.

> The other issue is whether SimpleAssembly should be handling the
> extension of the AssembledSequenceList any further.  Will anything break
> if we just let the AssembledSequenceList do it itself?

Hmmm, not sure about this.  My original take on this was that
AssembledSymbolLength shouldn't be doing length management
at all -- that decision should be left to whatever code is
calling is.  The rationale behind this was that sometimes
the length of an assembly might be longer than the maximum
position of the last component.  (Think some of the human
chromsosomes, which have whole unsequenced arms).  Someone
else (Matthew?) wanted auto-length in AssembledSymbolList,
and there now seems to be some duplication.  I don't really
mind where the auto-extension gets handled, so long as it
remains possible to explicityly set the length of an
AssembledSymbolList to extend beyond the last component.

How about:

  - newly constructed AssembledSymbolList has length 0

  - This always get auto-extended when components get added
  
  - You can still explicitly set the length as well.  This
    should maybe throw an exception if you try to set a
    length which doesn't include all the components.

Then there shouldn't be any need at all for assembly
extension code in places like SimpleAssembly.

Does this make sense?

   Thomas.