[Biojava-l] ClassCastException during ambiguity calcul

mark.schreiber at group.novartis.com mark.schreiber at group.novartis.com
Wed Jan 14 20:54:58 EST 2004


Hi Eric -

I think the problem is caused by trying to determine the ambiguity for a 
set that contains the gap symbol. In reality there is no IUPAC ambiguity 
code for anything paired with a gap. An ambiguity is like saying either 
this nucleotide or this one (as in an ambiguous DNA sequence read). It 
can't really cover the concept of either this nucleotide or a gap

- Mark





Eric BELLARD <eric_bellard at yahoo.com>
Sent by: biojava-l-bounces at portal.open-bio.org
01/14/2004 06:40 PM
Please respond to eric

 
        To:     biojava-l at biojava.org
        cc: 
        Subject:        [Biojava-l] ClassCastException during ambiguity calcul


Hi,

I'm calculating ambiguity of symbol sets and i've got
a class cast exception. I've managed to isolate the
bug. The following code triggers the exception:

                                 Set lc_set = new HashSet();

                                 SymbolList lc_sequence = 
DNATools.createDNA("AG");

                                 Iterator lc_i = lc_sequence.iterator();
                                 while (lc_i.hasNext()) {

                                                 lc_set.add(lc_i.next());

                                 }

 lc_set.add(DNATools.getDNA().getGapSymbol());

                                 try {
                                                 Symbol lc_symbol =
DNATools.getDNA().getAmbiguity(lc_set);
 System.out.println(lc_symbol.getName());
                                 } catch (IllegalSymbolException e) {
                                                 throw e;
                                 }


If I don't add the gap symbol in the set I don't have
the exception.

Even an excpetion must be thrown during this code
execution, I don't think the class cast exception is
the good one.

Does someone have a clue? Is it a bug? Do you want me
to propose a fix?

I think I got good java skills but the worst
biological skill you've ever seen :-) 

Regards,

Eric

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus
_______________________________________________
Biojava-l mailing list  -  Biojava-l at biojava.org
http://biojava.org/mailman/listinfo/biojava-l





More information about the Biojava-l mailing list