Package kmer

Examples of kmer.ProteinKmerCountFeatureVector.parseKmersFromSequence()


 
  /** Test for {@link ProteinKmerCountFeatureVectorTest#ProteinKmerFeatureVector(byte[])}. */
  public void testPrintKmers() {   
    ProteinKmerCountFeatureVector vector = new ProteinKmerCountFeatureVector(3, 20);
   
    vector.parseKmersFromSequence("AVAA");
   
    System.out.println(vector.printKmers());
   
    assertTrue(true);
  }
View Full Code Here


        vector.getKmerLength())];
   
    initializeBytes(testBytes);
    testBytes[0] = (byte) 0x1;
   
    vector.parseKmersFromSequence(sequence);
    byte[] bytes = vector.getFeatureVector();

    System.out.println(vector.printByteVector());
    System.out.println(printByteVector(testBytes));
   
View Full Code Here

    assertTrue(equalBytes(bytes, testBytes));
   
    sequence = "AR";

    vector = new ProteinKmerCountFeatureVector(2, 20);
    vector.parseKmersFromSequence(sequence);
    bytes = vector.getFeatureVector();
   
    testBytes[0] = (byte) 0x0;
    testBytes[1] = (byte) 0x1;
   
View Full Code Here

    assertTrue(equalBytes(bytes, testBytes));
   
    sequence = "AV";
   
    vector = new ProteinKmerCountFeatureVector(2, 20);
    vector.parseKmersFromSequence(sequence);
    bytes = vector.getFeatureVector();
   
    testBytes[1] = (byte) 0x0;
    testBytes[19] = (byte) 0x1;
   
View Full Code Here

    assertTrue(equalBytes(bytes, testBytes));
   
    sequence = "VV";
   
    vector = new ProteinKmerCountFeatureVector(2, 20);
    vector.parseKmersFromSequence(sequence);
    bytes = vector.getFeatureVector();
   
    testBytes[19] = (byte) 0x0;
    testBytes[399] = (byte) 0x1;
   
View Full Code Here

  public void testincrementCountAtPosition() {

    ProteinKmerCountFeatureVector vector = new ProteinKmerCountFeatureVector(2, 20);
   
    String sequence = "AAAAAAAA";
    vector.parseKmersFromSequence(sequence);
    assertEquals(vector.getFeatureVector()[0], 7);
   
    vector = new ProteinKmerCountFeatureVector(3, 20);
   
    sequence = "ARARARARAR";
View Full Code Here

   
    vector = new ProteinKmerCountFeatureVector(3, 20);
   
    sequence = "ARARARARAR";
   
    vector.parseKmersFromSequence(sequence);
    assertEquals(vector.getFeatureVector()[vector.getIndexForSequence("ARA")],
        vector.getFeatureVector()[vector.getIndexForSequence("RAR")])
  }
 
  private void initializeBytes(byte[] bytes) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.