Closed otienoanyango closed 4 months ago
Many thanks for the bug report!
This error came from line 2731 of NA_pairwise_interactions.py, and not line 273 as it says in the traceback.
Cause was an unusual case trying to use a variable that had not been defined. That is fixed now.
Testing on the latest representative set release, will update again if any more problems are found.
Fixed and closed. Thank you for the bug report!
From: Otieno Anyango @.> Sent: Friday, June 14, 2024 9:44 AM To: BGSU-RNA/fr3d-python @.> Cc: Subscribed @.***> Subject: [EXTERNAL] [BGSU-RNA/fr3d-python] UnboundLocalError: local variable 'LW_bond_rank' referenced before assignment (Issue #40)
https://www.ebi.ac.uk/pdbe/entry-files/download/8r3v.cif
Some CIF files fail with the above error:
Sample traceback for the 8r3v entry:
Traceback (most recent call last):
File "/venv/lib/python3.10/site-packages/orc/base/batchable.py", line 351, in process_remote
self.__process_entry(entry)
File "/venv/lib/python3.10/site-packages/orc/base/batchable.py", line 376, in __process_entry
self.process_entry(entry_id)
File "/venv/lib/python3.10/site-packages/orc/rna/pairwise_interactions.py", line 112, in process>
generatePairwiseAnnotation(
File "/venv/lib/python3.10/site-packages/fr3d/classifiers/NA_pairwise_interactions.py", line 323>
interaction_to_list_of_tuples, category_to_interactions, timerData, pair_to_data = annotate_nt_nt_in_structure(structure,categories,focused_bas>
File "/venv/lib/python3.10/site-packages/fr3d/classifiers/NA_pairwise_interactions.py", line 123>
interaction_to_list_of_tuples, category_to_interactions, timerData, pair_to_data = annotate_nt_nt_interactions(bases, nt_nt_screen_distance, ba>
File "/venv/lib/python3.10/site-packages/fr3d/classifiers/NA_pairwise_interactions.py", line 916>
interaction21, subcategory21, quality21, datapoint21 = check_basepair_cutoffs(nt2,nt1,pair_data,cutoffs,hydrogen_bonds,datapoint21)
File "/venv/lib/python3.10/site-packages/fr3d/classifiers/NA_pairwise_interactions.py", line 273>
for LW,bond_counter,checked_counter,max_badness in LW_bond_rank:
UnboundLocalError: local variable 'LW_bond_rank' referenced before assignment
Reading file /tmp/tmp3sy7_4d2/8r3v, which is number 1 out of 1
Duplicate annotation in second direction: ntWW and ntWWa for 8R3V|1|X2|C|49 and 8R3V|1|X2|C|16
http://rna.bgsu.edu/rna3dhub/display3D/unitid/8R3V|1|X2|C|16,8R3V|1|X2|C|49http://rna.bgsu.edu/rna3dhub/display3D/unitid/8R3V%7C1%7CX2%7CC%7C16,8R3V%7C1%7CX2%7CC%7C49
Using ntWW
http://rna.bgsu.edu/rna3dhub/display3D/unitid/8R3V|1|X2|A|20,8R3V|1|X2|C|57http://rna.bgsu.edu/rna3dhub/display3D/unitid/8R3V%7C1%7CX2%7CA%7C20,8R3V%7C1%7CX2%7CC%7C57
Multiple annotations meet all cutoffs, {'cWS', 'cWW'}
- Reply to this email directly, view it on GitHubhttps://github.com/BGSU-RNA/fr3d-python/issues/40, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAHQ7E7MEJ6RINICEL3E2A3ZHLXSVAVCNFSM6AAAAABJKMPWDGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM2TGNBRHE4DSNQ. You are receiving this because you are subscribed to this thread.Message ID: @.**@.>>
https://www.ebi.ac.uk/pdbe/entry-files/download/8r3v.cif
Some CIF files fail with the above error:
Sample traceback for the 8r3v entry: