BrooksLabUCSC / flair

Full-Length Alternative Isoform analysis of RNA
Other
205 stars 71 forks source link

Flair Collapse: NameError: name 'res' is not defined #215

Closed itslittman closed 2 years ago

itslittman commented 2 years ago

I can successfully run Flair Correct, but not Collapse, as I get the error: NameError: name 'res' is not defined.

Someone else reported this error too (https://github.com/BrooksLabUCSC/flair/issues/174), but the only solution listed was downgrading Python to 3.7 and that did not work for me.

Jeltje commented 2 years ago

I have just made a commit of the code that generates this error, collapse_isoforms_precise.py, what happens if you try that version? You can either download and replace that one file under flair/src/flair/, or git clone the current master branch.

If you still get the error, or something similar, please attach a sample of your input file and give us the full command you are trying to run.

Thanks!

itslittman commented 2 years ago

Hey thanks for the reply!! We're getting somewhere. I replaced the script, and that error is gone, but now I get: [image0.jpeg]

Sent from my iPhone

On Aug 11, 2022, at 5:19 PM, Jeltje @.***> wrote:



I have just made a commit of the code that generates this error, collapse_isoforms_precise.py, what happens if you try that version? You can either download and replace that one file under flair/src/flair/, or git clone the current master branch.

If you still get the error, or something similar, please attach a sample of your input file and give us the full command you are trying to run.

Thanks!

— Reply to this email directly, view it on GitHubhttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FBrooksLabUCSC%2Fflair%2Fissues%2F215%23issuecomment-1212504432&data=05%7C01%7Cnoah.littman%40umassmed.edu%7Cd4fb89ad9fb74b8f4e0d08da7bdf36d7%7Cee9155fe2da34378a6c44405faf57b2e%7C0%7C0%7C637958495885593331%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=WpeLy3hYoXxfBawc7cKpD7jGBOamp7%2F47A%2Fs%2FL7upIo%3D&reserved=0, or unsubscribehttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FA2AOVDAQOXXSR6S2FSWHPJ3VYVU6VANCNFSM56JLFQQA&data=05%7C01%7Cnoah.littman%40umassmed.edu%7Cd4fb89ad9fb74b8f4e0d08da7bdf36d7%7Cee9155fe2da34378a6c44405faf57b2e%7C0%7C0%7C637958495885593331%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Rivi7i3MM%2FDzySPI0zOOU7zQzaM6CLnKlO6oj7x4utg%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.***>

Jeltje commented 2 years ago

I think your previous post was supposed to have an image link or attachment, but all I see is [image0.jpeg] Can you try again?

itslittman commented 2 years ago

oh my bad: [image0.jpeg]

Sent from my iPhone

On Aug 11, 2022, at 8:47 PM, Jeltje @.***> wrote:



I think your previous post was supposed to have an image link or attachment, but all I see is [image0.jpeg] Can you try again?

— Reply to this email directly, view it on GitHubhttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FBrooksLabUCSC%2Fflair%2Fissues%2F215%23issuecomment-1212625756&data=05%7C01%7Cnoah.littman%40umassmed.edu%7C6d46e94123f84b3c93f208da7bfc3d81%7Cee9155fe2da34378a6c44405faf57b2e%7C0%7C0%7C637958620557632300%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=1xahaDa5q2PyFkNF32tbvIAo70Y6KAxblNP1kIn53xw%3D&reserved=0, or unsubscribehttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FA2AOVDHZDZIGFHHD3LNTHI3VYWNKHANCNFSM56JLFQQA&data=05%7C01%7Cnoah.littman%40umassmed.edu%7C6d46e94123f84b3c93f208da7bfc3d81%7Cee9155fe2da34378a6c44405faf57b2e%7C0%7C0%7C637958620557788546%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=EIBv1OWQaPgprAvuf8akKz%2Bzcf3qAWAiZWY5iSIBwaQ%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.***>

itslittman commented 2 years ago

if it doesn't load again, it said:

Writing temporary files to /var/folders/y9/6jbrb7w96wb0r6jywf6f_3f80000gn/T/tmp3n2afklz/ Annotated ends extracted from GTF Read data extracted [Annotated ends extracted from GTF Annotated ends extracted from GTF Annotated ends extracted from GTF Annotated ends extracted from GTF Read data extracted Read data extracted Single-exon genes grouped, collapsing Single-exon genes grouped, collapsing [multiprocessing.pool.RemoteTraceback:

and then gave the traceback:

Traceback (most recent call last): File "/Users/noahlittman/miniconda/lib/python3.10/multiprocessing/pool.py", line 125, in worker result = (True, func (*args, *kwds)) File "/Users/noahlittman/miniconda/lib/python3.10/multiprocessing/pool.py", line 48 in mapstar return list (map(args)) File "/Users/noahlittman/miniconda/lib/python3.10/site-packages/flair/collapse_isoforms_precise.py",line233,inrun_i terative add se se ordered = all_se_by_chrom[chrom].keys() TypeError: 'NoneType! object is not subscriptable atio nts tr The above exception was the direct cause of the following exception: Traceback (most recent call last) : File "/Users/noahlittman/miniconda/lib/python3.10/site-packages/flair/collapse_isoforms_precise.py",line674,in <modu le> res = p.map (run_iterative_add_se, , chrom_names) File "/Users/noahlittman/miniconda/lib/python3.10/multiprocessing/pool.py", line 364, in map return self. _map _async(func, iterable, mapstar, chunksize).get () File "/Users/noahlittman/miniconda/lib/python3.10/multiprocessing/pool.py", line 771, in get raise self. value

And the official error message was:

TypeError: 'NoneType' object is not subscriptable

Sent from my iPhone

On Aug 11, 2022, at 8:55 PM, Littman, Noah @.***> wrote:

 oh my bad: [image0.jpeg]

Sent from my iPhone

On Aug 11, 2022, at 8:47 PM, Jeltje @.***> wrote:



I think your previous post was supposed to have an image link or attachment, but all I see is [image0.jpeg] Can you try again?

— Reply to this email directly, view it on GitHubhttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FBrooksLabUCSC%2Fflair%2Fissues%2F215%23issuecomment-1212625756&data=05%7C01%7Cnoah.littman%40umassmed.edu%7C6d46e94123f84b3c93f208da7bfc3d81%7Cee9155fe2da34378a6c44405faf57b2e%7C0%7C0%7C637958620557632300%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=1xahaDa5q2PyFkNF32tbvIAo70Y6KAxblNP1kIn53xw%3D&reserved=0, or unsubscribehttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FA2AOVDHZDZIGFHHD3LNTHI3VYWNKHANCNFSM56JLFQQA&data=05%7C01%7Cnoah.littman%40umassmed.edu%7C6d46e94123f84b3c93f208da7bfc3d81%7Cee9155fe2da34378a6c44405faf57b2e%7C0%7C0%7C637958620557788546%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=EIBv1OWQaPgprAvuf8akKz%2Bzcf3qAWAiZWY5iSIBwaQ%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.***>

Jeltje commented 2 years ago

The image still doesn't work, but the plain text is great, thanks.

Would you mind sending me your input psl or bed file (or just the first ten lines of it)? jeltje@soe.ucsc.edu I can't reproduce the error with my own test input. Also please give me the full command you are using.

itslittman commented 2 years ago

It's all fixed now!! I combed through the online repository again after repeatedly encountering the second error, and realized that the first yaml file in /misc was removed and marked as bad. I cloned the whole repository again/used the other yaml file, and did a fresh install and everything works! It does make you update samtools, so I just copied and pasted my newer samtools from /opt/local/bin as a quick fix.

Thank you for the help and that lightning-fast debug of the first script!

Best, Noah