Entering edit mode
I have received this error:
dataset <- DESeqDataSetFromMatrix(countData = countData,
+ colData = colData,
+ design = ~condition)
*Error in DESeqDataSet(se, design = design, ignoreRank) :
counts matrix should be numeric, currently it has mode: character*
And here is the code I am running :
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("DESeq2")
library('DESeq2')
library('RColorBrewer')
countFilePath = './count-1.txt'
countData = read.table(file = countFilePath, header = FALSE, sep = '\t', row.names = 1,stringsAsFactors=FALSE)
##make first row the colname
colnames(countData) <- countData[1,]
countData <- countData[-1, ]
##if needed to remove some columes countData = countData[3:ncol(countData)]
dim(countData)
colFilePath = './colname-Jul12.txt'
colData = read.table(file = colFilePath, header = TRUE, sep = ' ', row.names = 1)
colData[['condition']] = factor(colData[['condition']], levels = c('Water', '130','160'))
colData
dataset <- DESeqDataSetFromMatrix(countData = countData,
colData = colData,
design = ~condition)
Anybody can help me here?
Thank you so much Sali
Since the software is complaining about the content of CountData, you don't think it might be helpful to show people a little of your countData? Since the software is complaining that your CountData isn't numerical, don't you think you should show how you checked to make sure that it was all numerical?