Skip to content
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

Issues Transforming Data and Plotting gated samples #195

Open
georgersmith99 opened this issue Dec 29, 2023 · 15 comments
Open

Issues Transforming Data and Plotting gated samples #195

georgersmith99 opened this issue Dec 29, 2023 · 15 comments
Labels
Help Wanted Extra attention is needed

Comments

@georgersmith99
Copy link

Briefly describe what you hope to achieve:

  • I would like to do a simple log transformation and gating but am getting errors for both (they are likely linked, bear with me i am still getting used to the language used in CytoExploreR)
  • When i transform i get error: "Error: 'trans' must be a list of transformer objects (generated by scales::trans_new method)"
  • I have already updated flowWorkspace to its newest version
    -When i plot i get error: Error: a character vector argument expected
    Full code provided below

Outline the steps taken to attempt to reach this goal (paste code below):

  • Include all data preparation steps where appropriate.
gs <- cyto_setup(path = 'PathToData', gatingTemplate = "Compensation-gatingTemplate.csv")
gs <- cyto_compensate(gs)
gs <- cyto_transform(gs)


cs <- cyto_extract(gs, "root")

cyto_gate_draw(cs,
               alias = "Population",
               channels = c("FSC-A", "SSC-A")
               )
cyto_plot_save("CytoExploreR-4.png",
               height = 7,
               width = 7)

cyto_plot(gs,
          parent = "root",
          alias = "Cells",
          channels = c("FSC-A","SSC-A"),
          group_by = "all",
          label_text_size = 1)

Include any associated screenshots or images here:

@georgersmith99 georgersmith99 added the Help Wanted Extra attention is needed label Dec 29, 2023
@ChrisSteel-bio
Copy link

I'm getting the same transformation error (Error: 'trans' must be a list of transformer objects (generated by scales::trans_new method)" with a fresh cytoexplorer install, unsure why.. I did not see this error before the reinstall...

Seems like the error is flagged in the code linked below, unsure how to fix this. @DillonHammill, any chance you can shed some light on this?

https://rdrr.io/bioc/flowWorkspace/src/R/GatingSet_Methods.R

@djhammill
Copy link
Collaborator

Apologies for the delay, I have been away. The fix for the new version of scales hasn't been merged for flowWorkspace as yet, so you will need to install directly from GitHub to get the fix:

devtools::install_github("RGLab/flowWorkspace/", ref =  "hotfix/update-according-to-latest-scales-package")

I am working on a fix that will work with both versions of scales.

@schvartzman
Copy link

@DillonHammill I was wondering if this issue has been fixed. Still getting error message below when running cyto_transformer_logicle:

Error: 'trans' must be a list of transformer objects (generated by scales::trans_new method)

Above fix installing directly from GitHub fails:

ld: library 'crypto' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [flowWorkspace.so] Error 1
ERROR: compilation failed for package ‘flowWorkspace’
* removing ‘/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/flowWorkspace’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/flowWorkspace’
Warning message:
In i.p(...) :
  installation of package ‘/var/folders/yx/y6blb_2120zf1w8ty97x0r180000gr/T//RtmpbIlCdf/file135bd46ede2d6/flowWorkspace_4.15.1.tar.gz’ had non-zero exit status

thanks!

@georgersmith99
Copy link
Author

@DillonHammill I was wondering if this issue has been fixed. Still getting error message below when running cyto_transformer_logicle:

Error: 'trans' must be a list of transformer objects (generated by scales::trans_new method)

Above fix installing directly from GitHub fails:

ld: library 'crypto' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [flowWorkspace.so] Error 1
ERROR: compilation failed for package ‘flowWorkspace’
* removing ‘/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/flowWorkspace’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/flowWorkspace’
Warning message:
In i.p(...) :
  installation of package ‘/var/folders/yx/y6blb_2120zf1w8ty97x0r180000gr/T//RtmpbIlCdf/file135bd46ede2d6/flowWorkspace_4.15.1.tar.gz’ had non-zero exit status

thanks!

Hi!
Thanks to @ChrisSteel-bio this fix worked for me: It reverts the scales package back to an old version.

remove.packages("scales")

remotes::install_version("scales", version = "1.2.0")

Hopefully this works!

@schvartzman
Copy link

Hi,

Above fix to downgrade to "scales" 1.2.0 worked briefly but seems to be broken again. CytoexploreR now requires scales 1.3.0:

>library(CytoExploreR)
Loading required package: flowCore
Loading required package: flowWorkspace
As part of improvements to flowWorkspace, some behavior of
GatingSet objects has changed. For details, please read the section
titled "The cytoframe and cytoset classes" in the package vignette:

vignette("flowWorkspace-Introduction", "flowWorkspace")
Loading required package: openCyto
Error: package or namespace load failed for ‘CytoExploreR’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
namespace ‘scales’ 1.2.0 is already loaded, but >= 1.3.0 is required

But same error occurs with transform:

> trans <- cyto_transformer_logicle(data, channels = c("Cy3 EDU-A", "Cy3 EDU-H"))
Error: 'trans' must be a list of transformer objects (generated by scales::trans_new method)

thanks

@ChrisSteel-bio
Copy link

I get the same error as @schvartzman now.

@djhammill
Copy link
Collaborator

flowWorkspace now requires scales v1.3.0 so rolling back is not an option anymore. We have a fix coming that will retain support for scales v1.2.0 in case anyone needs it.

@ChrisSteel-bio
Copy link

@djhammill Any recommendation on how to fix the error currently?

Many thanks,

@djhammill
Copy link
Collaborator

Install the latest version of scales:

install.packages("scales")

@schvartzman
Copy link

But just to make sure, updating to scales v1.3.0 still results in an error when running cyto_transform:

Error: 'trans' must be a list of transformer objects (generated by scales::trans_new method)

Many thanks,

@georgersmith99
Copy link
Author

@djhammill I am now getting the same error, even when updating the scales package! Any help would be massively appreciated!

@LenHC
Copy link

LenHC commented Mar 20, 2024

I am having the same issue.... Hope you see solutions soon!

@avdvloet
Copy link

Is there already a solution for this issue? Or a way to work around it? I am suffering from the same issue and my script is quite dependent on this functionality.

Thanks in advance!

@schvartzman
Copy link

Interestingly I just got a new M3 Mac and installed everything de novo and cyto_transform works perfectly. Is this an M1 specific or M1 and M2 specific problem?

@georgersmith99
Copy link
Author

georgersmith99 commented Mar 28, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants