[Biojava-l] DNA 'weak' comparison

mark.schreiber at group.novartis.com mark.schreiber at group.novartis.com
Mon Feb 16 20:27:10 EST 2004


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 <jan.wuerthner at uni-duesseldorf.de>
Sent by: biojava-l-bounces at portal.open-bio.org
02/17/2004 01:08 AM

 
        To:     biojava-l at biojava.org
        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  -  Biojava-l at biojava.org
http://biojava.org/mailman/listinfo/biojava-l






More information about the Biojava-l mailing list