Skip to content
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

Update annotate.py to fix a TypeError with annotations.py #29

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bananabenana
Copy link
Collaborator

Fixed error regarding unhashable SeqFeatures.

Error was as follows:

 warnings.warn(
Traceback (most recent call last):
  File "/projects/kr58/software/conda_envs/bactabolize_v1.0.1/bin/bactabolize", line 10, in <module>
    sys.exit(entry())
  File "/projects/kr58/software/conda_envs/bactabolize_v1.0.1/lib/python3.9/site-packages/bactabolize/main.py", line 23, in entry
    run_draft_model(config)
  File "/projects/kr58/software/conda_envs/bactabolize_v1.0.1/lib/python3.9/site-packages/bactabolize/main.py", line 49, in run_draft_model
    annotate.run(config.assembly_fp, config.assembly_genbank_fp)
  File "/projects/kr58/software/conda_envs/bactabolize_v1.0.1/lib/python3.9/site-packages/bactabolize/annotate.py", line 50, in run
    match_existing_orfs_updated_annotations(output_fp, assembly_genbank_fp)
  File "/projects/kr58/software/conda_envs/bactabolize_v1.0.1/lib/python3.9/site-packages/bactabolize/annotate.py", line 128, in match_existing_orfs_updated_annotations
    features_matched = discover_overlaps(positions, overlap_min)
  File "/projects/kr58/software/conda_envs/bactabolize_v1.0.1/lib/python3.9/site-packages/bactabolize/annotate.py", line 202, in discover_overlaps
    if (feature_new, feature_existing) in features_matched:
TypeError: unhashable type: 'SeqFeature'

Would you be able to test this @helena-bethany ?

Fixed error regarding unhashable SeqFeatures.

Error was as follows:

```bash
 warnings.warn(
Traceback (most recent call last):
  File "/projects/kr58/software/conda_envs/bactabolize_v1.0.1/bin/bactabolize", line 10, in <module>
    sys.exit(entry())
  File "/projects/kr58/software/conda_envs/bactabolize_v1.0.1/lib/python3.9/site-packages/bactabolize/main.py", line 23, in entry
    run_draft_model(config)
  File "/projects/kr58/software/conda_envs/bactabolize_v1.0.1/lib/python3.9/site-packages/bactabolize/main.py", line 49, in run_draft_model
    annotate.run(config.assembly_fp, config.assembly_genbank_fp)
  File "/projects/kr58/software/conda_envs/bactabolize_v1.0.1/lib/python3.9/site-packages/bactabolize/annotate.py", line 50, in run
    match_existing_orfs_updated_annotations(output_fp, assembly_genbank_fp)
  File "/projects/kr58/software/conda_envs/bactabolize_v1.0.1/lib/python3.9/site-packages/bactabolize/annotate.py", line 128, in match_existing_orfs_updated_annotations
    features_matched = discover_overlaps(positions, overlap_min)
  File "/projects/kr58/software/conda_envs/bactabolize_v1.0.1/lib/python3.9/site-packages/bactabolize/annotate.py", line 202, in discover_overlaps
    if (feature_new, feature_existing) in features_matched:
TypeError: unhashable type: 'SeqFeature'
```
@bananabenana bananabenana added the bug Something isn't working label Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant