Hi Jan -
Biojava deals with ambiguities using BasisSymbols. They are like a Symbol
that is the set of all Symbols that make it up. For example W contains the
Symbols A and T. For some details see:
http://www.biojava.org/docs/bj_in_anger/ambig.htm
You cannot say W == A as that would be testing canonical memory locations.
You can however say W == W as even ambiguities are singletons.
You can call the getMatches() method on one of these Symbols which will
give you an Alphabet that contains only those Symbols that match the
ambiguity. The contains() method of the resulting Alphabet will tell you
if any Symbol is contained by the ambiguity.
Some pseudo code for example:
Symbol w; //see biojava in anger site above for how to initialize this
symbol.
Symbol a = DNATools.a();
Symbol g = DNATools.g();
Alphabet ambig = w.getMathches();
ambig.contains(a); //true
ambig.contains(g); //false
Jan W�rthner <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
02/17/2004 01:08 AM
To: [EMAIL PROTECTED]
cc:
Subject: [Biojava-l] DNA 'weak' comparison
Hi folks,
is there a BioJava tool to compare two DNAs by category, like
'R'=='A': true
'Y'=='C': true
'N'=='G': true
'B'=='A': false
etc
?
kind regards
Jan
--
Jan W�rthner
Institute for Medical Microbiology
Building 22.21
Heinrich-Heine-University
Universit�tsstra�e 1
40225 Duesseldorf
Tel. +49 (0) 211 81 12461
URL: www.medmikro.uni-duesseldorf.de
_______________________________________________
Biojava-l mailing list - [EMAIL PROTECTED]
http://biojava.org/mailman/listinfo/biojava-l
_______________________________________________
Biojava-l mailing list - [EMAIL PROTECTED]
http://biojava.org/mailman/listinfo/biojava-l