SofieVG / FlowSOM

Using self-organizing maps for visualization and interpretation of cytometry data
61 stars 26 forks source link

unable to find an inherited method for function ‘compensate’ for signature ‘"flowFrame", "NULL"’ #59

Open yueli8 opened 1 year ago

yueli8 commented 1 year ago

Hello,

Thank you for developing so nice software.

It goes well with the demo data of "68983.fcs", but gets wrong with my data.

Thank you in advance for your great help!

Best,

Yue

fileName <- system.file("extdata", "s_Processed.fcs", package="FlowSOM")
ff <- flowCore::read.FCS(fileName)
comp <- flowCore::keyword(ff)[["SPILL"]]
ff <- flowWorkspace::compensate(ff, comp)
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘compensate’ for signature ‘"flowFrame", "NULL"

s_Processed.zip

SamGG commented 1 year ago

This is not a FlowSOM error. The compensate function of the flowWorkspace package requires a gating strategy or cytoFrame or cytoSet whereas the compensate function of the flowCore package uses a flowFreame. This might be misleading, but as you prefix the function by the package name, I assume that you know what you are doing. Interpreting such an error is not straightforward at first sight, but always try understand the error on your own or with the help of people around you. Learning R is not easy, but you will get benefits. Cheers.

SofieVG commented 1 year ago

Hi Yue,

I think the issue might be related to how you read in your fcs file. You might not need the system.file function as your file is not stored in a package. Then, also verify if you have a spillover matrix stored in your fcs file and which keyword is used (might not be SPILL exactly, but maybe $SPILL, spillover, ...)

Hope this helps, Sofie

On Fri, 25 Nov 2022, 09:51 yueli8, @.***> wrote:

Hello,

Thank you for developing so nice software.

It goes well with the demo data of "68983.fcs", but gets wrong with my data.

Thank you in advance for your great help!

Best,

Yue

fileName <- system.file("extdata", "s_Processed.fcs", package="FlowSOM")

ff <- flowCore::read.FCS(fileName)

comp <- flowCore::keyword(ff)[["SPILL"]]

ff <- flowWorkspace::compensate(ff, comp)

Error in (function (classes, fdef, mtable) :

unable to find an inherited method for function ‘compensate’ for signature ‘"flowFrame", "NULL"’```

s_Processed.zip

— Reply to this email directly, view it on GitHub https://github.com/SofieVG/FlowSOM/issues/59, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOS72Z43O3GYNXBLRVSDITWKB4ZHANCNFSM6AAAAAASLC6JW4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>