DillonHammill / CytoExploreR

Interactive Cytometry Data Analysis
60 stars 13 forks source link

Issues Transforming Data and Plotting gated samples #195

Open georgersmith99 opened 7 months ago

georgersmith99 commented 7 months ago

Briefly describe what you hope to achieve:

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

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:**
ChrisSteel-bio commented 7 months ago

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 commented 6 months ago

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 commented 6 months ago

@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 commented 6 months ago

@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 commented 5 months ago

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 commented 4 months ago

I get the same error as @schvartzman now.

djhammill commented 4 months ago

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 commented 4 months ago

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

Many thanks,

djhammill commented 4 months ago

Install the latest version of scales:

install.packages("scales")
schvartzman commented 4 months ago

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 commented 4 months ago

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

LenHC commented 4 months ago

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

avdvloet commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

I've been using an M2 and it doesn't work, it must just be good for M3

Sent from Outlook for Androidhttps://aka.ms/AAb9ysg


From: Juan Manuel Schvartzman @.> Sent: Thursday, March 28, 2024 6:39:29 PM To: DillonHammill/CytoExploreR @.> Cc: georgersmith99 @.>; Author @.> Subject: Re: [DillonHammill/CytoExploreR] Issues Transforming Data and Plotting gated samples (Issue #195)

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?

— Reply to this email directly, view it on GitHubhttps://github.com/DillonHammill/CytoExploreR/issues/195#issuecomment-2025875831, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A42WZ4B4XJORX6J4RWYP5JDY2RPWDAVCNFSM6AAAAABBG4RB2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRVHA3TKOBTGE. You are receiving this because you authored the thread.Message ID: @.***>