Skip to content
This repository has been archived by the owner on Jul 20, 2021. It is now read-only.

Section 2.2.6.1: evaluate_search uses current_queries variable name? #319

Open
ryanjameskim opened this issue Nov 14, 2019 · 1 comment
Open

Comments

@ryanjameskim
Copy link

Describe the environment

What version of IAB are you reading (e.g. v0.0.1)?

iab version:
0.1.4.dev0

Describe the problem

Line 2 of function "evaluate_search" uses "current_queries" in search_function call, but evaluate_search parameter list lists 'queries' and uses 'queries' later to calculate query run times and step through query taxology pulls.

LINE 2 REPRODUCED HERE
search_results = search_function(current_queries, reference_db, n=n, aligner=aligner)

Is this correct or is the function using the module-level current_queries?

Steps to reproduce

  1. create new list of queries named, current_queries_two = random.sample(queries, k=5)
  2. replace current_queries to evaluate_search(current_queries_two, reference_db, reference_taxonomy, local_alignment_search, taxonomy_levels=taxonomy_levels)
  3. run

Observed Results

  • multiple traceback errors

Expected Results

  • would expect the evaluate_search function to run normally on a different named set of queries

POTENTIAL SOLUTION

  • seems to work again if you replace 'current_queries' in search_function call to just 'queries'
@ebolyen
Copy link
Collaborator

ebolyen commented Nov 15, 2019

Thanks for the report @ryanjameskim, I think this is indeed a typo which happens to work.

seems to work again if you replace 'current_queries' in search_function call to just 'queries'

Yep, I think that's the right solution here, would you be interested in providing a pull-request? (this can be done via the web-client if you like)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants