|
15 | 15 | except ImportError: |
16 | 16 | from urllib import urlopen, urlretrieve |
17 | 17 | import argparse |
18 | | -version = """ stringMLST v0.5 (updated : January 5, 2018) """ |
| 18 | +version = """ stringMLST v0.5.1 (updated : January 5, 2018) """ |
19 | 19 | """ |
20 | 20 |
|
21 | 21 | stringMLST free for academic users and requires permission before any commercial |
@@ -515,7 +515,6 @@ def goodReads(read, k, non_overlapping_window): |
515 | 515 | s = str(line[n:n+k]) |
516 | 516 | if s in kmerDict[k]: |
517 | 517 | for probLoc in kmerDict[k][s]: |
518 | | - # print(probLoc) |
519 | 518 | if probLoc not in alleleCount: |
520 | 519 | alleleCount[probLoc] = {} |
521 | 520 | a = kmerDict[k][s][probLoc] |
@@ -592,20 +591,21 @@ def getMaxCount(alleleCount, fileName): |
592 | 591 | num_max2 = [] |
593 | 592 | compare = float(re.sub("\*$", "", str(max_n[loc]))) |
594 | 593 | for num in alleleCount[loc]: |
595 | | - if alleleCount[loc][num] == compare: |
| 594 | + if float(re.sub("\*$", "", str(alleleCount[loc][num]))) == compare: |
596 | 595 | if "\*" in str(max_n[loc]): |
597 | 596 | insert = num + '*' |
598 | 597 | num_max.append(insert) |
599 | 598 | else: |
600 | 599 | num_max.append(num) |
601 | 600 | maxSupport[loc][num] = max_n[loc] |
| 601 | + |
602 | 602 | if alleleCount[loc][num] == secondMax[loc]: |
603 | 603 | num_max2.append(num) |
604 | 604 | secondSupport[loc][num] = secondMax[loc] |
605 | 605 | try: |
606 | 606 | finalProfileCount[loc] = num_max[0] |
607 | 607 | except LookupError: |
608 | | - finalProfileCount[loc] = '0' |
| 608 | + finalProfileCount[loc] = 'yes' |
609 | 609 | msgs = "Max Support :" + fileName + " : " + str(maxSupport) |
610 | 610 | logging.debug(msgs) |
611 | 611 | msgs = "Second Max Support :" + fileName + " : " + str(secondSupport) |
|
0 commit comments