BrooksLabUCSC / flair

Full-Length Alternative Isoform analysis of RNA
Other
203 stars 69 forks source link

diffsplice_fishers_exact error when dealing with ir.events.quant.tsv #250

Open QingCheZhang opened 1 year ago

QingCheZhang commented 1 year ago

Hi, When I ran diffsplice_fishers_exact, it showed the following error message: Traceback (most recent call last): File "/home/wcy_z3/miniconda3/envs/mamba/bin/diffsplice_fishers_exact", line 48, in writer.writerow(line + [sps.fisher_exact(events[feature]['counts'])[1]]) File "/home/wcy_z3/miniconda3/envs/mamba/lib/python3.8/site-packages/scipy/stats/_stats_py.py", line 4668, in fisher_exact raise ValueError("The input table must be of shape (2, 2).") ValueError: The input table must be of shape (2, 2).

This error only occurs when dealing with ir.events.quant.tsv A short one of ir.events.quant.tsv is shown below: feature_id coordinate Col_ck_batch1 hda9_ck_batch1 isoform_ids inclusion_1:7232-7383 1:7232-7383 2.0 2.0 93:1577|06b1316b-feb2-48c0-8fae-64040833699f_AT1G01020 exclusion_1:7232-7383 1:7232-7383 44.0 62.0 AT1G01020.1_AT1G01020,94:1343|1f967829-0fc5-4de6-ba56-14e529ae085a_AT1G01020,AT1G01020.5_AT1G01020,95:1030|c82ba5e5-4d13-4cf8-8ae6-d4c04e447318_AT1G01020,102:1355|18d89b23-46c5-423b-a9c6-bc36437ebdd3_AT1G01020,86:1037|bdfbe9c7-9e76-45b0-a6a9-36b9982c7b7c_AT1G01020,AT1G01020.4_AT1G01020,AT1G01020.3_AT1G01020,84:1039|9a0956ce-ed81-490d-9349-05d5c43ae68c_AT1G01020,93:1355|ae30d10c-576c-4bdd-a96d-a58458dafb75_AT1G01020,81:1150|b30428d0-e071-4371-aafa-d2cb6815739e_AT1G01020,103:1134|476dc00e-4d4b-4164-939a-b1f9174f9dd7_AT1G01020,98:1537|35e453e7-29e9-45f6-b625-fd8b493ac5de_AT1G01020,98:784|d9f3b827-2458-43a2-8db2-dbb00c0da16a_AT1G01020,98:683|dec11fe9-e894-43ca-9c9d-87ff9a3aae91_AT1G01020

My version is flair 1.7.0 and I install It using mamba,the code is : mamba install -c bioconda flair=1.7

I found it is a bug that should be already solved, here's the link https://github.com/BrooksLabUCSC/flair/issues/95. but it still occurs to me. I think the latest vesion forgets the bug.

Thanks, Qing

Jeltje commented 1 year ago

I'm looking into this, it's a very weird issue because there are no commits with related changes to the program.

Jeltje commented 1 year ago

We're thinking this might be a different issue but I can't reproduce it with just those two lines. Would you mind either pasting all the lines of a test file where you see the problem, or sending me one at jeltje.van.baren@gmail.com?