[Biojava-l] Gap: Basis Symbol vs Symbol

Emig, Robin Robin.Emig@maxygen.com
Fri, 9 Feb 2001 13:09:40 -0800


-----Original Message-----
From: biojava-l-admin@biojava.org [mailto:biojava-l-admin@biojava.org]On
Behalf Of Matthew Pocock
Sent: Friday, February 09, 2001 3:06 AM
To: Emig, Robin
Cc: 'biojava-l@biojava.org'
Subject: Re: [Biojava-l] Gap: Basis Symbol vs Symbol


Emig, Robin wrote:

> 	I have some code that uses codons with ambiguous bases using
> basissymbol. Problem is I also try to deal with gap symbols at the same
> time. I thought the idea behind the gap symbol was that it would be
> universal, ie gap or gapxgapxgap would be the same symbol. However, I
can't
> use my current code like that because I need to do a getsymbols, on
standard
> codons. This comes from the BasisSymbol. Since gap only implements Symbol,
> my code blows up when a gap is thrown in.
> 	We could have gap implement BasisSymbol or AtomicSymbol, any ideas
> why not?
> 	The workaround is that I will create a basis symbol which is
> gapxgapxgap and try to deal with it differently elsewhere( I really liked
> being able to just say AlphabetManager.getGapSymbol()) to deal with gaps.
> 	-Robin
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l@biojava.org
> http://biojava.org/mailman/listinfo/biojava-l

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

_______________________________________________
Biojava-l mailing list  -  Biojava-l@biojava.org
http://biojava.org/mailman/listinfo/biojava-l