comprna / SUPPA

SUPPA: Fast quantification of splicing and differential splicing
MIT License
263 stars 62 forks source link

UnboundLocalError("local variable 'i' referenced before assignment",) #191

Closed happypiggyzjx closed 5 months ago

happypiggyzjx commented 5 months ago

Dear suppa dev team: Hello, regarding the following issue I have done my best to try the solutions of other people who have encountered the same or similar issues, but the problem persists. Please allow me to describe to you the problem in detail and the various measures I have taken:

First, the code that generates the .ioe file is: python3.4 /home/zhaojiaxin/anaconda3/envs/suppa/bin/suppa.py \ generateEvents \ -f ioe \ -e SE SS MX RI FL \ -i /hot_warm_data/wangduo/reference/Homo_sapiens.GRCh38.109.gtf \ -o /cold_data/zhaojiaxin/suppa/test/suppa

The output file for this step is: /colddata/zhaojiaxin/suppalr/test/suppalr_strict.ioe, such as :/cold_data/zhaojiaxin/suppalr/test/suppalr_SE_strict.ioe; /cold_data/zhaojiaxin/suppalr/test/suppalr_RI_strict.ioe...

*The .gtf file used here is the one that has been processed in some way, and it works perfectly fine when running short reads of long data, meanwhile I tried to re-generate the .ioe file by downloading Homo_sapiens.GRCh38.109.gtf from the Ensembl official website and running the subsequent commands, and the problem still exists. So I don't think the problem is related to the original .gtf file.

Next is the code that is having problems: python3.4 /home/zhaojiaxin/anaconda3/envs/suppa/bin/suppa.py \ diffSplice \ --method empirical \ --input /cold_data/zhaojiaxin/suppalr/test/suppalr_RI_strict.ioe \ --psi \ /cold_data/zhaojiaxin/suppalr/test/D5.psi \ /cold_data/zhaojiaxin/suppalr/test/D6.psi \ --tpm \ /cold_data/zhaojiaxin/suppalr/test/D5.tpm \ /cold_data/zhaojiaxin/suppalr/test/D6.tpm \ --area 1000 \ --lower-bound 0.05 \ -gc \ -o /cold_data/zhaojiaxin/suppalr/test/D5vsD6_RI

The error is reported as follows: ERROR:main:Unknown error: (<class 'UnboundLocalError'>, UnboundLocalError("local variable 'i' referenced before assignment",), <traceback object at 0x70754ea65448>)

For the relevant documents involved in the command, I have listed the first few lines below: /cold_data/zhaojiaxin/suppalr/test/suppalr_RI_strict.ioe: seqname gene_id event_id alternative_transcripts total_transcripts 3 ENSG00000066422 ENSG00000066422;RI:3:101671130:101671361-101671978:101672213:- ENST00000704112 ENST00000312938,ENST00000690624,ENST00000688910,ENST00000689142,ENST00000690651,ENST00000704111,ENST00000704112 3 ENSG00000206560 ENSG00000206560;RI:3:15686002:15686119-15686222:15686309:- ENST00000498524 ENST00000683139,ENST00000399451,ENST00000624145,ENST00000497037,ENST00000451422,ENST00000498524,ENST00000412318 3 ENSG00000144848 ENSG00000144848;RI:3:112532510:112532780-112534269:112534337:- ENST00000402314 ENST00000402314,ENST00000283290 3 ENSG00000114391 ENSG00000114391;RI:3:101681105:101682492-101682771:101682907:- ENST00000704286,ENST00000704287 ENST00000704286,ENST00000704287,ENST00000469605

/cold_data/zhaojiaxin/suppalr/test/D5.psi: ONT_GRM_R01_01 ONT_GRM_R07_07 ONT_GRM_R13_13 ENSG00000000003;SE:X:100630866-100632485:100632568-100633405:- nan nan 1.0 ENSG00000000419;SE:20:50936262-50940865:50940933-50942031:- nan nan nan ENSG00000000419;SE:20:50936262-50940865:50940955-50942031:- nan nan nan ENSG00000000419;SE:20:50940933-50941105:50941209-50942031:- nan nan nan

/cold_data/zhaojiaxin/suppalr/test/D5.tpm: ONT_GRM_R01_01 ONT_GRM_R07_07 ONT_GRM_R13_13 DQ459412 0.0 0.0 0.0 DQ459413 0.0 0.0 0.0 DQ459415 0.0 0.0 0.0 DQ459418 0.0 0.0 0.0

It should be specifically noted that only the event SE can execute and generate the result file without any problems. Checking github for previous similar issues, I tried the following:

  1. Make sure the .psi and .tpm files are titled correctly and uniformly, tab-delimited, with no extra symbols.
  2. Add the parameters -nan, -th. The problem is not solved and the same error is reported. This question has been bothering me for a long time and I look forward to your expertise and that of your partners!
EduEyras commented 5 months ago

Have you tried to copy the code from github directly rather than the conda install?

The github code may have the fix and this was not updated in the conda install

Please let me know if that's the case

E.

On Tue, 18 Jun 2024 at 17:13, happypiggy @.***> wrote:

Dear suppa dev team: Hello, regarding the following issue I have done my best to try the solutions of other people who have encountered the same or similar issues, but the problem persists. Please allow me to describe to you the problem in detail and the various measures I have taken:

First, the code that generates the .ioe file is: python3.4 /home/zhaojiaxin/anaconda3/envs/suppa/bin/suppa.py generateEvents -f ioe -e SE SS MX RI FL -i /hot_warm_data/wangduo/reference/Homo_sapiens.GRCh38.109.gtf -o /cold_data/zhaojiaxin/suppa/test/suppa

The output file for this step is: /cold_data/zhaojiaxin/suppalr/test/suppalr__strict.ioe, such as :/cold_data/zhaojiaxin/suppalr/test/suppalr_SE_strict.ioe; /cold_data/zhaojiaxin/suppalr/test/suppalr_RI_strict.ioe...

*The .gtf file used here is the one that has been processed in some way, and it works perfectly fine when running short reads of long data, meanwhile I tried to re-generate the .ioe file by downloading Homo_sapiens.GRCh38.109.gtf from the Ensembl official website and running the subsequent commands, and the problem still exists. So I don't think the problem is related to the original .gtf file.

Next is the code that is having problems: python3.4 /home/zhaojiaxin/anaconda3/envs/suppa/bin/suppa.py diffSplice --method empirical --input /cold_data/zhaojiaxin/suppalr/test/suppalr_RI_strict.ioe --psi /cold_data/zhaojiaxin/suppalr/test/D5.psi /cold_data/zhaojiaxin/suppalr/test/D6.psi --tpm /cold_data/zhaojiaxin/suppalr/test/D5.tpm /cold_data/zhaojiaxin/suppalr/test/D6.tpm --area 1000 --lower-bound 0.05 -gc -o /cold_data/zhaojiaxin/suppalr/test/D5vsD6_RI

The error is reported as follows: ERROR:main:Unknown error: (<class 'UnboundLocalError'>, UnboundLocalError("local variable 'i' referenced before assignment",), <traceback object at 0x70754ea65448>)

For the relevant documents involved in the command, I have listed the first few lines below: /cold_data/zhaojiaxin/suppalr/test/suppalr_RI_strict.ioe: seqname gene_id event_id alternative_transcripts total_transcripts 3 ENSG00000066422 ENSG00000066422;RI:3:101671130:101671361-101671978:101672213:- ENST00000704112 ENST00000312938,ENST00000690624,ENST00000688910,ENST00000689142,ENST00000690651,ENST00000704111,ENST00000704112 3 ENSG00000206560 ENSG00000206560;RI:3:15686002:15686119-15686222:15686309:- ENST00000498524 ENST00000683139,ENST00000399451,ENST00000624145,ENST00000497037,ENST00000451422,ENST00000498524,ENST00000412318 3 ENSG00000144848 ENSG00000144848;RI:3:112532510:112532780-112534269:112534337:- ENST00000402314 ENST00000402314,ENST00000283290 3 ENSG00000114391 ENSG00000114391;RI:3:101681105:101682492-101682771:101682907:- ENST00000704286,ENST00000704287 ENST00000704286,ENST00000704287,ENST00000469605

/cold_data/zhaojiaxin/suppalr/test/D5.psi: ONT_GRM_R01_01 ONT_GRM_R07_07 ONT_GRM_R13_13 ENSG00000000003;SE:X:100630866-100632485:100632568-100633405:- nan nan 1.0 ENSG00000000419;SE:20:50936262-50940865:50940933-50942031:- nan nan nan ENSG00000000419;SE:20:50936262-50940865:50940955-50942031:- nan nan nan ENSG00000000419;SE:20:50940933-50941105:50941209-50942031:- nan nan nan

/cold_data/zhaojiaxin/suppalr/test/D5.tpm: ONT_GRM_R01_01 ONT_GRM_R07_07 ONT_GRM_R13_13 DQ459412 0.0 0.0 0.0 DQ459413 0.0 0.0 0.0 DQ459415 0.0 0.0 0.0 DQ459418 0.0 0.0 0.0

It should be specifically noted that only the event SE can execute and generate the result file without any problems. Checking github for previous similar issues, I tried the following:

  1. Make sure the .psi and .tpm files are titled correctly and uniformly, tab-delimited, with no extra symbols.
  2. Add the parameters -nan, -th. The problem is not solved and the same error is reported. This question has been bothering me for a long time and I look forward to your expertise and that of your partners!

— Reply to this email directly, view it on GitHub https://github.com/comprna/SUPPA/issues/191, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCZKBYW6JJY7ERRZRUTIR3ZH7M3JAVCNFSM6AAAAABJPM7PNSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM2TSMJRGY3DOMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

happypiggyzjx commented 5 months ago

Have you tried to copy the code from github directly rather than the conda install? The github code may have the fix and this was not updated in the conda install Please let me know if that's the case E. On Tue, 18 Jun 2024 at 17:13, happypiggy @.> wrote: Dear suppa dev team: Hello, regarding the following issue I have done my best to try the solutions of other people who have encountered the same or similar issues, but the problem persists. Please allow me to describe to you the problem in detail and the various measures I have taken: First, the code that generates the .ioe file is: python3.4 /home/zhaojiaxin/anaconda3/envs/suppa/bin/suppa.py generateEvents -f ioe -e SE SS MX RI FL -i /hot_warm_data/wangduo/reference/Homo_sapiens.GRCh38.109.gtf -o /cold_data/zhaojiaxin/suppa/test/suppa The output file for this step is: /cold_data/zhaojiaxin/suppalr/test/suppalr__strict.ioe, such as :/cold_data/zhaojiaxin/suppalr/test/suppalr_SE_strict.ioe; /cold_data/zhaojiaxin/suppalr/test/suppalr_RI_strict.ioe... The .gtf file used here is the one that has been processed in some way, and it works perfectly fine when running short reads of long data, meanwhile I tried to re-generate the .ioe file by downloading Homo_sapiens.GRCh38.109.gtf from the Ensembl official website and running the subsequent commands, and the problem still exists. So I don't think the problem is related to the original .gtf file. Next is the code that is having problems: python3.4 /home/zhaojiaxin/anaconda3/envs/suppa/bin/suppa.py diffSplice --method empirical --input /cold_data/zhaojiaxin/suppalr/test/suppalr_RI_strict.ioe --psi /cold_data/zhaojiaxin/suppalr/test/D5.psi /cold_data/zhaojiaxin/suppalr/test/D6.psi --tpm /cold_data/zhaojiaxin/suppalr/test/D5.tpm /cold_data/zhaojiaxin/suppalr/test/D6.tpm --area 1000 --lower-bound 0.05 -gc -o /cold_data/zhaojiaxin/suppalr/test/D5vsD6_RI The error is reported as follows: ERROR:main:Unknown error: (<class 'UnboundLocalError'>, UnboundLocalError("local variable 'i' referenced before assignment",), <traceback object at 0x70754ea65448>) For the relevant documents involved in the command, I have listed the first few lines below: /cold_data/zhaojiaxin/suppalr/test/suppalr_RI_strict.ioe: seqname gene_id event_id alternative_transcripts total_transcripts 3 ENSG00000066422 ENSG00000066422;RI:3:101671130:101671361-101671978:101672213:- ENST00000704112 ENST00000312938,ENST00000690624,ENST00000688910,ENST00000689142,ENST00000690651,ENST00000704111,ENST00000704112 3 ENSG00000206560 ENSG00000206560;RI:3:15686002:15686119-15686222:15686309:- ENST00000498524 ENST00000683139,ENST00000399451,ENST00000624145,ENST00000497037,ENST00000451422,ENST00000498524,ENST00000412318 3 ENSG00000144848 ENSG00000144848;RI:3:112532510:112532780-112534269:112534337:- ENST00000402314 ENST00000402314,ENST00000283290 3 ENSG00000114391 ENSG00000114391;RI:3:101681105:101682492-101682771:101682907:- ENST00000704286,ENST00000704287 ENST00000704286,ENST00000704287,ENST00000469605 /cold_data/zhaojiaxin/suppalr/test/D5.psi: ONT_GRM_R01_01 ONT_GRM_R07_07 ONT_GRM_R13_13 ENSG00000000003;SE:X:100630866-100632485:100632568-100633405:- nan nan 1.0 ENSG00000000419;SE:20:50936262-50940865:50940933-50942031:- nan nan nan ENSG00000000419;SE:20:50936262-50940865:50940955-50942031:- nan nan nan ENSG00000000419;SE:20:50940933-50941105:50941209-50942031:- nan nan nan /cold_data/zhaojiaxin/suppalr/test/D5.tpm: ONT_GRM_R01_01 ONT_GRM_R07_07 ONT_GRM_R13_13 DQ459412 0.0 0.0 0.0 DQ459413 0.0 0.0 0.0 DQ459415 0.0 0.0 0.0 DQ459418 0.0 0.0 0.0 It should be specifically noted that only the event SE can execute and generate the result file without any problems. Checking github for previous similar issues, I tried the following: 1. Make sure the .psi and .tpm files are titled correctly and uniformly, tab-delimited, with no extra symbols. 2. Add the parameters -nan, -th. The problem is not solved and the same error is reported. This question has been bothering me for a long time and I look forward to your expertise and that of your partners! — Reply to this email directly, view it on GitHub <#191>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCZKBYW6JJY7ERRZRUTIR3ZH7M3JAVCNFSM6AAAAABJPM7PNSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM2TSMJRGY3DOMA . You are receiving this because you are subscribed to this thread.Message ID: **@.***>

Thank you, EduEyras. i took your advice and tried to download the whole github project instead of downloading from conda, and the problem was resolved without any problem! I really appreciate it (although such a thank you seems exaggerated), but it's the solution to a problem that's been bothering me for a long time! Have a great day! :)