Open yafeng opened 10 months ago
Hi, i got en error while using aggregateFeatures command from MSqrob2.
pe <- aggregateFeatures(pe,i = "peptideNorm", fcol = "PG.ProteinGroups", na.rm = TRUE, name = "protein")
Error in
contrasts<-
(*tmp*
, value = contr.funs[1 + isOF[nn]]) : [: contrasts can be applied only to factors with 2 or more levels]Could you point out how i should fix the error? I guess it is related to my input, but i don't know where to start. Thanks for your help!
Yafeng
Hi, I faced the same issue and I figured out I had blanks and NAs in my intensity columns. I removed the blanks and performed aggregateFeatures function and it worked. Here is the example:
pep <- read.table(peptidesFile, sep = "\t", header = T) pep <- pep %>% mutate(Proteins = ifelse(Proteins == "", NA, Proteins)) %>% mutate(Intensity.A = ifelse(Intensity.A == "", NA, Intensity.1C3_d37_ECM_R1)) %>% filter(Proteins != "NA") %>% filter(Intensity.A != "NA")
I hope this helps. Hassan Saei
Hi, i got en error while using aggregateFeatures command from MSqrob2.
pe <- aggregateFeatures(pe,i = "peptideNorm", fcol = "PG.ProteinGroups", na.rm = TRUE, name = "protein")
Error in
contrasts<-
(*tmp*
, value = contr.funs[1 + isOF[nn]]) : [: contrasts can be applied only to factors with 2 or more levels]Could you point out how i should fix the error? I guess it is related to my input, but i don't know where to start. Thanks for your help!
Yafeng