DESeq2
1
0
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
RNA-Seq • 1.1k views
ADD COMMENT
1
Entering edit mode

The error is already stated clearly:

counts matrix should be numeric, currently it has mode: list

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.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode
2.2 years ago
ATpoint 81k

Try using a dedicated converter function:

dds <- as(se, "DESeqDataSet")
ADD COMMENT

Login before adding your answer.

Traffic: 1839 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6