Skip to content

Commit

Permalink
Fix #149: Avoid promiscuous matching of gene name
Browse files Browse the repository at this point in the history
This needs to be follow up with additional checks

The same change might need to be done for other matching as well.
  • Loading branch information
samuell committed Jul 5, 2024
1 parent 3163a85 commit 264cb2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions microSALT/utils/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ def scrape_blast(self, type="", file_list=[]):
].capitalize()
#Ignores reference name and finds relevant resFinder entry

padder = [x for x in locilengths.keys() if x.startswith('>{}'.format(partials[1]))]
padder = [x for x in locilengths.keys() if x.startswith('>{}_'.format(partials[1]))]
if len(padder) == 0:
padder = [x for x in locilengths.keys() if x.startswith('>{}'.format(partials[1][:-1]))]
padder = [x for x in locilengths.keys() if x.startswith('>{}_'.format(partials[1][:-1]))]
try:
padder = padder[0]
except IndexError as e:
Expand Down

0 comments on commit 264cb2a

Please sign in to comment.