| 1 |
package bin; |
| 2 |
|
| 3 |
import java.util.ArrayList; |
| 4 |
|
| 5 |
import fileIO.ByteStreamWriter; |
| 6 |
import ml.CellNet; |
| 7 |
import shared.Tools; |
| 8 |
import structures.ByteBuilder; |
| 9 |
import structures.FloatList; |
| 10 |
import tax.TaxTree; |
| 11 |
|
| 12 |
public class Oracle implements Cloneable { |
| 13 |
|
| 14 |
public Oracle(float maxGCDif_, float maxDepthRatio_, float max3merDif_, float maxKmerDif_, float max5merDif_, |
| 15 |
float maxProduct_, float maxCovariance_, float minKmerProb_, int minEdgeWeight_) { |
| 16 |
maxGCDif0=maxGCDif_; |
| 17 |
maxDepthRatio0=maxDepthRatio_; |
| 18 |
maxTrimerDif0=max3merDif_; |
| 19 |
maxKmerDif0=maxKmerDif_; |
| 20 |
max5merDif0=max5merDif_; |
| 21 |
maxProduct0=maxProduct_; |
| 22 |
maxCovariance0=maxCovariance_; |
| 23 |
minEdgeWeight=minEdgeWeight_; |
| 24 |
stringency0=1; |
| 25 |
minKmerProb0=minKmerProb_; |
| 26 |
if(BinObject.net0small!=null) {networkSmall=BinObject.net0small.copy(false);} |
| 27 |
if(BinObject.net0mid!=null) {networkMid=BinObject.net0mid.copy(false);} |
| 28 |
if(BinObject.net0large!=null) {networkLarge=BinObject.net0large.copy(false);} |
| 29 |
} |
| 30 |
|
| 31 |
public Oracle(float stringency, int minEdgeWeight_) { |
| 32 |
maxTrimerDif0=Binner.maxTrimerDif2*stringency; |
| 33 |
maxKmerDif0=Binner.maxKmerDif2*stringency; |
| 34 |
max5merDif0=Binner.max5merDif2*stringency; |
| 35 |
maxDepthRatio0=1+((Binner.maxDepthRatio2-1)*stringency); |
| 36 |
maxGCDif0=Binner.maxGCDif2*stringency; |
| 37 |
maxProduct0=maxKmerDif0*maxDepthRatio0*Binner.productMult; |
| 38 |
maxCovariance0=Binner.maxCovariance2*stringency; |
| 39 |
minKmerProb0=Binner.minKmerProb2; |
| 40 |
minEdgeWeight=minEdgeWeight_; |
| 41 |
stringency0=stringency; |
| 42 |
if(BinObject.net0small!=null) {networkSmall=BinObject.net0small.copy(false);} |
| 43 |
if(BinObject.net0mid!=null) {networkMid=BinObject.net0mid.copy(false);} |
| 44 |
if(BinObject.net0large!=null) {networkLarge=BinObject.net0large.copy(false);} |
| 45 |
} |
| 46 |
|
| 47 |
void clear() { |
| 48 |
best=null; |
| 49 |
bestIdx=-1; |
| 50 |
score=topScore=-1; |
| 51 |
} |
| 52 |
|
| 53 |
|
| 54 |
static final float similarity(float ratio_, float gcDif_, |
| 55 |
float simDif_, float covariance_, float kmerProb_, long edges_) { |
| 56 |
final float ratio=ratio_; |
| 57 |
final float gcDif=gcDif_+1f; |
| 58 |
final float simDif=simDif_*0.5f+1f; |
| 59 |
final float covariance=1+covariance_*32; |
| 60 |
float product=simDif*ratio*gcDif*covariance/kmerProb_; |
| 61 |
if(BinObject.verbose) { |
| 62 |
System.err.println(product+"="+simDif+"*"+ratio+"*"+gcDif+"*"+covariance+"/"+kmerProb_); |
| 63 |
} |
| 64 |
return 1f/product; |
| 65 |
} |
| 66 |
|
| 67 |
public final float similarity(Bin a, Bin b, float stringency0) { |
| 68 |
long size=Tools.min(a.size(), b.size()); |
| 69 |
float sizeMult=Binner.sizeAdjustMult(size); |
| 70 |
float stringency=stringency0*sizeMult; |
| 71 |
|
| 72 |
if(a.maxDepth()==0 || b.maxDepth()==0) { |
| 73 |
stringency*=0.8f; |
| 74 |
} |
| 75 |
float maxTrimerDif=maxTrimerDif0*stringency; |
| 76 |
float maxKmerDif=maxKmerDif0*stringency; |
| 77 |
float max5merDif=max5merDif0*stringency; |
| 78 |
float maxDepthRatio=1+((maxDepthRatio0-1)*stringency); |
| 79 |
float maxGCDif=maxGCDif0*stringency; |
| 80 |
float maxProduct=maxKmerDif*maxDepthRatio*Binner.productMult; |
| 81 |
maxProduct=Math.max(maxProduct, maxProduct0*sizeMult); |
| 82 |
float maxCovariance=maxCovariance0*stringency; |
| 83 |
float minProb=1-stringency0*(1-minKmerProb0); |
| 84 |
score=similarity(a, b, maxGCDif, maxDepthRatio, maxTrimerDif, maxKmerDif, max5merDif, |
| 85 |
maxProduct, maxCovariance, minProb); |
| 86 |
return score; |
| 87 |
} |
| 88 |
|
| 89 |
public static float edgeMult(long e1, long e2, long eT, float d1, float d2) { |
| 90 |
long minEdges=Tools.min(e1, e2); |
| 91 |
if(minEdges<Binner.minEdgeWeight) {return eT<Binner.minEdgeWeight ? 1f : Binner.goodTransEdgeMult;} |
| 92 |
long maxEdges=Tools.max(e1, e2); |
| 93 |
float depth=0.5f*(d1+d2); |
| 94 |
if(minEdges>Binner.lowDepthEdgeRatio*depth && maxEdges<Binner.highDepthEdgeRatio*depth) { |
| 95 |
return Binner.goodEdgeMult; |
| 96 |
} |
| 97 |
return eT<Binner.minEdgeWeight ? 1f : Binner.goodTransEdgeMult; |
| 98 |
} |
| 99 |
|
| 100 |
|
| 101 |
private final float similarity(Bin a, Bin b, float maxGCDif, float maxDepthRatio, float maxTrimerDif, |
| 102 |
float maxKmerDif, float max5merDif, float maxProduct, float maxCovariance, float minKmerProb) { |
| 103 |
|
| 104 |
fastComparisons++; |
| 105 |
|
| 106 |
if(BinObject.verbose || verbose2) { |
| 107 |
System.err.println("Comparing to "+b.id()+": "+ |
| 108 |
"maxKmerDif="+maxKmerDif+", maxDepthRatio="+maxDepthRatio+ |
| 109 |
", maxProduct="+maxProduct+", maxGCDif="+maxGCDif+ |
| 110 |
", maxCovariance="+maxCovariance); |
| 111 |
} |
| 112 |
final boolean sameLabel=(a.labelTaxid>0 && a.labelTaxid==b.labelTaxid); |
| 113 |
|
| 114 |
if(Binner.PERFECT_ORACLE) {return sameLabel ? 1-1f/b.size() : -1;} |
| 115 |
|
| 116 |
final float gcDif=Math.abs(a.gc()-b.gc()); |
| 117 |
final float depthRatio=a.depthRatio(b); |
| 118 |
final long minlen=Math.min(a.size(), b.size()); |
| 119 |
if(BinObject.verbose || verbose2) { |
| 120 |
System.err.println("gcdif="+gcDif); |
| 121 |
System.err.println("depthRatio="+depthRatio); |
| 122 |
} |
| 123 |
if(gcDif>maxGCDif*Binner.goodEdgeMult || |
| 124 |
depthRatio>maxDepthRatio*Binner.goodEdgeMult) { |
| 125 |
return -1; |
| 126 |
} |
| 127 |
|
| 128 |
final long edges1=useEdges ? a.countEdgesTo(b) : 0; |
| 129 |
final long edges2=useEdges ? b.countEdgesTo(a) : 0; |
| 130 |
final long minEdges=Tools.min(edges1, edges2); |
| 131 |
if(BinObject.verbose || verbose2) { |
| 132 |
System.err.println("A: size="+minlen+", e1="+edges1+", e2="+edges2+", minWeight="+minEdgeWeight); |
| 133 |
} |
| 134 |
final long edgesT=(minEdges>=Binner.minEdgeWeight ? minEdges : a.transEdgesTo(b)); |
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
float mult=edgeMult(edges1, edges2, edgesT, a.depthTotal(), b.depthTotal()); |
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
if(BinObject.verbose || verbose2) {System.err.println("B: mult="+mult+", gcdif="+gcDif+", max="+(maxGCDif*mult));} |
| 143 |
if(gcDif>maxGCDif*mult*Binner.cutoffMultD) {return -1;} |
| 144 |
float covariance=a.covariance(b); |
| 145 |
if(BinObject.verbose || verbose2) { |
| 146 |
System.err.println("C: depthRatio="+depthRatio+", max="+(maxDepthRatio*mult)+ |
| 147 |
", covariance="+covariance+", max="+(maxCovariance*mult)); |
| 148 |
} |
| 149 |
if(gcDif>maxGCDif*mult*Binner.cutoffMultD || depthRatio>maxDepthRatio*mult*Binner.cutoffMultD || |
| 150 |
covariance>maxCovariance*mult*Binner.cutoffMultD) {return -1;} |
| 151 |
if(!taxaOK(a.taxid(), b.taxid())) {return -1;} |
| 152 |
|
| 153 |
slowComparisons++; |
| 154 |
float tetramerDif=SimilarityMeasures.cosineDifference(a.tetramers, b.tetramers); |
| 155 |
float trimerDif=(SpectraCounter.countTrimers ? |
| 156 |
SimilarityMeasures.cosineDifference(a.trimers, b.trimers) : 0); |
| 157 |
float pentamerDif=(a.numPentamers<BinObject.minPentamerSizeCompare || |
| 158 |
b.numPentamers<BinObject.minPentamerSizeCompare ? 0 : |
| 159 |
SimilarityMeasures.cosineDifference(a.pentamers, b.pentamers)); |
| 160 |
|
| 161 |
final float product=tetramerDif*depthRatio; |
| 162 |
float kmerProb=KmerProb.prob(minlen, tetramerDif); |
| 163 |
kmerProb=1-(1-kmerProb)/mult; |
| 164 |
if(BinObject.verbose || verbose2) { |
| 165 |
System.err.println("D: kmerDif="+tetramerDif+", max="+(maxKmerDif*mult)+ |
| 166 |
", product="+product+", max="+(maxProduct*mult)); |
| 167 |
} |
| 168 |
|
| 169 |
if(tetramerDif>maxKmerDif*mult*Binner.cutoffMultA || trimerDif>maxTrimerDif*mult*Binner.cutoffMultA || |
| 170 |
pentamerDif>max5merDif*mult*Binner.cutoffMultA || product>maxProduct*mult*Binner.cutoffMultB || |
| 171 |
kmerProb<0.5f) { |
| 172 |
return -1; |
| 173 |
} |
| 174 |
|
| 175 |
final float similarity=similarity(depthRatio, gcDif, tetramerDif, covariance, kmerProb, Tools.min(edges1, edges2)); |
| 176 |
final float netOutput=runNetwork(a, b, minEdges, edgesT, gcDif, depthRatio, covariance, tetramerDif, trimerDif, similarity, false); |
| 177 |
|
| 178 |
if(BinObject.verbose || verbose2) { |
| 179 |
System.err.println("E: similarity="+similarity+", netOutput="+netOutput); |
| 180 |
} |
| 181 |
|
| 182 |
CellNet network=getNetwork(minlen); |
| 183 |
float mult2=mult; |
| 184 |
if(network!=null) { |
| 185 |
netComparisons++; |
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
if(netOutput>Binner.netCutoffUpper) { |
| 191 |
mult2*=Binner.netMultUpper; |
| 192 |
|
| 193 |
}else if(netOutput<Binner.netCutoffLower) { |
| 194 |
mult2*=Binner.netMultLower; |
| 195 |
} |
| 196 |
float ratio=netOutput/network.cutoff; |
| 197 |
|
| 198 |
mult2=(float)(mult2*ratio*ratio); |
| 199 |
} |
| 200 |
if(BinObject.verbose || verbose2) { |
| 201 |
System.err.println("F: mult="+mult+", kmerDif="+tetramerDif+", max="+(maxKmerDif*mult)+ |
| 202 |
", product="+product+", max="+(maxProduct*mult)+ |
| 203 |
"\n kmerProb="+kmerProb+", min="+(minKmerProb)); |
| 204 |
} |
| 205 |
|
| 206 |
float ret=netOutput; |
| 207 |
if(trimerDif>maxTrimerDif*mult2 || tetramerDif>maxKmerDif*mult2 || pentamerDif>max5merDif*mult2 || |
| 208 |
product>maxProduct*mult2 || kmerProb<minKmerProb) {ret=-1;} |
| 209 |
|
| 210 |
float mult3=(network==null ? mult : mult2*Binner.cutoffMultC); |
| 211 |
if(gcDif>maxGCDif*mult3 || depthRatio>maxDepthRatio*mult3 || covariance>maxCovariance*mult3) {ret=-1;} |
| 212 |
|
| 213 |
if(bsw!=null && canEmitVector(a, b, ret)) { |
| 214 |
if(sameLabel || Math.random()<=negativeEmitProb) { |
| 215 |
emitVector(a, b, bsw); |
| 216 |
} |
| 217 |
} |
| 218 |
|
| 219 |
if(Binner.BAN_BAD_MERGES && !sameLabel) {ret=-1;} |
| 220 |
return ret; |
| 221 |
} |
| 222 |
|
| 223 |
final float runNetwork(Bin a, Bin b, final long minEdges, final long transEdges, final float gcDif, |
| 224 |
final float depthRatio, final float covariance, final float kmerDif, final float trimerDif, |
| 225 |
final float similarity, boolean includeAnswer) { |
| 226 |
CellNet network=getNetwork(Math.min(a.size(), b.size())); |
| 227 |
if(network==null) {return similarity;} |
| 228 |
if(vector==null) {vector=new FloatList();} |
| 229 |
toVector(a, b, minEdges, transEdges, gcDif, depthRatio, |
| 230 |
covariance, kmerDif, trimerDif, similarity, vector, false); |
| 231 |
network.applyInput(vector); |
| 232 |
float result=network.feedForward(); |
| 233 |
return result; |
| 234 |
} |
| 235 |
|
| 236 |
static String header() { |
| 237 |
ByteBuilder bb=new ByteBuilder(); |
| 238 |
|
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
|
| 244 |
|
| 245 |
|
| 246 |
|
| 247 |
|
| 248 |
|
| 249 |
|
| 250 |
|
| 251 |
|
| 252 |
|
| 253 |
|
| 254 |
|
| 255 |
bb.append('#').append("aSize"); |
| 256 |
bb.tab().append("bGC"); |
| 257 |
bb.tab().append("gcDif"); |
| 258 |
bb.tab().append("depthRatio").tab().append("covariance"); |
| 259 |
bb.tab().append("bDepth"); |
| 260 |
bb.tab().append("numDepth").tab().append("kmerDif"); |
| 261 |
bb.tab().append("bEntrop"); |
| 262 |
bb.tab().append("entDif"); |
| 263 |
bb.tab().append("bSpec"); |
| 264 |
bb.tab().append("specDif"); |
| 265 |
bb.tab().append("minEdge"); |
| 266 |
bb.tab().append("similarity"); |
| 267 |
bb.tab().append("sameTax"); |
| 268 |
|
| 269 |
return bb.toString(); |
| 270 |
} |
| 271 |
|
| 272 |
FloatList toVector(Bin a, Bin b, FloatList list, boolean includeAnswer) { |
| 273 |
if(a.size()>b.size()) {return toVector(b, a, list, includeAnswer);} |
| 274 |
if(list==null) {list=new FloatList();} |
| 275 |
list.clear(); |
| 276 |
long edges1=a.countEdgesTo(b); |
| 277 |
long edges2=b.countEdgesTo(a); |
| 278 |
long minEdges=Tools.min(edges1, edges2); |
| 279 |
final long edgesT=(minEdges>=Binner.minEdgeWeight ? minEdges : a.transEdgesTo(b)); |
| 280 |
float gcDif=Math.abs(a.gc()-b.gc()); |
| 281 |
float depthRatio=a.depthRatio(b); |
| 282 |
float covariance=a.covariance(b); |
| 283 |
float kmerDif=SimilarityMeasures.calculateDifferenceAverage(a.tetramers, b.tetramers); |
| 284 |
float trimerDif=(SpectraCounter.countTrimers ? |
| 285 |
SimilarityMeasures.calculateDifferenceAverage(a.trimers, b.trimers) : 0f); |
| 286 |
|
| 287 |
long minlen=Math.min(a.size(), b.size()); |
| 288 |
final float kmerProb=KmerProb.prob(minlen, kmerDif); |
| 289 |
float similarity=similarity(depthRatio, gcDif, kmerDif, covariance, kmerProb, Tools.min(edges1, edges2)); |
| 290 |
|
| 291 |
return toVector(a, b, minEdges, edgesT, gcDif, depthRatio, covariance, kmerDif, trimerDif, similarity, list, includeAnswer); |
| 292 |
} |
| 293 |
|
| 294 |
FloatList toVector(Bin a, Bin b, final long minEdges, final long transEdges, final float gcDif, final float depthRatio, |
| 295 |
final float covariance, final float kmerDif, final float trimerDif, final float similarity, |
| 296 |
FloatList list, boolean includeAnswer) { |
| 297 |
if(a.size()>b.size()) { |
| 298 |
return toVector(b, a, minEdges, transEdges, gcDif, depthRatio, covariance, kmerDif, trimerDif, similarity, list, includeAnswer); |
| 299 |
} |
| 300 |
if(list==null) {list=new FloatList();} |
| 301 |
list.clear(); |
| 302 |
float depth=0.5f*(a.depthTotal()+b.depthTotal()+0.5f); |
| 303 |
|
| 304 |
long minlen=Math.min(a.size(), b.size()); |
| 305 |
|
| 306 |
|
| 307 |
|
| 308 |
if(printSizeInVector) { |
| 309 |
list.add(a.size()); |
| 310 |
list.add(a.numContigs()); |
| 311 |
list.add(b.size()); |
| 312 |
list.add(b.numContigs()); |
| 313 |
} |
| 314 |
list.add(0.1f*(float)Tools.log2(Tools.max(1, a.size()-64))); |
| 315 |
|
| 316 |
|
| 317 |
list.add(b.gc()); |
| 318 |
list.add(gcDif); |
| 319 |
list.add(kmerDif<0 || !Float.isFinite(kmerDif) ? 0 : kmerDif); |
| 320 |
list.add(trimerDif<0 || !Float.isFinite(trimerDif) ? 0 : trimerDif); |
| 321 |
list.add((float)(minEdges/depth)); |
| 322 |
list.add((float)(transEdges/depth)); |
| 323 |
list.add((float)(0.5f*Tools.log2(depthRatio))); |
| 324 |
list.add(covariance<0 || !Float.isFinite(covariance) ? 0 : (float)Math.sqrt(covariance)); |
| 325 |
|
| 326 |
list.add((float)(0.1f*Tools.log2(1+b.depthTotal()))); |
| 327 |
list.add(a.numDepths()>1 ? 1 : 0); |
| 328 |
list.add(a.numDepths()>2 ? 1 : 0); |
| 329 |
list.add(a.numDepths()>3 ? 1 : 0); |
| 330 |
list.add(a.numDepths()>4 ? (0.2f*(a.numDepths()-4)) : 0); |
| 331 |
|
| 332 |
list.add(8*(1-b.entropy)); |
| 333 |
list.add(8*Tools.absdif(a.entropy, b.entropy)); |
| 334 |
|
| 335 |
list.add(b.strandedness); |
| 336 |
list.add(8*Tools.absdif(a.strandedness, b.strandedness)); |
| 337 |
|
| 338 |
|
| 339 |
|
| 340 |
|
| 341 |
|
| 342 |
|
| 343 |
list.add(1-similarity); |
| 344 |
if(includeAnswer) { |
| 345 |
assert(a.labelTaxid>0 && b.labelTaxid>0) : a.labelTaxid+", "+b.labelTaxid+", "+a.name(); |
| 346 |
list.add(a.labelTaxid==b.labelTaxid ? 1 : 0); |
| 347 |
} |
| 348 |
list.shrink(); |
| 349 |
for(float f : list.array) { |
| 350 |
assert(Float.isFinite(f)) : list; |
| 351 |
} |
| 352 |
return list; |
| 353 |
} |
| 354 |
|
| 355 |
private boolean taxaOK(int aTaxid, int bTaxid) { |
| 356 |
if(!allowHalfTaxID && (aTaxid<1 || bTaxid<1)) {return false;} |
| 357 |
if(!allowNoTaxID && aTaxid<1 && bTaxid<1) {return false;} |
| 358 |
if(taxlevel<0 || BinObject.tree==null || aTaxid==bTaxid || aTaxid<1 || bTaxid<1) {return true;} |
| 359 |
int commonAncestorLevel=BinObject.tree.commonAncestorLevel(aTaxid, bTaxid); |
| 360 |
return (commonAncestorLevel<=taxlevel); |
| 361 |
} |
| 362 |
|
| 363 |
|
| 364 |
protected Oracle clone() { |
| 365 |
try { |
| 366 |
Oracle clone=(Oracle) super.clone(); |
| 367 |
clone.best=null; |
| 368 |
clone.vector=null; |
| 369 |
clone.networkSmall=(networkSmall==null ? null : networkSmall.copy(false)); |
| 370 |
clone.networkMid=(networkMid==null ? null : networkMid.copy(false)); |
| 371 |
clone.networkLarge=(networkLarge==null ? null : networkLarge.copy(false)); |
| 372 |
return clone; |
| 373 |
} catch (CloneNotSupportedException e) { |
| 374 |
throw new RuntimeException(e); |
| 375 |
} |
| 376 |
} |
| 377 |
|
| 378 |
static boolean canEmitVector(Bin a, Bin b, float result) { |
| 379 |
long minSize=Math.min(a.size(), b.size()); |
| 380 |
if(a.labelTaxid<1 || b.labelTaxid<1) {return false;} |
| 381 |
if(minSize<minEmitSize || minSize>maxEmitSize) {return false;} |
| 382 |
if(!a.pure() || !b.pure()) {return false;} |
| 383 |
boolean sameTID=(a.labelTaxid==b.labelTaxid); |
| 384 |
boolean merge=(result>0); |
| 385 |
final boolean ret; |
| 386 |
if(merge) {ret=(sameTID ? emitTP : emitFP);} |
| 387 |
else{ret=(sameTID ? emitFN : emitFP);} |
| 388 |
|
| 389 |
return ret; |
| 390 |
} |
| 391 |
|
| 392 |
void emitVector(Bin a, Bin b, ByteStreamWriter bsw) { |
| 393 |
assert(bsw!=null); |
| 394 |
long minlen=Tools.min(a.size(), b.size()); |
| 395 |
float prob=(minlen/4000f)*(minlen/2000f); |
| 396 |
if(Math.random()>prob) {return;} |
| 397 |
if(vector==null) {vector=new FloatList();} |
| 398 |
toVector(a, b, vector, true); |
| 399 |
emitVector(vector, bsw); |
| 400 |
} |
| 401 |
|
| 402 |
static void emitVector(FloatList vector, ByteStreamWriter bsw) { |
| 403 |
assert(bsw!=null); |
| 404 |
ByteBuilder bb=new ByteBuilder(); |
| 405 |
for(int i=0; i<vector.size(); i++) { |
| 406 |
if(i>0) {bb.tab();} |
| 407 |
bb.append(vector.get(i), 7, true); |
| 408 |
} |
| 409 |
synchronized(bsw) { |
| 410 |
bsw.print(bb.nl()); |
| 411 |
} |
| 412 |
} |
| 413 |
|
| 414 |
private CellNet getNetwork(long size) { |
| 415 |
if(size<Binner.minNetSize) {return null;} |
| 416 |
if(size<Binner.midNetSize) {return networkSmall;} |
| 417 |
if(size<Binner.largeNetSize) {return networkMid;} |
| 418 |
return networkLarge; |
| 419 |
} |
| 420 |
|
| 421 |
Bin best=null; |
| 422 |
float score=-1; |
| 423 |
float topScore=-1; |
| 424 |
int bestIdx=-1; |
| 425 |
|
| 426 |
long fastComparisons=0; |
| 427 |
long slowComparisons=0; |
| 428 |
long netComparisons=0; |
| 429 |
|
| 430 |
final float maxTrimerDif0; |
| 431 |
final float maxKmerDif0; |
| 432 |
final float max5merDif0; |
| 433 |
final float maxDepthRatio0; |
| 434 |
final float maxGCDif0; |
| 435 |
final float maxProduct0; |
| 436 |
final float maxCovariance0; |
| 437 |
final float minKmerProb0; |
| 438 |
final int minEdgeWeight; |
| 439 |
|
| 440 |
final float stringency0; |
| 441 |
private FloatList vector; |
| 442 |
private CellNet networkSmall; |
| 443 |
private CellNet networkMid; |
| 444 |
private CellNet networkLarge; |
| 445 |
|
| 446 |
int taxlevel=TaxTree.SPECIES; |
| 447 |
boolean allowNoTaxID=true; |
| 448 |
boolean allowHalfTaxID=true; |
| 449 |
boolean useEdges=true; |
| 450 |
|
| 451 |
static ByteStreamWriter bsw; |
| 452 |
static boolean emitTP=true; |
| 453 |
static boolean emitFP=true; |
| 454 |
static boolean emitTN=true; |
| 455 |
static boolean emitFN=true; |
| 456 |
static int minEmitSize=0; |
| 457 |
static int maxEmitSize=2000000000; |
| 458 |
static double negativeEmitProb=1; |
| 459 |
static boolean printSizeInVector=false; |
| 460 |
boolean verbose2=false; |
| 461 |
|
| 462 |
|
| 463 |
} |