applied-bioinformatics / An-Introduction-To-Applied-Bioinformatics

Interactive lessons in bioinformatics.
http://readIAB.org
Other
805 stars 316 forks source link

Section 2.2.6.1: evaluate_search uses current_queries variable name? #319

Open ryanjameskim opened 5 years ago

ryanjameskim commented 5 years ago

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

Expected Results

POTENTIAL SOLUTION

ebolyen commented 5 years ago

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)