Giter VIP home page Giter VIP logo

kasearch's Issues

wifi traffic

Dear Developer,

I downloaded oasdb_small to my computer and tried to run search locally, but noticed there is a heavy wifi traffic. Is it normal? the search is done in a remote server or in a local computer? Thanks!

Create custom database example return KeyError -1 when doing EasySearch on new DB

Hi!
I've run your example notebooks both locally and on GoogleColab, and I always get a KeyError: -1 when doing the EasySearch on the new database.
I think the error may be due to how the database is generated because I'm able to run EasySearch when using oas-aligned-tiny.

Here is the traceback error that I get on GoogleColab:

---------------------------------------------------------------------------

KeyError                                  Traceback (most recent call last)

[<ipython-input-60-5ac3149581ac>](https://localhost:8080/#) in <cell line: 5>()
      3 query = 'QVQLQQSGAELARPGASVKLSCKASGYTFTSYWMQWVKQRPGQGLEWIGAIYPGDGDTRYTQKFKGKATLTADKSSSTAYMQLSSLASEDSAVYYCARGGLRRGAWFAYWGQGTLVTVS'
      4 
----> 5 results = EasySearch(query, 
      6                keep_best_n=10,
      7                database_path=path_to_save_new_db,

5 frames

[/usr/local/lib/python3.10/site-packages/kasearch/easy_search.py](https://localhost:8080/#) in EasySearch(query, keep_best_n, database_path, allowed_chain, allowed_species, regions, length_matched, include_ends, local_oas_path, n_jobs)
     54     targetdb.search(querydb[:1], keep_best_n=keep_best_n)
     55 
---> 56     return targetdb.get_meta(n_query=0, n_region=0, n_sequences='all', n_jobs=n_jobs)

[/usr/local/lib/python3.10/site-packages/kasearch/kasearch.py](https://localhost:8080/#) in get_meta(self, n_query, n_region, n_sequences, n_jobs)
    147         assert n_sequences > 0
    148 
--> 149         metadf = self._extract_meta(self.current_best_ids[n_query, :n_sequences, n_region], n_jobs=n_jobs)
    150         metadf['Identity'] = self.current_best_identities[n_query, :n_sequences, n_region]
    151         return metadf

[/usr/local/lib/python3.10/site-packages/kasearch/meta_extract.py](https://localhost:8080/#) in _extract_meta(self, idxs, n_jobs)
     77         n_jobs = n_groups if n_groups <  n_jobs else n_jobs
     78         chunksize= n_groups // n_jobs
---> 79 
     80         fetched_metadata = pd.concat(Parallel(n_jobs=n_jobs)(delayed(self._get_single_study_meta)(group) for group in groups))
     81 

[/usr/local/lib/python3.10/site-packages/joblib/parallel.py](https://localhost:8080/#) in __call__(self, iterable)
   1853             output = self._get_sequential_output(iterable)
   1854             next(output)
-> 1855             return output if self.return_generator else list(output)
   1856 
   1857         # Let's create an ID that uniquely identifies the current call. If the

[/usr/local/lib/python3.10/site-packages/joblib/parallel.py](https://localhost:8080/#) in _get_sequential_output(self, iterable)
   1782                 self.n_dispatched_batches += 1
   1783                 self.n_dispatched_tasks += 1
-> 1784                 res = func(*args, **kwargs)
   1785                 self.n_completed_tasks += 1
   1786                 self.print_progress()

[/usr/local/lib/python3.10/site-packages/kasearch/meta_extract.py](https://localhost:8080/#) in _get_single_study_meta(self, idxs)
     44         """  
     45         print('hi')
---> 46         study_id, line_ids = idxs[0,0], idxs[:,1]
     47         study_file = self.id_to_study[study_id]
     48 

KeyError: -1

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.