Hi, I am new to Biojava. I have the following program, which is copied from ReadFaster2 in the cookbook.
public static void main(String[] args) { try { // args[0] is nr.fasta BufferedReader br = new BufferedReader(new FileReader(args[0])); String format = "FASTA"; String alphabet = "PROTEIN"; SequenceIterator iter = quenceIterator)SeqIOTools.fileToBiojava(format,alphabet, br); int count =0; long start = System.currentTimeMillis(); while(iter.hasNext()) { Sequence s = iter.nextSequence(); String name = s.getName(); //System.out.println(name); s.getAnnotation(); //System.out.println(s.seqString()); count ++; System.out.println(count); } long end = System.currentTimeMillis(); System.out.println("number of sequence " + count); System.out.println("time used" + (end-start)/1000 + "seconds"); System.out.println((end-start)/1000/60 + "minutes"); } catch (FileNotFoundException ex) { //can't find file specified by args[0] ex.printStackTrace(); }catch (BioException ex) { //error parsing requested format ex.printStackTrace(); } } When running this code, I got out of memory error in about half an hour and 1.5GB memory allocated. My workstation is a Windows XP with 2 GB of memory. My biojava version is 1.3. My JRE is one came with Websphere application developer. Thanks. Gem _______________________________________________ Biojava-l mailing list - Biojava-l@biojava.org http://biojava.org/mailman/listinfo/biojava-l