question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

diffSplice ERROR:__main__:Unknown error: (<class 'UnboundLocalError'>, UnboundLocalError("local variable 'i' referenced before assignment",), <traceback object at 0x7fede986dd48>)

See original GitHub issue

Hi I am getting this cryptic error with suppa 2.3. Most of the other splice types are working fine.

suppa.py diffSplice         --method empirical         --input suppa_results/treated_vs_untreated/AS_events/events_SE_variable_10.ioe         --psi suppa_results/treated_vs_untreated/SE_CONTROL.psi suppa_results/treated_vs_untreated/SE_EXPERIMENT.psi         --tpm suppa_results/treated_vs_untreated/quantification/CONTROL.tsv suppa_results/treated_vs_untreated/quantification/EXPERIMENT.tsv         --area 1000         -gc         --lower-bound 0.00         --gene-correction         --output Delta_psi_SE --mode DEBUG
Calculating differential analysis between conditions: SE_CONTROL and SE_EXPERIMENT 
ERROR:__main__:Unknown error: (<class 'UnboundLocalError'>, UnboundLocalError("local variable 'i' referenced before assignment",), <traceback object at 0x7fede986dd48>)

Here are the relevant files. They should be public: https://debugsuppa.s3.amazonaws.com/CONTROL.tsv https://debugsuppa.s3.amazonaws.com/events_SE_variable_10.ioe https://debugsuppa.s3.amazonaws.com/EXPERIMENT.tsv https://debugsuppa.s3.amazonaws.com/SE_CONTROL.psi https://debugsuppa.s3.amazonaws.com/SE_EXPERIMENT.psi https://debugsuppa.s3.amazonaws.com/iso_tpm_enst.txt

Thanks!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
leipzigcommented, Jul 16, 2021

Thanks for your quick response - you saved me many hours of frustration there. Also thank you for developing SUPPA - it’s wicked fast!

0reactions
EduEyrascommented, Jul 16, 2021

Sorry about the cryptic message.

I tried running the command and reproduced your error.

After a quick look at the files, I saw that there are may nan’s

If you use the option -nan followed by a proportion (e.g. 0.5) it will run.

I tried with -nan 0.5 but only a handful of events were actually computed. You may have to increase the proportion.

I hope this helps

E.

On Fri, 16 Jul 2021 at 22:37, Jeremy Leipzig @.***> wrote:

That sounds possible I guess but then why would the other splice types (RI/AF/AL/A3/A5) work? I’m only having trouble with SE and MX.

head suppa_results/treated_vs_untreated/quantification/CONTROL.tsv SRR5009496 SRR5009521 SRR5009474 ENST00000456328.2 0.0 0.0 0.0 ENST00000450305.2 0.0 0.0 0.0 ENST00000488147.1 0.0 0.0 0.0 ENST00000619216.1 0.0 0.0 0.0

head suppa_results/treated_vs_untreated/quantification/EXPERIMENT.tsv SRR5009526 SRR5009487 SRR5009515 SRR5009514 SRR5009491 SRR5009381 SRR5009378 SRR5009464 SRR5009377 SRR5009459 SRR5009462 SRR5009453 ENST00000456328.2 0.18568199999999999 0.494968 0.0 0.0 1.628541 0.0 0.0 0.15219100000000002 1.448901 1.2963120000000001 1.17858 0.9594950000000001

head suppa_results/treated_vs_untreated/SE_CONTROL.psi SRR5009496 SRR5009521 SRR5009474 ENSG00000000003.15;SE:chrX:100630866-100632485:100632568-100633405:- nan nan nan ENSG00000000419.14;SE:chr20:50936262-50940865:50940933-50942031:- nan 0.03340755493129439 0.013264581195062677 ENSG00000000419.14;SE:chr20:50936262-50940865:50940955-50942031:- nan 0.02759745072023724 0.012574818141055624 ENSG00000000419.14;SE:chr20:50940933-50941105:50941209-50942031:- nan nan nan

head suppa_results/treated_vs_untreated/SE_EXPERIMENT.psi SRR5009526 SRR5009487 SRR5009515 SRR5009514 SRR5009491 SRR5009381 SRR5009378 SRR5009464 SRR5009377 SRR5009459 SRR5009462 SRR5009453 ENSG00000000003.15;SE:chrX:100630866-100632485:100632568-100633405:- 1.0 nan nan nan nan nan nan 1.0 nan 1.0 nan 0.995263396293768 ENSG00000000419.14;SE:chr20:50936262-50940865:50940933-50942031:- 0.8524355095811136 0.0508111372373003 nan nan 0.03936167118208868 nan nan 0.8445154133415559 0.002848009427951285 0.8966774526302875 0.0 0.8877515463175047

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/comprna/SUPPA/issues/127#issuecomment-881415587, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCZKB7JFUOHMBJ57GUKRLTTYARXPANCNFSM5APODPSQ .

– Prof. E Eyras EMBL Australia Group Leader The John Curtin School of Medical Research - Australian National University https://github.com/comprna http://scholar.google.com/citations?user=LiojlGoAAAAJ

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python 3: UnboundLocalError: local variable referenced ...
Naturally, this creates a variable inside the function's scope called Var1 (truthfully, ... local variable 'f' referenced before assignment.
Read more >
diffSplice returns an error for a parameter that is already set #32
I got following error message when I tried to use diffSplice function for ... UnboundLocalError("local variable 'i' referenced before ...
Read more >
UnboundLocalError: local variable referenced before ...
In Python, variables that are only referenced inside a function are implicitly global. If a variable is assigned a value anywhere within the ......
Read more >
UnboundLocalError Local Variable 'index' Referenced Before ...
The Problem The exception UnboundLocalError: local variable 'index' referenced before assignment happens in Python when you use a global ...
Read more >
Local Variable Referenced Before Assignment - STechies
The “local variable referenced before assignment” error occurs when you give reference of a local variable without assigning any value. Example:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found