-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'tuple' object has no attribute 'dim' #5
Comments
Hi! are you using exactly the same code as in the demo? same model/gwas sumstats as well? |
Hello! I wasn't, I was using my own GWAS, but I've just tried it with the same model/gwas sumstats and have run into the same error. |
Hi @pensive-bubble , can you make this small change and try again: Line 461 in 68d6f60
That line will be: x_dict = {i: j[0][0] for i,j in x_dict.items()}
|
Hello, I tried both on my GWAS and on the test one. I ended up with a fun new error. |
Thank you @pensive-bubble for the follow-up! Can make this pd concat change in your local version and try again:
Hey @Himanshu-at-bayer, you can also try utils has multiple |
Thanks for the response and help. The first got removed after all the amendments you suggested but now got a new error Retrieving weights... local/lib/python3.10/site-packages/kgwas/utils.py:590: FutureWarning: The provided callable <function std at 0x7f6dac644f70> is currently using SeriesGroupBy.std. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string "std" instead.
|
This is line 590 in my case: rel2std = snp2genes_hit.groupby('rel_type').weight.agg(np.std).reset_index().rename(columns = {'weight': 'rel_type_std'}) |
I am also encountering this problem when there are no significant SNPs in the output. Some changes that seem to work (in addition to those already shared): In the For example, for line 596
There is also a bug where the The GWAS P threshold is hardcoded in
|
Nice! @jhchung would you like to make a PR for this? no worries if not, thanks! |
I need to do some additional testing to make sure these changes resolve the issue. but happy to make a PR when ready. |
Great - thank you!! |
Thanks for the fix! Now at least I can run the codes. |
I am also getting the same problem of no output using the test dataset. I do see a warning that pops up which may be related to the pandas version. I have pandas v2.2.3 installed.
|
I believe the problem is in the
|
Unfortunately, I won't be able to do too much more. Things are getting a bit over my head with the ML portions. |
Implement changes in: * snap-stanford#5 (comment) * snap-stanford#5 (comment)
Implement changes from: * snap-stanford#5 (comment) * snap-stanford#5 (comment)
@jhchung Did you manage to reproduce the results? |
Thanks for trying it out! @jhchung |
Hi - i re-run the code and there is no bug reported. |
I actually used the .yml file what is provided and the python version 3.12.9
|
@kexinhuang12345 Also as you mentioned earlier that you could share the notebook for generating the KG :) Would be nice to have it and please don't need to polish the notebook ;) |
Hello again,
I have run into a further error while trying to run disease critical network demo. Tuple object causing further issues.
If you know how to fix this, it would be greatly appreciated!
Natasha
The text was updated successfully, but these errors were encountered: