Mercurial > repos > rliterman > csp2
comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/opt/bbmap-39.01-1/current/bloom/KmerCountAbstract.java @ 68:5028fdace37b
planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author | jpayne |
---|---|
date | Tue, 18 Mar 2025 16:23:26 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
67:0e9998148a16 | 68:5028fdace37b |
---|---|
1 package bloom; | |
2 | |
3 import shared.Shared; | |
4 | |
5 /** | |
6 * @author Brian Bushnell | |
7 * @date Dec 2, 2014 | |
8 * | |
9 */ | |
10 public abstract class KmerCountAbstract { | |
11 | |
12 protected static final long[] transformToFrequency(int[] count){ | |
13 long[] freq=new long[2000]; | |
14 int max=freq.length-1; | |
15 for(int i=0; i<count.length; i++){ | |
16 int x=count[i]; | |
17 x=min(x, max); | |
18 freq[x]++; | |
19 } | |
20 return freq; | |
21 } | |
22 | |
23 protected static final long sum(int[] array){ | |
24 long x=0; | |
25 for(int y : array){x+=y;} | |
26 return x; | |
27 } | |
28 | |
29 protected static final long sum(long[] array){ | |
30 long x=0; | |
31 for(long y : array){x+=y;} | |
32 return x; | |
33 } | |
34 | |
35 protected static final int min(int x, int y){return x<y ? x : y;} | |
36 protected static final int max(int x, int y){return x>y ? x : y;} | |
37 | |
38 public static byte minQuality=6; | |
39 public static long readsProcessed=0; | |
40 public static long maxReads=-1; | |
41 | |
42 public static float minProb=0.5f; | |
43 | |
44 public static long keysCounted=0; | |
45 public static long increments=0; | |
46 | |
47 public static final boolean verbose=false; | |
48 public static boolean PREJOIN=false; | |
49 public static boolean CANONICAL=false; | |
50 public static boolean KEEP_DUPLICATE_KMERS=true; | |
51 public static boolean SKETCH_MODE=false; | |
52 public static boolean STORE_HASHED=false; | |
53 public static boolean BUFFERED=false; | |
54 public static int BUFFERLEN=3000; //Optimal is in the range of 2000-8000 for Clumpified 2x150bp data. | |
55 // public static boolean SORT_SERIAL=false; //Not needed, see parallel sort flag | |
56 | |
57 public static int maxShortKmerLength=31; | |
58 | |
59 } |