allow for addition of SQLite table if `.db` file already exists
Opened this issue · 0 comments
dmx2 commented
human.db
file exists, but with human_5mers
- if database exists, just write a new table instead of throwing an error
[dan@foxp3 test]$ pepmatch-match -b -q mhc-ligands-test.fasta -p human.fasta
Traceback (most recent call last):
File "/home/dan/virtualenvs/python/bin/pepmatch-match", line 8, in <module>
sys.exit(run_matcher())
^^^^^^^^^^^^^
File "/home/dan/virtualenvs/python/lib/python3.11/site-packages/pepmatch/shell.py", line 58, in run_matcher
Matcher(**matcher_args).match()
File "/home/dan/virtualenvs/python/lib/python3.11/site-packages/pepmatch/matcher.py", line 211, in match
query_df = self._dataframe_matches(self.best_match_search())
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dan/virtualenvs/python/lib/python3.11/site-packages/pepmatch/matcher.py", line 683, in best_match_search
matches = self.exact_match_search()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dan/virtualenvs/python/lib/python3.11/site-packages/pepmatch/matcher.py", line 274, in exact_match_search
cursor.execute(sql_query, target_kmers)
sqlite3.OperationalError: no such table: human_9mers