Debian Codegraph @

current/bloom/KmerCountAbstract.java

raw symbols SCIP
1 package bloom;
2
3 /**
4 * @author Brian Bushnell
5 * @date Dec 2, 2014
6 *
7 */
8 public abstract class KmerCountAbstract {
9
10 protected static final long[] transformToFrequency(int[] count){
11 long[] freq=new long[2000];
12 int max=freq.length-1;
13 for(int i=0; i<count.length; i++){
14 int x=count[i];
15 x=min(x, max);
16 freq[x]++;
17 }
18 return freq;
19 }
20
21 protected static final long sum(int[] array){
22 long x=0;
23 for(int y : array){x+=y;}
24 return x;
25 }
26
27 protected static final long sum(long[] array){
28 long x=0;
29 for(long y : array){x+=y;}
30 return x;
31 }
32
33 protected static final int min(int x, int y){return x<y ? x : y;}
34 protected static final int max(int x, int y){return x>y ? x : y;}
35
36 public static byte minQuality=6;
37 public static long readsProcessed=0;
38 public static long maxReads=-1;
39
40 public static float minProb=0.5f;
41
42 public static long keysCounted=0;
43 public static long increments=0;
44
45 public static final boolean verbose=false;
46 public static boolean PREJOIN=false;
47 public static boolean CANONICAL=false;
48 public static boolean KEEP_DUPLICATE_KMERS=true;
49 public static int KMERS_PER_READ=0;
50 public static int IDMASK=0;
51 public static int MAX_COUNT_THREADS=1024;
52 public static boolean SKETCH_MODE=false;
53 public static boolean STORE_HASHED=false;
54 public static boolean BUFFERED=false;
55 public static int BUFFERLEN=3000; //Optimal is in the range of 2000-8000 for Clumpified 2x150bp data.
56 // public static boolean SORT_SERIAL=false; //Not needed, see parallel sort flag
57
58 public static int maxShortKmerLength=31;
59
60 }