-
Notifications
You must be signed in to change notification settings - Fork 2
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
Summarize attributes as annotations #163
Conversation
I totally agree with this. I hope that this can be eventually baked into synapse (https://sagebionetworks.jira.com/browse/PLFM-8197) but for now a util/job to handle this is great. |
Hey @anngvu , I created a copy of your dataset (syn53182927) for testing, but when I run summarize_attribute, I'm running into the same issue that I ran into in #164, presumably caused by the get/set_annotations function:
I'm wondering - what version of reticulate and synapseclient are you using? I wonder if this is something that I've messed up on my mac or if it's actually related to a broader reticulate and/or synapseclient change. Here's my sessionInfo:
I am using a conda environment with synapseclient 3.2.0. |
If I get a chance today, I'll spin up a SC instance and test this there. |
Per @anngvu lets try reticulate 1.28 - 1.34 might be the issue? |
OK! After rolling back to reticulate 1.28, I have no issues running this function. Works great! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great - I added a suggested detail to the summarize_attribute function docs, but it's not critical.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got similar reticulate related error as noted before with reticulate_1.32.0
. Recommend updating reticulate for whole package to avoid breaking for users in the future. Added an issue #165 to track.
Co-authored-by: Robert Allaway <[email protected]>
@jaybee84, can you clarify the issue you faced and how you fixed it? The issue I got seemed to be because reticulate was updated the latest version on my end - with an older version of reticulate, the issue went away. I'm just trying to figure out if we encountered the same thing or somthing different! |
Here is the particular error I got:
My session info is here:
I havent had a chance to fix it yet, but was looking into it. |
Ah, got it. Yes this is the same error i got, hopefully downgrading to 1.28
will fix it for you too!
…On Thu, Dec 21, 2023, 13:55 Jineta Banerjee ***@***.***> wrote:
Here is the particular error I got:
Error in py_call_impl(callable, call_args$unnamed, call_args$named) :
TypeError: Expected a synapseclient.Annotations object
Run `reticulate::py_last_error()` for details.
In addition: Warning message:
In entity_meta[attribute] <- meta[[entity]] :
number of items to replace is not a multiple of replacement length
> reticulate::py_last_error()
Traceback (most recent call last):
File "/Users/jineta/opt/miniconda3/envs/annotate/lib/python3.7/site-packages/synapseclient/client.py", line 1600, in set_annotations
raise TypeError("Expected a synapseclient.Annotations object")
TypeError: Expected a synapseclient.Annotations object
My session info is here:
> sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.6.3
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
other attached packages:
[1] reticulate_1.32.0 synapser_1.1.0.119
[3] nfportalutils_0.0.0.9411
loaded via a namespace (and not attached):
[1] Rcpp_1.0.11 pillar_1.9.0 compiler_4.2.1
[4] tools_4.2.1 digest_0.6.33 jsonlite_1.8.7
[7] evaluate_0.21 lifecycle_1.0.3 tibble_3.2.1
[10] lattice_0.20-45 pkgconfig_2.0.3 png_0.1-8
[13] rlang_1.1.1 Matrix_1.5-3 cli_3.6.1
[16] rstudioapi_0.14 yaml_2.3.7 xfun_0.39
[19] fastmap_1.1.1 withr_2.5.1 dplyr_1.1.3
[22] knitr_1.42 generics_0.1.3 vctrs_0.6.3
[25] grid_4.2.1 tidyselect_1.2.0 glue_1.6.2
[28] data.table_1.14.8 R6_2.5.1 fansi_1.0.5
[31] rmarkdown_2.21 purrr_1.0.2 magrittr_2.0.3
[34] codetools_0.2-18 htmltools_0.5.6.1 utf8_1.2.3
[37] rjson_0.2.21
I havent had a chance to fix it yet, but was looking into it.
—
Reply to this email directly, view it on GitHub
<#163 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE3WNSACB2K32A6VBVDSIGTYKSH4HAVCNFSM6AAAAABA3RQ5MWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRWHA2TEMBTGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@jaybee84 OK, I think this is same problem Robert encountered. It should be a reticulate downgrade to Edit: We can mention this in the docs and/or pin the version in package description. |
Interesting. rolling down reticulate did not fix it for me:
Then I noted that Robert has a different version of
|
Hmm, I'll try to do a little more research to see if there is another unknown factor in the combination, but let me know if you do a total restart and it does suddenly work. |
Discussed in standup - we'll merge this and then try and revisit the environment issues later when we get back. |
@anngvu sorry for my late response, I missed this message earlier. I restarted my R session and am still getting the same error. |
There are two things to this:
dataType
augmentation job to work with new study table configuration; we should add that summary data as annotations, not as a table row. This replaces @allaway's original code.Update: I think this is technically higher priority than the 3 other PRs outstanding.