| 1 |
package sketch; |
| 2 |
|
| 3 |
import java.io.File; |
| 4 |
import java.io.PrintStream; |
| 5 |
import java.util.ArrayList; |
| 6 |
import java.util.Arrays; |
| 7 |
|
| 8 |
import dna.AminoAcid; |
| 9 |
import fileIO.FileFormat; |
| 10 |
import fileIO.ReadWrite; |
| 11 |
import jgi.BBMerge; |
| 12 |
import jgi.TranslateSixFrames; |
| 13 |
import prok.CallGenes; |
| 14 |
import prok.GeneCaller; |
| 15 |
import prok.Orf; |
| 16 |
import prok.ProkObject; |
| 17 |
import shared.Parse; |
| 18 |
import shared.Tools; |
| 19 |
import stream.ConcurrentReadInputStream; |
| 20 |
import stream.Read; |
| 21 |
import structures.ListNum; |
| 22 |
import tax.TaxNode; |
| 23 |
import tax.TaxTree; |
| 24 |
import tracker.EntropyTracker; |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
public class SketchMakerMini extends SketchObject { |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
public SketchMakerMini(SketchTool tool_, int mode_, DisplayParams params){ |
| 40 |
this(tool_, mode_, params.minEntropy, params.minProb, params.minQual); |
| 41 |
} |
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
public SketchMakerMini(SketchTool tool_, int mode_, float minEntropy_, float minProb_, byte minQual_){ |
| 47 |
|
| 48 |
tool=tool_; |
| 49 |
mode=mode_; |
| 50 |
minProb=minProb_; |
| 51 |
minQual=minQual_; |
| 52 |
rcomp=tool.rcomp; |
| 53 |
|
| 54 |
aminoShift=AminoAcid.AMINO_SHIFT; |
| 55 |
if(!aminoOrTranslate()){ |
| 56 |
shift=2*k; |
| 57 |
shift2=shift-2; |
| 58 |
mask=(shift>63 ? -1L : ~((-1L)<<shift)); |
| 59 |
}else{ |
| 60 |
shift=aminoShift*k; |
| 61 |
shift2=shift-aminoShift; |
| 62 |
mask=(shift>63 ? -1L : ~((-1L)<<shift)); |
| 63 |
} |
| 64 |
|
| 65 |
if(AUTOSIZE && (mode==ONE_SKETCH || mode==PER_FILE)){ |
| 66 |
heap=new SketchHeap(Tools.max(tool.stTargetSketchSize, (int)(80000*Tools.mid(1, AUTOSIZE_FACTOR, 32))), tool.minKeyOccuranceCount, tool.trackCounts); |
| 67 |
}else if(AUTOSIZE_LINEAR && (mode==ONE_SKETCH || mode==PER_FILE)){ |
| 68 |
heap=new SketchHeap(Tools.max(tool.stTargetSketchSize, (int)(10000000*Tools.mid(0.1, 2*AUTOSIZE_LINEAR_DENSITY, 0.00001))), |
| 69 |
tool.minKeyOccuranceCount, tool.trackCounts); |
| 70 |
}else{ |
| 71 |
heap=new SketchHeap(tool.stTargetSketchSize, tool.minKeyOccuranceCount, tool.trackCounts); |
| 72 |
} |
| 73 |
|
| 74 |
if(minEntropy_>0){ |
| 75 |
eTracker=new EntropyTracker(entropyK, k, (amino || translate), minEntropy_, true); |
| 76 |
}else{ |
| 77 |
eTracker=null; |
| 78 |
} |
| 79 |
|
| 80 |
if(translate || processSSU){ |
| 81 |
gCaller=CallGenes.makeGeneCaller(pgm); |
| 82 |
}else{ |
| 83 |
gCaller=null; |
| 84 |
} |
| 85 |
} |
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
public ArrayList<Sketch> toSketches(final String fname, float samplerate, long reads){ |
| 93 |
final FileFormat ffin1, ffin2; |
| 94 |
if(fname.indexOf('#')>=0 && FileFormat.isFastqExt(ReadWrite.rawExtension(fname)) && !new File(fname).exists()){ |
| 95 |
ffin1=FileFormat.testInput(fname.replaceFirst("#", "1"), FileFormat.FASTQ, null, true, true); |
| 96 |
ffin2=FileFormat.testInput(fname.replaceFirst("#", "2"), FileFormat.FASTQ, null, true, true); |
| 97 |
}else{ |
| 98 |
ffin1=FileFormat.testInput(fname, FileFormat.FASTA, null, true, true); |
| 99 |
ffin2=null; |
| 100 |
} |
| 101 |
return toSketches(ffin1, ffin2, samplerate, reads); |
| 102 |
} |
| 103 |
|
| 104 |
|
| 105 |
public ArrayList<Sketch> toSketches(FileFormat ffin1, FileFormat ffin2, float samplerate, long reads){ |
| 106 |
heap.clear(false); |
| 107 |
final String simpleName; |
| 108 |
|
| 109 |
|
| 110 |
final ConcurrentReadInputStream cris; |
| 111 |
{ |
| 112 |
simpleName=ffin1.simpleName(); |
| 113 |
heap.setFname(simpleName); |
| 114 |
cris=ConcurrentReadInputStream.getReadInputStream(reads, true, ffin1, ffin2, null, null); |
| 115 |
if(samplerate!=1){cris.setSampleRate(samplerate, sampleseed);} |
| 116 |
cris.start(); |
| 117 |
if(verbose){outstream.println("Started cris");} |
| 118 |
} |
| 119 |
if(mode==ONE_SKETCH || mode==PER_FILE){ |
| 120 |
if(heap.name0()==null){heap.setName0(simpleName);} |
| 121 |
} |
| 122 |
ArrayList<Sketch> sketches=processInner(cris); |
| 123 |
|
| 124 |
errorState|=ReadWrite.closeStream(cris); |
| 125 |
sketchesMade++; |
| 126 |
return sketches; |
| 127 |
} |
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
ArrayList<Sketch> processInner(ConcurrentReadInputStream cris){ |
| 135 |
assert(heap.size()==0); |
| 136 |
ArrayList<Sketch> sketches=new ArrayList<Sketch>(mode==ONE_SKETCH || mode==PER_FILE ? 1 : 8); |
| 137 |
|
| 138 |
|
| 139 |
ListNum<Read> ln=cris.nextList(); |
| 140 |
|
| 141 |
ArrayList<Read> reads=(ln!=null ? ln.list : null); |
| 142 |
|
| 143 |
|
| 144 |
while(ln!=null && reads!=null && reads.size()>0){ |
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
for(int idx=0; idx<reads.size(); idx++){ |
| 149 |
final Read r1=reads.get(idx); |
| 150 |
final Read r2=r1.mate; |
| 151 |
|
| 152 |
processReadPair(r1, r2); |
| 153 |
if(mode!=ONE_SKETCH && mode!=PER_FILE){ |
| 154 |
if(heap!=null && heap.size()>0 && heap.maxLen()>=Tools.max(1, minSketchSize)){ |
| 155 |
int size=heap.size(); |
| 156 |
Sketch sketch=new Sketch(heap, false, tool.trackCounts, null); |
| 157 |
assert(sketch.keys.length>0) : sketch.keys.length+", "+size; |
| 158 |
sketch.loadSSU(); |
| 159 |
sketches.add(sketch); |
| 160 |
sketchesMade++; |
| 161 |
} |
| 162 |
if(heap!=null){heap.clear(false);} |
| 163 |
} |
| 164 |
} |
| 165 |
|
| 166 |
|
| 167 |
cris.returnList(ln); |
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
ln=cris.nextList(); |
| 172 |
reads=(ln!=null ? ln.list : null); |
| 173 |
} |
| 174 |
|
| 175 |
|
| 176 |
if(ln!=null){ |
| 177 |
cris.returnList(ln.id, ln.list==null || ln.list.isEmpty()); |
| 178 |
} |
| 179 |
|
| 180 |
if(mode==ONE_SKETCH || mode==PER_FILE){ |
| 181 |
Sketch sketch=new Sketch(heap, false, tool.trackCounts, null); |
| 182 |
sketch.loadSSU(); |
| 183 |
sketches.add(sketch); |
| 184 |
sketchesMade++; |
| 185 |
} |
| 186 |
heap.clear(true); |
| 187 |
return sketches; |
| 188 |
} |
| 189 |
|
| 190 |
void processReadPair(Read r1, Read r2){ |
| 191 |
|
| 192 |
final int initialLength1=r1.length(); |
| 193 |
final int initialLength2=r1.mateLength(); |
| 194 |
|
| 195 |
|
| 196 |
readsProcessed+=r1.pairCount(); |
| 197 |
basesProcessed+=initialLength1+initialLength2; |
| 198 |
|
| 199 |
if(mode!=ONE_SKETCH && mode!=PER_FILE){ |
| 200 |
int expectedSize=toSketchSize(initialLength1+initialLength2, -1, -1, targetSketchSize); |
| 201 |
if(heap==null || heap.capacity()<expectedSize){heap=new SketchHeap(expectedSize, tool.minKeyOccuranceCount, tool.trackCounts);} |
| 202 |
} |
| 203 |
|
| 204 |
if(tool.mergePairs && r2!=null){ |
| 205 |
final int insert=BBMerge.findOverlapStrict(r1, r2, false); |
| 206 |
if(insert>0){ |
| 207 |
heap.genomeSequences++; |
| 208 |
r2.reverseComplement(); |
| 209 |
r1=r1.joinRead(insert); |
| 210 |
r2=null; |
| 211 |
} |
| 212 |
} |
| 213 |
|
| 214 |
processRead(r1); |
| 215 |
if(r2!=null){processRead(r2);} |
| 216 |
|
| 217 |
if(heap.name0()==null){ |
| 218 |
heap.setName0(r1.id); |
| 219 |
} |
| 220 |
|
| 221 |
TaxNode tn=null; |
| 222 |
if(heap.taxID<0 && r1.length()>800){ |
| 223 |
if(taxtree!=null){ |
| 224 |
try { |
| 225 |
tn=taxtree.parseNodeFromHeader(r1.id, true); |
| 226 |
} catch (Throwable e) {} |
| 227 |
if(tn!=null){ |
| 228 |
heap.taxID=tn.id; |
| 229 |
if(heap.taxName()==null){ |
| 230 |
heap.setTaxName(tn.name); |
| 231 |
} |
| 232 |
} |
| 233 |
|
| 234 |
}else{ |
| 235 |
heap.taxID=TaxTree.parseHeaderStatic(r1.id); |
| 236 |
|
| 237 |
} |
| 238 |
} |
| 239 |
assert(heap.taxID<0 || heap.taxName()!=null || taxtree==null) : heap.taxID+", "+heap.taxName()+", "+heap.name()+", "+tn; |
| 240 |
} |
| 241 |
|
| 242 |
public void processRead(final Read r){ |
| 243 |
if(amino){ |
| 244 |
processReadAmino(r); |
| 245 |
}else if(translate){ |
| 246 |
processReadTranslated(r); |
| 247 |
}else{ |
| 248 |
processReadNucleotide(r); |
| 249 |
} |
| 250 |
} |
| 251 |
|
| 252 |
public void processReadTranslated(final Read r){ |
| 253 |
assert(!r.aminoacid()); |
| 254 |
final ArrayList<Read> prots; |
| 255 |
if(sixframes){ |
| 256 |
if(processSSU && heap.r16S()==null && r.length()>=min_SSU_len && !useSSUMapOnly && !heap.isEukaryote()){ |
| 257 |
Orf orf=gCaller.makeRna(r.id, r.bases, ProkObject.r16S); |
| 258 |
if(orf!=null && orf.length()>=min_SSU_len){ |
| 259 |
assert(orf.is16S()); |
| 260 |
if(orf.is16S() && orf.length()>=heap.r16SLen()){heap.set16S(CallGenes.fetch(orf, r).bases);} |
| 261 |
} |
| 262 |
|
| 263 |
} |
| 264 |
prots=TranslateSixFrames.toFrames(r, true, false, 6); |
| 265 |
}else{ |
| 266 |
ArrayList<Orf> list; |
| 267 |
list=gCaller.callGenes(r); |
| 268 |
prots=CallGenes.translate(r, list); |
| 269 |
if(processSSU && heap.r16S()==null && r.length()>=min_SSU_len && !useSSUMapOnly && !heap.isEukaryote()){ |
| 270 |
for(Orf orf : list){ |
| 271 |
if(orf.is16S() && orf.length()>=min_SSU_len && orf.length()>=heap.r16SLen()){ |
| 272 |
heap.set16S(CallGenes.fetch(orf, r).bases); |
| 273 |
break; |
| 274 |
} |
| 275 |
} |
| 276 |
} |
| 277 |
} |
| 278 |
if(prots!=null){ |
| 279 |
for(Read p : prots){ |
| 280 |
processReadAmino(p); |
| 281 |
} |
| 282 |
} |
| 283 |
} |
| 284 |
|
| 285 |
public void processReadNucleotide(final Read r){ |
| 286 |
if(processSSU && heap.r16S()==null && r.length()>=min_SSU_len && !useSSUMapOnly && !heap.isEukaryote()){ |
| 287 |
Orf orf=gCaller.makeRna(r.id, r.bases, ProkObject.r16S); |
| 288 |
if(orf!=null && orf.length()>=min_SSU_len){ |
| 289 |
assert(orf.start>=0 && orf.stop<r.length()) : r.length()+"\n"+orf; |
| 290 |
assert(orf.is16S()); |
| 291 |
if(orf.is16S() && orf.length()>=heap.r16SLen()){heap.set16S(CallGenes.fetch(orf, r).bases);} |
| 292 |
} |
| 293 |
|
| 294 |
} |
| 295 |
|
| 296 |
final byte[] bases=r.bases; |
| 297 |
final byte[] quals=r.quality; |
| 298 |
final long[] baseCounts=heap.baseCounts(true); |
| 299 |
long kmer=0; |
| 300 |
long rkmer=0; |
| 301 |
int len=0; |
| 302 |
assert(!r.aminoacid()); |
| 303 |
|
| 304 |
final boolean noBlacklist=!(Blacklist.exists() || Whitelist.exists()); |
| 305 |
final long min=minHashValue; |
| 306 |
heap.genomeSizeBases+=r.length(); |
| 307 |
heap.genomeSequences++; |
| 308 |
if(eTracker!=null){eTracker.clear();} |
| 309 |
|
| 310 |
|
| 311 |
|
| 312 |
if(quals==null || (minProb<=0 && minQual<2)){ |
| 313 |
|
| 314 |
for(int i=0; i<bases.length; i++){ |
| 315 |
|
| 316 |
byte b=bases[i]; |
| 317 |
long x=AminoAcid.baseToNumber[b]; |
| 318 |
long x2=AminoAcid.baseToComplementNumber[b]; |
| 319 |
|
| 320 |
kmer=((kmer<<2)|x)&mask; |
| 321 |
rkmer=((rkmer>>>2)|(x2<<shift2))&mask; |
| 322 |
if(eTracker!=null){eTracker.add(b);} |
| 323 |
if(x<0){ |
| 324 |
len=0; |
| 325 |
rkmer=0; |
| 326 |
}else{ |
| 327 |
len++; |
| 328 |
baseCounts[(int)x]++; |
| 329 |
} |
| 330 |
|
| 331 |
|
| 332 |
|
| 333 |
|
| 334 |
|
| 335 |
if(len>=k){ |
| 336 |
kmersProcessed++; |
| 337 |
heap.genomeSizeKmers++; |
| 338 |
|
| 339 |
if(eTracker==null || eTracker.passes()){ |
| 340 |
|
| 341 |
|
| 342 |
|
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
final long hashcode=hash(kmer, rkmer, rcomp); |
| 348 |
|
| 349 |
if(hashcode>min){ |
| 350 |
if(noBlacklist){ |
| 351 |
heap.add(hashcode); |
| 352 |
}else{ |
| 353 |
heap.checkAndAdd(hashcode); |
| 354 |
} |
| 355 |
} |
| 356 |
}else{ |
| 357 |
|
| 358 |
|
| 359 |
} |
| 360 |
} |
| 361 |
} |
| 362 |
}else{ |
| 363 |
int zeroQualityKmers=0; |
| 364 |
int positiveQualityKmers=0; |
| 365 |
|
| 366 |
float prob=1; |
| 367 |
for(int i=0; i<bases.length; i++){ |
| 368 |
final byte b=bases[i]; |
| 369 |
final long x=AminoAcid.baseToNumber[b]; |
| 370 |
final long x2=AminoAcid.baseToComplementNumber[b]; |
| 371 |
|
| 372 |
kmer=((kmer<<2)|x)&mask; |
| 373 |
rkmer=((rkmer>>>2)|(x2<<shift2))&mask; |
| 374 |
if(eTracker!=null){eTracker.add(b);} |
| 375 |
|
| 376 |
final byte q=quals[i]; |
| 377 |
{ |
| 378 |
assert(q>=0) : Arrays.toString(quals)+"\n"+minProb+", "+minQual; |
| 379 |
|
| 380 |
|
| 381 |
|
| 382 |
|
| 383 |
|
| 384 |
|
| 385 |
|
| 386 |
prob=prob*align2.QualityTools.PROB_CORRECT[q]; |
| 387 |
if(len>k){ |
| 388 |
byte oldq=quals[i-k]; |
| 389 |
prob=prob*align2.QualityTools.PROB_CORRECT_INVERSE[oldq]; |
| 390 |
} |
| 391 |
if(x<0 || q<minQual){ |
| 392 |
len=0; |
| 393 |
kmer=rkmer=0; |
| 394 |
prob=1; |
| 395 |
}else{ |
| 396 |
len++; |
| 397 |
baseCounts[(int)x]++; |
| 398 |
} |
| 399 |
} |
| 400 |
|
| 401 |
if(len>=k){ |
| 402 |
kmersProcessed++; |
| 403 |
if(prob>=minProb){ |
| 404 |
heap.genomeSizeKmers++; |
| 405 |
heap.probSum+=prob; |
| 406 |
if(eTracker==null || eTracker.passes()){ |
| 407 |
final long hashcode=hash(kmer, rkmer, rcomp); |
| 408 |
|
| 409 |
if(hashcode>min){ |
| 410 |
if(noBlacklist){ |
| 411 |
heap.add(hashcode); |
| 412 |
}else{ |
| 413 |
heap.checkAndAdd(hashcode); |
| 414 |
} |
| 415 |
} |
| 416 |
}else{ |
| 417 |
|
| 418 |
} |
| 419 |
positiveQualityKmers++; |
| 420 |
}else if(q<=2){ |
| 421 |
zeroQualityKmers++; |
| 422 |
} |
| 423 |
} |
| 424 |
|
| 425 |
|
| 426 |
|
| 427 |
|
| 428 |
|
| 429 |
|
| 430 |
|
| 431 |
|
| 432 |
|
| 433 |
|
| 434 |
|
| 435 |
|
| 436 |
|
| 437 |
|
| 438 |
|
| 439 |
|
| 440 |
|
| 441 |
} |
| 442 |
if(minProb>0 && zeroQualityKmers>100 && positiveQualityKmers==0){ |
| 443 |
if(looksLikePacBio(r)){ |
| 444 |
synchronized(this){ |
| 445 |
minProb=0; |
| 446 |
} |
| 447 |
processReadNucleotide(r); |
| 448 |
} |
| 449 |
} |
| 450 |
} |
| 451 |
|
| 452 |
} |
| 453 |
|
| 454 |
boolean looksLikePacBio(Read r){ |
| 455 |
if(r.length()<302 || r.mate!=null){return false;} |
| 456 |
if(r.quality==null){ |
| 457 |
int x=Parse.parseZmw(r.id); |
| 458 |
return x>=0; |
| 459 |
} |
| 460 |
int positive=0; |
| 461 |
int zero=0; |
| 462 |
int ns=0; |
| 463 |
for(int i=0; i<r.bases.length; i++){ |
| 464 |
byte b=r.bases[i]; |
| 465 |
byte q=r.quality[i]; |
| 466 |
if(b=='N'){ns++;} |
| 467 |
else if(q==0 || q==2){ |
| 468 |
zero++; |
| 469 |
}else{ |
| 470 |
positive++; |
| 471 |
} |
| 472 |
} |
| 473 |
return zero>=r.length()/2 && positive==0; |
| 474 |
} |
| 475 |
|
| 476 |
void processReadAmino(final Read r){ |
| 477 |
final byte[] bases=r.bases; |
| 478 |
long kmer=0; |
| 479 |
int len=0; |
| 480 |
assert(r.aminoacid()); |
| 481 |
|
| 482 |
final boolean noBlacklist=!(Blacklist.exists() || Whitelist.exists()); |
| 483 |
final long min=minHashValue; |
| 484 |
heap.genomeSizeBases+=r.length(); |
| 485 |
heap.genomeSequences++; |
| 486 |
|
| 487 |
for(int i=0; i<bases.length; i++){ |
| 488 |
byte b=bases[i]; |
| 489 |
long x=AminoAcid.acidToNumberNoStops[b]; |
| 490 |
kmer=((kmer<<aminoShift)|x)&mask; |
| 491 |
|
| 492 |
|
| 493 |
if(x<0){len=0;}else{len++;} |
| 494 |
if(len>=k){ |
| 495 |
kmersProcessed++; |
| 496 |
heap.genomeSizeKmers++; |
| 497 |
|
| 498 |
|
| 499 |
long hashcode=hash(kmer, kmer); |
| 500 |
if(hashcode>min){ |
| 501 |
if(noBlacklist){ |
| 502 |
heap.add(hashcode); |
| 503 |
}else{ |
| 504 |
heap.checkAndAdd(hashcode); |
| 505 |
} |
| 506 |
} |
| 507 |
|
| 508 |
} |
| 509 |
} |
| 510 |
} |
| 511 |
|
| 512 |
void processReadAmino_old_no_entropy(final Read r){ |
| 513 |
final byte[] bases=r.bases; |
| 514 |
long kmer=0; |
| 515 |
int len=0; |
| 516 |
assert(r.aminoacid()); |
| 517 |
|
| 518 |
final boolean noBlacklist=!(Blacklist.exists() || Whitelist.exists()); |
| 519 |
final long min=minHashValue; |
| 520 |
heap.genomeSizeBases+=r.length(); |
| 521 |
heap.genomeSequences++; |
| 522 |
|
| 523 |
for(int i=0; i<bases.length; i++){ |
| 524 |
byte b=bases[i]; |
| 525 |
long x=AminoAcid.acidToNumberNoStops[b]; |
| 526 |
kmer=((kmer<<aminoShift)|x)&mask; |
| 527 |
if(x<0){len=0;}else{len++;} |
| 528 |
if(len>=k){ |
| 529 |
kmersProcessed++; |
| 530 |
heap.genomeSizeKmers++; |
| 531 |
long hashcode=hash(kmer, kmer); |
| 532 |
if(hashcode>min){ |
| 533 |
if(noBlacklist){ |
| 534 |
heap.add(hashcode); |
| 535 |
}else{ |
| 536 |
heap.checkAndAdd(hashcode); |
| 537 |
} |
| 538 |
} |
| 539 |
} |
| 540 |
} |
| 541 |
} |
| 542 |
|
| 543 |
public Sketch toSketch(int minCount){ |
| 544 |
Sketch sketch=null; |
| 545 |
if(heap!=null && heap.size()>0){ |
| 546 |
try { |
| 547 |
sketch=new Sketch(heap, false, tool.trackCounts, null, minCount); |
| 548 |
} catch (Throwable e) { |
| 549 |
|
| 550 |
e.printStackTrace(); |
| 551 |
} |
| 552 |
heap.clear(false); |
| 553 |
} |
| 554 |
return sketch; |
| 555 |
} |
| 556 |
|
| 557 |
public void add(SketchMakerMini smm){ |
| 558 |
heap.add(smm.heap); |
| 559 |
readsProcessed+=smm.readsProcessed; |
| 560 |
basesProcessed+=smm.basesProcessed; |
| 561 |
kmersProcessed+=smm.kmersProcessed; |
| 562 |
sketchesMade+=smm.sketchesMade; |
| 563 |
pacBioDetected|=smm.pacBioDetected; |
| 564 |
} |
| 565 |
|
| 566 |
public boolean isEmpty() { |
| 567 |
return heap==null || heap.size()<1; |
| 568 |
} |
| 569 |
|
| 570 |
public float minEntropy() { |
| 571 |
|
| 572 |
return eTracker==null ? -1 : eTracker.cutoff(); |
| 573 |
} |
| 574 |
|
| 575 |
public SketchHeap heap() {return heap;} |
| 576 |
|
| 577 |
|
| 578 |
|
| 579 |
|
| 580 |
|
| 581 |
|
| 582 |
|
| 583 |
|
| 584 |
|
| 585 |
|
| 586 |
|
| 587 |
|
| 588 |
boolean success=false; |
| 589 |
|
| 590 |
SketchHeap heap; |
| 591 |
|
| 592 |
final int aminoShift; |
| 593 |
final int shift; |
| 594 |
final int shift2; |
| 595 |
final long mask; |
| 596 |
final EntropyTracker eTracker; |
| 597 |
final GeneCaller gCaller; |
| 598 |
|
| 599 |
|
| 600 |
|
| 601 |
|
| 602 |
public long readsProcessed=0; |
| 603 |
|
| 604 |
public long basesProcessed=0; |
| 605 |
|
| 606 |
public long kmersProcessed=0; |
| 607 |
|
| 608 |
public long sketchesMade=0; |
| 609 |
|
| 610 |
float minProb() {return minProb;} |
| 611 |
byte minQual() {return minQual;} |
| 612 |
public boolean pacBioDetected=false; |
| 613 |
private float minProb; |
| 614 |
private byte minQual; |
| 615 |
|
| 616 |
|
| 617 |
|
| 618 |
|
| 619 |
|
| 620 |
private final SketchTool tool; |
| 621 |
private final boolean rcomp; |
| 622 |
final int mode; |
| 623 |
|
| 624 |
|
| 625 |
|
| 626 |
|
| 627 |
|
| 628 |
|
| 629 |
private PrintStream outstream=System.err; |
| 630 |
|
| 631 |
public static boolean verbose=false; |
| 632 |
|
| 633 |
public boolean errorState=false; |
| 634 |
|
| 635 |
} |