[Biojava-dev] RichSequence.Tools.enrich(..) generate NoSuchElementException

Janko Diminic jdiminic at gmail.com
Sat Jan 21 01:52:25 EST 2006


Hi, RichSequence.Tools.enrich(seq) generate NoSuchElementException exception:

// Samples.java class

    Set param = new HashSet();
    param.add("AJ278573");   // NCBI accession

    GenbankSequenceDB genBank = new GenbankSequenceDB();
    SequenceDB sequences = genBank.getSequences(param);

    sequenceIterator = sequences.sequenceIterator();

while (sequenceIterator.hasNext()) {
        try {
              Sequence seq = sequenceIterator.nextSequence();
              RichSequence enrichSeq = RichSequence.Tools.enrich(seq);
  //line:92,  here throw NoSuchElementException ???

              session.saveOrUpdate("Sequence", enrichSeq);

              } catch (NoSuchElementException e) {
                     e.printStackTrace();
              }
        }



java.util.NoSuchElementException
    at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:367)
    at java.util.LinkedHashMap$KeyIterator.next(LinkedHashMap.java:376)
    at org.biojavax.bio.seq.SimpleRichFeature.<init>(SimpleRichFeature.java:96)
    at org.biojavax.bio.seq.SimpleRichSequence.createFeature(SimpleRichSequence.java:323)
    at org.biojavax.bio.seq.RichSequence$Tools.enrich(RichSequence.java:434)
    at hr.Samples.main(Samples.java:92)


Do you know way?
Thanks for the help.



--
Janko Diminic



More information about the biojava-dev mailing list