Question: Problem with construction of DESeqDataSet object
0
gravatar for purinprima1
6 weeks ago by
purinprima10 wrote:

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!

deseq2 • 162 views
ADD COMMENTlink modified 6 weeks ago by Michael Love23k • written 6 weeks ago by purinprima10

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.

ADD REPLYlink written 6 weeks ago by swbarnes2200
Answer: Problem with construction of DESeqDataSet object
0
gravatar for Michael Love
6 weeks ago by
Michael Love23k
United States
Michael Love23k wrote:

I don’t know if you can View() a Bioc S4 object. Is there any issue with running the DESeq2 pipeline or just this attempt to View() in Rstudio?

ADD COMMENTlink written 6 weeks ago by Michael Love23k

Hi Michael, Thank you for your respond. Is this what you mean?

dds class: DESeqDataSet dim: 349947 48 metadata(1): version assays(1): counts rownames(349947): TRINITYDN0c0g1 TRINITYDN0c1g1 ... TRINITYDN9c1g1 TRINITYDN9c1g2 rowData names(0): colnames(48): NST24rep1 NST24rep2 ... LHL48rep3 LHL48rep4 colData names(4): time dmg treat rep

ADD REPLYlink written 6 weeks ago by purinprima10

I don’t think there’s any error or problem here

ADD REPLYlink written 6 weeks ago by Michael Love23k

I think I the installation of deseq2 was probably not done properly. I tried with commands: if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install("DESeq2") Output: Error in loadNamespace(name) : there is no package called ‘BiocManager’ install.packages("BiocManager") Warning in install.packages : package ‘BiocManager’ is not available (for R version 3.3.3)

Also tried with: source("https://bioconductor.org/biocLite.R") biocLite("DESeq2") #no to update request library(DESeq2)

Output: library(DESeq2) Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : there is no package called ‘tibble’ Error: package or namespace load failed for ‘DESeq2’

I just updated my Rstudio (I use Mac) to version 1.2.1335, and I get many errors also with other packages that used to work before upgrading. Could you please give suggestion the best way to do installation? Thank you.

ADD REPLYlink written 6 weeks ago by purinprima10

You have an older version of R.

I'd recommend to obtain the latest version of R and then follow these instructions:

http://bioconductor.org/install

(Bioconductor is actually a few days away from a new release -- which happens every 6 months -- so if you wait until Friday or perhaps Monday you will get the latest and greatest software)

ADD REPLYlink written 6 weeks ago by Michael Love23k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 263 users visited in the last hour