Closed sneumann closed 7 years ago
Dear Steffen,
Could you please confirm if the problem with 1 condition only is solved for you.
Thank you,
Jordi
Hi Jordi, no, I am afraid not, but currently I don't have access to the actual error message, but will send an updated example. Yours, Steffen
So the issue is that conditions is empty after this little magic:
conditions <- levels(classv)
if(sep.pos=="f"){
conditions <- gsub(paste(ULtag,separator,sep=""),"",conditions)[-grep(paste(Ltag,separator,sep=""),conditions)]
}else{
conditions <- gsub(paste(separator,ULtag,sep=""),"",conditions)[-grep(paste(separator,Ltag,sep=""),conditions)]
}
We have:
> classv
[1] Lab13 Lab13 Lab13 Lab13 Lab13 Lab13 Lab13 Lab13 NoLab12 NoLab12 NoLab12 NoLab12 NoLab12 NoLab12 NoLab12 NoLab12
Levels: Lab13 NoLab12
> conditions
[1] "Lab13" "NoLab12"
and parameters
XCMSet=xset3
XCMSmode="maxo"
ULtag="NoLab12"
Ltag="Lab13"
separator="_"
sep.pos=1
fc.threshold=1.2
p.value.threshold=0.05
PuInc.int.lim=5000
Hope that helps, yours, Steffen
So, the minimum code to reproduce the remaining issue is
library(xcms)
library(geoRge)
data("mtbls213")
sampclass(mtbls213) <- c(rep("Glc12", 6), rep("Glc13", 6))
s1 <- PuInc_seeker(XCMSet=mtbls213,ULtag="Glc12",Ltag="Glc13",sep.pos="f")
What about using the phenoData() ? Users would provide the column name that contains the labeling, so no need to do the manual parsing. Yours, Steffen
Dear Steffen,
The way I corrected the function in last patch does not work if there is no separator ("_") next to the sampclasses vector. Also, the value for sep.pos needs to be either "f" for front or "b" for back, which means if the ULtag/Ltag are found before or after the separator.
So even if this does not work:
data("mtbls213")
sampclass(mtbls213) <- c(rep("Glc12", 6), rep("Glc13", 6))
s1 <- PuInc_seeker(XCMSet=mtbls213,ULtag="Glc12",Ltag="Glc13",sep.pos="f")
This is solved by adding, "_A" at the end of each of sampclasses:
data("mtbls213")
sampclass(mtbls213) <- c(rep("Glc12_A", 6), rep("Glc13_A", 6))
s1 <- PuInc_seeker(XCMSet=mtbls213,ULtag="Glc12",Ltag="Glc13",sep.pos="f")
I will try to modify the code so it works in the case you brought up, but if you need to run geoRge asap, adding a separator followed by a short string should work for you.
Hi, the following code triggers an
Error in apply(meanintensities, 2, function(x) all(x < PuInc.int.lim)) : dim(X) must have a positive length
. Jordi can reproduce the issue and is working on it. Yours, Steffen