Entering edit mode
2.8 years ago
Tushar
•
0
Can anyone help me solve this error,
#indentification of DE
ph@data[ ,2] = c("MS","MS","MS","MS","MS","MS","MS","control","control","control","control","control","control","control","control","control")
colnames(ph@data)[2]="source"
ph@data
groups = ph@data$source
f = factor(groups,levels = c("MS","control"))
design = model.matrix(~ 0 + f)
colnames(design) = c("MS","control")
data.fit = lmFit(data.matrix02,design)
#error
data.fit = lmFit(data.matrix02,design)
Error in rowMeans(y$exprs, na.rm = TRUE) : 'x' must be numeric
The gene symbols have already been moved to the rownames.
Still this is the error I get. Data.matrix02 is a matrix with Gene symbols and the expression data.
Thank you.
Please show a selection of it. Probably you have the genes inside the matrix rather than as rownames? The matrix must be all-numeric, genes must be rownames.
Thank you But, the gene symbols have already been taken outside the matrix as rownames and we still encounter the same error. How do I proceed.
Then the matrix is not numeric. Can you provide example data, with
dput
?Samples are as follows DDR1 " 6.7" " 6.9" " 6.7" " 6.8" " 7.0"
MIR4640 " 6.7" " 6.9" " 6.7" " 6.8" " 7.0"
RFC2 " 6.9" " 7.0" " 7.1" " 7.2" " 6.8"
HSPA6 " 6.9" " 7.3" " 7.6" " 7.6" " 8.0"
PAX8 " 7.0" " 7.0" " 7.1" " 7.2" " 6.8"
GUCA1A " 2.5" " 2.4" " 2.4" " 2.5" " 2.6"
This is the data.matrix02.
Samples are as follows DDR1 " 6.7" " 6.9" " 6.7" " 6.8" " 7.0"
MIR4640 " 6.7" " 6.9" " 6.7" " 6.8" " 7.0"
RFC2 " 6.9" " 7.0" " 7.1" " 7.2" " 6.8"
HSPA6 " 6.9" " 7.3" " 7.6" " 7.6" " 8.0"
PAX8 " 7.0" " 7.0" " 7.1" " 7.2" " 6.8"
GUCA1A " 2.5" " 2.4" " 2.4" " 2.5" " 2.6"
This is the data.matrix02.