()
| 449 | } |
| 450 | |
| 451 | @Override |
| 452 | public void run() { |
| 453 | System.out.println("[" + id + "] Parsing `" + path + "`..."); |
| 454 | |
| 455 | try { |
| 456 | Matcher mSeq = seqPattern.matcher(""); |
| 457 | |
| 458 | if (FastaReader.isCorrectFormat(path)) { |
| 459 | FastaReader fr = new FastaReader(path); |
| 460 | |
| 461 | String seq; |
| 462 | |
| 463 | long[] lHashVals = pitr.hValsL; |
| 464 | long[] rHashVals = pitr.hValsR; |
| 465 | long[] pHashVals = pitr.hValsP; |
| 466 | |
| 467 | if (existingKmersOnly) { |
| 468 | while (fr.hasNext()) { |
| 469 | seq = fr.next(); |
| 470 | mSeq.reset(seq); |
| 471 | |
| 472 | while (mSeq.find()) { |
| 473 | if (pitr.start(seq, mSeq.start(), mSeq.end())) { |
| 474 | while (pitr.hasNext()) { |
| 475 | pitr.next(); |
| 476 | if (graph.contains(lHashVals) && graph.contains(rHashVals)) { |
| 477 | graph.addReadSingleKmerPair(pHashVals); |
| 478 | } |
| 479 | } |
| 480 | } |
| 481 | } |
| 482 | |
| 483 | ++numReads; |
| 484 | } |
| 485 | } |
| 486 | else { |
| 487 | while (fr.hasNext()) { |
| 488 | seq = fr.next(); |
| 489 | mSeq.reset(seq); |
| 490 | |
| 491 | while (mSeq.find()) { |
| 492 | if (pitr.start(seq, mSeq.start(), mSeq.end())) { |
| 493 | while (pitr.hasNext()) { |
| 494 | pitr.next(); |
| 495 | graph.addReadSingleKmerPair(pHashVals); |
| 496 | } |
| 497 | } |
| 498 | } |
| 499 | |
| 500 | ++numReads; |
| 501 | } |
| 502 | } |
| 503 | |
| 504 | fr.close(); |
| 505 | } |
| 506 | else { |
| 507 | throw new RuntimeException("Unsupported file format detected in input file `" + path + "`. Only FASTA format is supported."); |
| 508 | } |
nothing calls this directly
no test coverage detected