Closed hzaurzli closed 3 years ago
Your code looks fine to me. I suspect the error is related to NA values to the input matrix.
Have you checked if each group has minimum two valid values ? Aslo Make sure No any zero or NA present in fit3$count. Otherwise a quick test is to use oa.omit to filter out all rows with NA.
If no error remains, you have to double check if you have met the requirements.
Let me know how it goes.
Yafeng
在 2021年7月20日,19:58,Small runze @.***> 写道:
Dear Author: when i ues DEqMS to fit the model:fit3$count = psm.count.table[rownames(fit3$coefficients),"count"] fit4 = spectraCounteBayes(fit3). i have this problem :Error in simpleLoess(y, x, w, span, degree = degree, parametric = parametric, : NA/NaN/Inf in foreign function call (arg 2)
here is my codes:cond = as.factor(c(rep("M",21),rep("F",22)))
design = model.matrix(~0+cond) # 0 means no intercept for the linear model colnames(design) = gsub("cond","",colnames(design))
x <- c("F-M") contrast = makeContrasts(contrasts=x,levels=design) fit1 <- lmFit(pro_M_F, design) fit2 <- contrasts.fit(fit1,contrasts = contrast) fit3 <- eBayes(fit2)
library(matrixStats) count_columns = seq(16,34,2) psm.count.table = data.frame(count = rowMins( as.matrix(df.prot[,count_columns])), row.names = df.prot$Protein.accession) fit3$count = psm.count.table[rownames(fit3$coefficients),"count"] fit4 = spectraCounteBayes(fit3)
can you help me?? thanks
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/yafeng/DEqMS/issues/4, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAXG6N3CCGZYBTQ3KFBJV4LTYVQH7ANCNFSM5AVUYJJA.
Dear Author: when i ues DEqMS to fit the model:fit3$count = psm.count.table[rownames(fit3$coefficients),"count"] fit4 = spectraCounteBayes(fit3). i have this problem :Error in simpleLoess(y, x, w, span, degree = degree, parametric = parametric, : NA/NaN/Inf in foreign function call (arg 2)
here is my codes:
when i use this command:fit3$count = psm.count.table[rownames(fit3$coefficients),"count"],it will be error:
can you help me?? thanks