Hi,
I am a new user of DESeq2, and encounter problem in creating the DESeqDataSet object. I have counts data from kallisto (kallisto.gene.counts.matrix) with 48 samples that I want to use as an input. And I have created a metadata in .txt format to be combined with the count matrix. The commands I used to upload the files to Rstudio are as follows:
Count data
cts = read.table("kallisto.gene.counts.matrix", header=T, row.names=1, com='', check.names=F) cts1 = as.matrix(cts) cts2 = round(cts1)
Metadata
col_data = read.table(file = "ColData.txt", stringsAsFactors = TRUE, row.names=1, header = T, sep = "\t")
head(coldata) time dmg treat rep NST24rep1 24h no st 1 NST24rep2 24h no st 2 NST24rep3 24h no st 3 NST24rep4 24h no st 4 LST24rep1 24h low st 1 LST24_rep2 24h low st 2
Construct DESeqDataSet
dds <- DESeqDataSetFromMatrix(countData = cts2, colData = col_data, design = ~ soil)
After running the dds script, dds and first_time objects are created in the environment, but it is empty (0 B size or object with null pointer).
View(dds) Warning messages: 1: In class(object) <- "environment" : Setting class(x) to "environment" sets attribute to NULL; result will no longer be an S4 object 2: In class(object) <- "environment" : Setting class(x) to "environment" sets attribute to NULL; result will no longer be an S4 object
Could you please suggest what I could do to make it work and where the mistakes are? Many thanks in advance!
I guess you have bigger problems with getting the package installed properly, but why is "soil" your design when it's not in your ColData? Also, you don't need "rep", unless what you really mean and wish to test for is batch.