Package edu.msu.cme.rdp.readseq.utils.orientation

Examples of edu.msu.cme.rdp.readseq.utils.orientation.GoodWordIterator


  public void testNext() throws IOException {
    System.out.println("testNext");
  
    String seq = "AAAAAAAAAG-CCCCCCCCUGAGGGUUACnAA";
    String seq2 = "NNNNNNNNNNNNNNNNNNNAUGACGGUAGCGACAGAAGAAGNNNNNNNNN";
    GoodWordIterator wordIt;
    int seqLen = seq.length();
    wordIt = new GoodWordIterator(seq);
    int numOfWords = wordIt.getNumofWords();
    //System.err.println("seqlen: " +seqLen + "  numOfWords: " + numOfWords );
    assertEquals( numOfWords, 14);
    if( wordIt.hasNext() ){
      assertEquals( wordIt.next(), 0);   //AAAAAAAA
    }
   
    wordIt.next();
   
    if( wordIt.hasNext() ){
      assertEquals( wordIt.next(),2);    //AAAAAAAG
    }
    if( wordIt.hasNext() ){
      assertEquals( wordIt.next(), ( 256*256 -1));   //CCCCCCCC
    }
    if( wordIt.hasNext() ){
      assertEquals(wordIt.next(), (256*256 -3));   //CCCCCCCU
    }
   
  
    wordIt = new GoodWordIterator(seq, 5);
    numOfWords = wordIt.getNumofWords();
   
    assertEquals( numOfWords, 5);
   
   
  }
View Full Code Here

TOP

Related Classes of edu.msu.cme.rdp.readseq.utils.orientation.GoodWordIterator

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.