package jgi; import fileIO.TextFile; /** * @author Brian Bushnell * @date Oct 10, 2012 * */ public class KmerSample { public static int[] makeKmerSet(int K, String filename){ //Number of bits in a kmer int kbits=2*K; //Number of possible kmers long kmerSpace=(1L<'){ //The line is name of a new contig/scaffold, so reset the kmer kmer=0; len=0; }else{ //Otherwise, generate kmers for(int i=0; i=K){ //If the kmer is long enough, then add it to the array //The index in the array is the upper bits of the kmer. Each location in the array is 32 bits. int index=(int)(kmer/32); //The bit within the word of the array is the lower 5 bits of the kmer int bit=(int)(kmer%32); //A bitmask to set the correct bit in the array to 1. int x=(1<