-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor: Bug fixes #529
Merged
Minor: Bug fixes #529
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
GopiGugan
commented
May 31, 2024
- Error generating epicov data #523
- CORS policy blocking fetch request of lab/submitted info #526
- Missing a lot of sequences #528
Running into an error: 🏄 [5:29:08.903094] Identifying lineage representative genomes
Traceback (most recent call last):
File "/home/covizu/covizu/batch.py", line 291, in <module>
timetree, residuals = build_timetree(non_recomb, args, callback=cb.callback)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/covizu/covizu/covizu/utils/batch_utils.py", line 81, in build_timetree
fasta = covizu.treetime.retrieve_genomes(by_lineage, known_seqs=lineages, ref_file=args.ref,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/covizu/covizu/covizu/treetime.py", line 214, in retrieve_genomes
records = covizu.utils.batch_utils.unpack_records(records)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/covizu/covizu/covizu/utils/batch_utils.py", line 38, in unpack_records
typ, pos, alt = mutation.split('|')
^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 3, got 1) |
diff --git a/covizu/utils/batch_utils.py b/covizu/utils/batch_utils.py
index fb80882..aeb6bd1 100644
--- a/covizu/utils/batch_utils.py
+++ b/covizu/utils/batch_utils.py
@@ -35,7 +35,11 @@ def unpack_records(records):
# reconstitute the mutations defining this variant
diffs = []
for mutation in key.split(','):
- typ, pos, alt = mutation.split('|')
+ try:
+ typ, pos, alt = mutation.split('|')
+ except ValueError:
+ # Handle case when there are no diffs
+ continue
if typ == '-':
alt = int(alt) # number of nucleotides in indel
diffs.append(tuple([typ, int(pos), alt])) |
🏄 [6:43:12.942563] Recoding features, compressing variants..
Traceback (most recent call last):
File "/home/covizu/covizu/batch.py", line 322, in <module>
result, infection_prediction = make_beadplots(by_lineage, args, cb.callback, t0=cb.t0.timestamp(), updated_lineages=updated_lineages)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/covizu/covizu/covizu/utils/batch_utils.py", line 329, in make_beadplots
union = dict([("{0}|{1}|{2}".format(*feat), idx) for feat, idx in union.items()])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/covizu/covizu/covizu/utils/batch_utils.py", line 329, in <listcomp>
union = dict([("{0}|{1}|{2}".format(*feat), idx) for feat, idx in union.items()])
^^^^^^^^^^^^^^^^^^^^^^^^^^^
IndexError: Replacement index 1 out of range for positional args tuple |
Patching #530 and rebuilding database |
Database has been re-built successfully |
Has this been deployed to the webserver? Page is still displaying old data. |
No, a dry run was done previously. I've started another run. The data will be updated by tomorrow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.