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

>fcs = read.FCS("x.FCS3.fcs")

>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
ADD COMMENTlink 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
gravatar for Vincent J. Carey, Jr.
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

 

  samp <- read.FCS(system.file("extdata","0877408774.B08",

     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.

ADD COMMENTlink written 4.7 years ago by Vincent J. Carey, Jr.6.3k
Answer: flowPeaks error - Error in as.vector(data) : no method for coercing this S4 c
0
gravatar for AJC
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?

 

 

 

 

ADD COMMENTlink written 4.7 years ago by AJC10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 150 users visited in the last hour