[Biojava-l] Gap: Basis Symbol vs Symbol
Matthew Pocock
mrp@sanger.ac.uk
Sun, 11 Feb 2001 14:32:33 +0000
> Hi Robin,
>
> Could you post the usage-case with the codons that is causing you
> trouble? There may be a quick-fix, or it may be showing up a fatal flaw
> with gaps.
>
> ----------------------
> What i am doing is comparing protein alignments in order to
> determine DNA alignments (similiar to nbalign at U of Oregon. When I step
> though the protein alignment I create the equivelent codon alignments in the
> DNA, using DNAXDNAXDNA Basis Symbols. When I encounter a gap, I insert
> alphabetmanager.getgapsymbol().
> Later when I am trying to convert the DNA to a string, it blows up
> because I have to do a getSymbols (which is from Basis symbol) and I hit the
> gaps which are Symbol. Ok, yes I could just check to make sure it is not a
> gap first, and in fact they may be better because even if it was a basis
> symbol, then I would want it to return --- not just -. However, if you read
> the header on the alphabet manager.java file above GapSymbol, it sounds like
> gaps are supposed to be universal.
> -Robin
Hi Robin,
I see what you mean. I've revised the docs to be more clear (and
accurate). At least this was spotted before release date. It turns out
that having gaps behave in the old way (gap == gap^n) causes lots of
problems. In your case, I think using gap^3 is the apropreate way to go
(should make all of your code work out seamlessly).
Bother me if anything falls over.
Matthew