Question: flowPeaks error - data length problem
0
4.7 years ago by
AJC10
United States
AJC10 wrote:

>fp = flowPeaks(fcs)

>Error in as.vector(data) :
no method for coercing this S4 class to a vector

How can I fix this error? I tried to find information about this "S4 class" but I wasn't able to find a satisfying answer yet.

flowpeaks as.vector(data) • 568 views
modified 4.7 years ago • written 4.7 years ago by AJC10
Answer: flowPeaks error - Error in as.vector(data) : no method for coercing this S4 c
1
4.7 years ago by
United States
Vincent J. Carey, Jr.6.3k wrote:

Please do read the posting guide.  flowPeaks() expects a matrix.  Thus the man page example

package="flowCore"))

##do the clustering based on the asinh transforamtion of

##the first two FL channels

fp<-flowPeaks(asinh(samp@exprs[,3:4]))

Note that samp is not passed directly, but a function of samp@exprs, which will yield

a matrix, is passed.  This accords with the manual page prescription on usage.

Answer: flowPeaks error - Error in as.vector(data) : no method for coercing this S4 c
0
4.7 years ago by
AJC10
United States
AJC10 wrote:

I appreciate your help. I'm still pretty new to R programming so I will do my best to follow the posting guide.

I was able to troubleshoot my previous error with your help, but now I have some problems with evalCluster(). I tried my best to fix the following issue:

evalCluster("example.FCS3.fcs",fp2$peaks.cluster,method="Vmeasure",rm.gs.outliers=TRUE) Error in evalCluster("example.FCS3.fcs",fp2$peaks.cluster,method="Vmeasure", fp2$peaks.cluster, method = "Vmeasure") : the length of gs should be the same as cand after checking ?evalCluster() I realized that somehow the length for example.FCS3.fcs or fcsorig (gs) is not the same as fp2$peaks.cluster (cand).. I'm not exactly sure what's going on. Is there anything I can do to fix this?

I tried to cutdown my gs by trying

fcsorig <- fcs@exprs[,7:11]  # fcs is my read.FCS file from imported FCS3 file from flowJo

but it didn't work. Any suggestions?