Hi guy, I am trying to use the DEqMS tool for my differential expression analysis. I followed the steps from the DEqMS-package-vignette until 2.1.4 - Make contrasts. This is the commands;
cond = as.factor(c(X1_Frozen,X2_Frozen,X3_Frozen,X4_Frozen,X11_RNAlater,X12_RNAlater,X13_RNAlater,X14_RNAlater)) #X1_Frozen etc. = equals row names/groups
design = model.matrix(~0+cond)
design = model.matrix(~0+cond)
colnames(design) = gsub("cond","",colnames(design))
contrast = makeContrasts(contrasts=x,levels=design)
When trying to run the contrast command I'll get the following error message:
Error in makeContrasts(contrasts = x, levels = design) :
The levels must by syntactically valid names in R, see help(make.names). Non-valid names: -Inf,-4.00735369535212,-3.85423988827818,-3.57233660941963,-3.45430347451484,-3.44084465049062,-3.23991739765898,-3.13420477162754,-3.09740268774595,-3.06618643730488,-3.03005644431212,-3.01908649459226
etc. which seems like it can't handle negative value. However, I would expect negative values since it it log2 transformed and median centered, right? I appreciate any advice on how to potentially fix this. Thanks!
Cheers, Marlene
Hi Kevin, thank you for your response! Yes, X1_Frozen etc are column names...I replaced it the way you suggested and it seemed to work since I didn't receive the original error anymore. Thanks - I really appreciate your help with this!
However, there still seems to be a problem and I assume that refers to this part of your response "and this vector should align (in length and order) with the columns of your expression matrix" since I receive the following error now:
Error in cm[, j] <- eval(ej, envir = levelsenv) : number of items to replace is not a multiple of replacement length
Do you now how to fix that? I am definitely not familiar with this error.
The "~0" was suggested in the package-vignette and means no intercept for the linear model. However, I am not entirely sure why this should be included. Would you recommend to remove this paramater?
Thank you again!
Cheers, Marlene
It appears that you are analysing RNA expression, so it's not necessarily appropriate to follow the DEqMS package vignette, which is specifically for proteomics. You can just follow the limma User's Guide directly.
Hi Gordon, Thanks for your response! I am working with metaproteomics data so I am a little confused by your suggestion. Is any of the commands I ran so far specifically for RNA expression? I thought I need to run limma before using DEqMS. Did I get that wrong?
The commands are all generic but I noticed the factor levels "RNAlater". I thought that RNAlater is a preservative method specifically for RNA. On reading the RNAlater tech notes just now I see that it can be used for protein as well.