Entering edit mode
2.2 years ago
Rob
▴
170
Hi people I get error in this code:
rawdata <- read.csv("data.csv",
header = TRUE,row.names = 1, stringsAsFactors = FALSE,
check.names = F) #rawdata is a count matrix
metadata <- read.table("Clinical.txt", header = TRUE, row.names = 1, stringsAsFactors = TRUE) #metadata is a table of samples' information
library(Biobase)
library(GenomicRanges)
library(tibble)
library(dplyr)
install.packages("BiocManager")
BiocManager::install("SummarizedExperiment")
se <- SummarizedExperiment(rawdata)
colData(se) <- DataFrame(metadata)
library(DESeq2)
dds <- DESeqDataSet( se, design = ~ 1 ) ##this gives error
error is: renaming the first element in assays to 'counts'
Error in DESeqDataSet(se, design = ~1) :
counts matrix should be numeric, currently it has mode: list
The error is already stated clearly:
It appears that your first file is not in proper format, but tough to tell for sure without seeing at least several lines from each input file.
I think with each question your goal should be to give us as much information as possible, as that will cut down on time for follow-up questions and answers.
I'm closing/deleting this question as it's already being addressed in another thread. Please stop spamming the forum with multiple threads addressing the same problem, or your account will be suspended.EDIT: I apologize, the answerer in the other thread asked you explicitly to open a new question, and I did not see that part. I especially apologize for the remark on suspension and take it back.