daisybio / daisybio/NEASE

MS Tutorial Error

Open
#15 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
15
Forks
3
PR merge metrics
No merged PRs in 30d

Description

I tried to run the MS tutorial on a computer running macOS 26.6.2 but encountered an error:

user$ python
Python 3.12.8 | packaged by Anaconda, Inc. | (main, Dec 11 2024, 10:37:40) [Clang 14.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import nease
>>> import pandas as pd
>>> table=pd.read_table('AL_NAWM.deltapsi.tsv')
>>> events=nease.run(table, organism='Human',input_type='MAJIQ')
Processing MAJIQ format...
MAJIQ output converted successfully to NEASE format.

Data Summary
**************************************************
24 protein domains are affected by AS.

1 linear motifs are affected by AS.
7 interacting residue are affected by AS.

17 of the affected domains/motifs have known interactions.
181 protein interactions/binding affected.

**************************************************
Running enrichment analysis...
Traceback (most recent call last):
File "", line 1, in
File "/opt/miniconda3/lib/python3.12/site-packages/nease/nease.py", line 255, in __init__
self.enrichment=pathway_enrichment(self.g2edges,self.path, self.mapping,organism,p_value_cutoff,self.only_DDIs).reset_index(drop=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/lib/python3.12/site-packages/nease/functions.py", line 230, in pathway_enrichment
tmp=len([x for x in g2edges[gene] if x in path_genes ])
^^^^^^^^^^
UnboundLocalError: cannot access local variable 'path_genes' where it is not associated with a value

Trying the same code in a linux computing cluster resulted in a similar error:
NameError: cannot access free variable 'path_genes' where it is not associated with a value in enclosing scope

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the MS tutorial with AL_NAWM.deltapsi.tsv, then inspect nease.py around line 255 and functions.py around line 230, especially pathway_enrichment and the path_genes variable. Trace why enrichment reaches the list comprehension without path_genes initialized; done means the tutorial completes enrichment on the reported macOS and Linux inputs without either exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
pandas, python
Domain
bioinformatics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.