comprna / SUPPA

SUPPA: Fast quantification of splicing and differential splicing
MIT License
245 stars 60 forks source link

diffSplice error,a classic one: 'UnboundLocalError'. I have tried my best. #189

Open gnilihzeux opened 1 month ago

gnilihzeux commented 1 month ago

Dear author,

classical method works fine by add nan_th to functions classical_test and calculate_delta_psi in diff_tools.py. But empirical method still throw the same error, altho

I have reviewed all the issues regarding diffSplice errors, but there is not a solution.

Calculating differential analysis between conditions: TGFb and NC
ERROR:__main__:Unknown error: (<class 'UnboundLocalError'>, UnboundLocalError("local variable 'i' referenced before assignment",), <traceback object at 0x7f5063d2e748>)

My env

* CentOS 7
* python 3.4.5
* conda 4.10.3
* suppa 2.3

My command

suppa.py diffSplice -m empirical -i events.ioi -e NC.tpm.txt  TGFb.tpm.txt -p NC.psi.txt  TGFb.psi.txt -gc -o diff

My files list below

# NC.tpm.txt
SRR20637415     SRR20637416     SRR20637417
ENST00000000233.10      146.746668972396   149.102385081347     177.659704455211
ENST00000000412.8       104.732062503121   87.2341755040248     91.4535187490958
ENST00000001008.6-0     31.66318168699  18.5604628731968        24.7374272026243
ENST00000002125.9-0     0       0       1.49923801228026
# TGFb.tpm.txt
SRR20637407     SRR20637408     SRR20637409
ENST00000000233.10      146.864611321098   128.127041433003     161.482163166439
ENST00000000412.8       111.571565189672   114.872519905451     111.127510136044
ENST00000001008.6-0     25.6159205792613   30.2960492058333     32.4121904563463
ENST00000002125.9-0     0.569242679539141  1.89350307536458     0
# NC.psi.txt
SRR20637415     SRR20637416     SRR20637417
ENST00000000233.10      0.971774167994478  0.983673443537103    0.991631777070178
ENST00000000412.8       0.868686804929113  0.870370293507435    0.841379242137375
ENST00000001008.6-0     0.981132045654475  0.999999946122039    0.9428571090985
ENST00000002125.9-0     1.09485661410626e-07    2.30905251524717e-07    0.222222172814451
# TGFb.psi.txt
SRR20637407     SRR20637408     SRR20637409
ENST00000000233.10      0.977272701411922  0.975961508908504    0.978947344810134
ENST00000000412.8       0.886877765505706  0.874999940967174    0.914285647291526
ENST00000001008.6-0     0.937499967976461  0.923076897295838    0.933333308377018
ENST00000002125.9-0     0.142857178708518  0.199999978875147    1.32903355558565e-07
# ioi
seqname gene_id isoform_id      inclusion_transcripts total_transcripts
chr1    ENSG00000233750.3       ENSG00000233750.3;ENST00000442987.3     ENST00000442987.3       ENST00000442987.3
chr1    ENSG00000225972.1       ENSG00000225972.1;ENST00000416931.1     ENST00000416931.1       ENST00000416931.1,SRR20637415.6316085-0
chr1    ENSG00000225972.1       ENSG00000225972.1;SRR20637415.6316085-0 SRR20637415.6316085-0   ENST00000416931.1,SRR20637415.6316085-0
chr1    ENSG00000225630.1       ENSG00000225630.1;ENST00000457540.1     ENST00000457540.1       ENST00000457540.1
chr1    ENSG00000229344.1       ENSG00000229344.1;ENST00000427426.1     ENST00000427426.1       ENST00000427426.1
chr1    ENSG00000240409.1       ENSG00000240409.1;ENST00000467115.1     ENST00000467115.1       ENST00000467115.1
chr1    ENSG00000248527.1       ENSG00000248527.1;ENST00000514057.1     ENST00000514057.1       ENST00000514057.1
chr1    ENSG00000268663.1       ENSG00000268663.1;ENST00000438434.2     ENST00000438434.2       ENST00000438434.2
chr1    ENSG00000237491.10      ENSG00000237491.10;ENST00000592547.1    ENST00000592547.1       ENST00000592547.1
EduEyras commented 1 month ago

Hi, thanks for your message. Is this specific of the calculation with the ioi file? Or it also happens with the ioe? Thanks E.

gnilihzeux commented 1 month ago

Hi, thanks for your reply. Actually for both. Originally, I intended to upload the file, but it's too large.

EduEyras commented 1 month ago

Hi Are you using a clone from the github repository? The nan_th parameter should be working fine on version in github. E.

gnilihzeux commented 1 month ago

Thanks. I used conda install.