Package versusSNP.genome

Examples of versusSNP.genome.Sequence


      BufferedReader br = new BufferedReader(new InputStreamReader(fis));
      while ((line = br.readLine())!=null) {
        if (line.length() != 0 && line.charAt(0)=='>') {
          if (name != null && !name.equals("")) {
            if (seq.length()!=0)
              sequences.add(new Sequence(name, seq.toString()));
          }
          name = line.substring(1);
          seq.delete(0, seq.length());
        }
        else {
          appendSequence(seq, line);
        }
      }
      //add the last sequence in the file
      if (name != null && !name.equals("")) {
        if (seq.length()!=0)
          sequences.add(new Sequence(name, seq.toString()));
      }
      if (sequences.size()==0) {
        JOptionPane.showMessageDialog(null, UICaption.dialog_error_fasta_contains_no_sequence, UICaption.dialog_caption_error, JOptionPane.ERROR_MESSAGE);
        return false;
      }
View Full Code Here

TOP

Related Classes of versusSNP.genome.Sequence

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.