flowPeaks error - data length problem
2
0
Entering edit mode
AJC ▴ 10
@ajc-6830
Last seen 9.2 years ago
United States

>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) • 1.4k views
ADD COMMENT
1
Entering edit mode
@vincent-j-carey-jr-4
Last seen 10 weeks ago
United States

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 COMMENT
0
Entering edit mode
AJC ▴ 10
@ajc-6830
Last seen 9.2 years ago
United States

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 COMMENT

Login before adding your answer.

Traffic: 715 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6