Error in set[, param[pcom[k, ]]] : subscript out of bounds
0
0
Entering edit mode
cy117 • 0
@b4f0de2a
Last seen 6 weeks ago
United States

Hi!

I'm new to R and I am trying to use Phenoflow, but I'm running into an error I don't understand. When I try to make the cytometric fingerprint, I get the error "Error in set[, param[pcom[k, ]]] : subscript out of bounds." From what I read in a post in StackOverflow, I can debug by determining which variable is out of bounds. When I did this, I was able to figure out what the values were, but I don't know how to determine the bounds. I'm pretty sure I'm missing something here, but I'm having trouble finding information.

[EDIT] After looking at the StackOverflow post again, from what I understand "i" and "j" are my bounds? So, this would mean that my teller is out of bounds, or would it be other values of 4? Please let me know if I'm misunderstanding this. If it is the case, how can I change or fix this?

This is the StackOverflow post: Subscript out of bounds - general definition and solution?

Any help would be great! Thanks!


summary <- fsApply(x=x100_10mPW_ta,FUN=function(x) apply(x,2,max),use.exprs=TRUE)
max = mean(summary[,1])
mytrans <- function(x) x/max
x100_10mPW_ta <- transform(x100_10mPW_ta,BL1.H=mytrans(BL1.H),
BL3.H=mytrans(BL3.H),
SSC.H=mytrans(SSC.H),
FSC.H=mytrans(FSC.H))

cp_x100_10mPW <- flowBasis(x100_10mPW_ta, param, nbin=128,
bw=0.01,normalize=function(x) x)
Error in set[, param[pcom[k, ]]] : subscript out of bounds

##Output found using the method from the post:
Selection: 1
Called from: grDevices:::.smoothScatterCalcDensity(rbind(set, c(1, 1), c(0,
0)), nbin, bw)
Browse> ls()
 "bw"        "fBasis"    "fcs"       "i"         "j"         "nbin"      "normalize" "p"
 "param"     "probBin"   "saveFcs"   "teller"
Browse> 8
 8
Browse> "bw"
 "bw"
Browse> bw
 0.01
Browse> fBasis
flowBasis object
Kernel Density Estimation on grid of  x
Kernel density bandwith:

bivariate densities for channels
[,1] [,2]
Browse> fcs
A flowSet with 24 experiments.

column names(20): Event Time ... BL3.W BL4.W

Browse> i
 3
Browse> j
 4
Browse> nbin
 128
Browse> normalize
function(x) x
Browse> p
 4
Browse> param
 "BL1.H Log" "BL3.H Log" "FSC.H Log" "SSC.H Log"
Browse> probBin
 FALSE
Browse> saveFcs
 FALSE
Browse> teller
 6
Browse>   p <- length(param)
Browse> p
 4

FlowCytometryData Phenoflow • 64 views