results(dds) error: couldn't find results. you should first run DESeq()
1
0
Entering edit mode
beslinail • 0
@d4a633b9
Last seen 17 months ago
Turkey

Enter the body of text here

Code should be placed in three backticks as shown below

untar("gdc_download_20220310_195149.593210.tar.gz", exdir = "gdc_glandF_cancer")
untar("clinical.cart.2022-03-10.tar.gz")
sample_sheet <- read_tsv("gdc_sample_sheet.2022-03-10.tsv")
clinical <- read_tsv('clinical.tsv')
sampleTablejoin <- inner_join(sample_sheet, clinical,
                              by = c("Case ID" = "case_submitter_id"))

sampleTable <- sampleTablejoin %>%
  dplyr::select(`Sample ID`, `File Name`, Sample_Type) %>%
  distinct(`Sample ID`, .keep_all = TRUE) %>%
  dplyr::rename(condition = Sample_Type)



sampleTable <- sampleTablejoin %>%
  mutate(`File Name` = paste0(`File ID`, "/", `File Name`)) %>%
  dplyr::select(`Sample ID`, `File Name`, Sample_Type) %>%
  distinct(`Sample ID`, .keep_all = TRUE) %>%
  dplyr::rename(condition = Sample_Type)


dds <- DESeqDataSetFromHTSeqCount(sampleTable = as.data.frame(sampleTable),
                                  directory = "gdc_glandF_cancer",
                                  design = ~condition)

vsd <- vst(dds)
plotPCA(vsd)


dds <- DESeq(dds)
resdf <- as.data.frame(results(dds, contrast = c("condition", "Metastatic", "Solid_Tissue_Normal")))

Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': couldn't find results. you should first run DESeq()

# include your problematic code here with any corresponding output 
# please also include the results of running the following in an R session 

sessionInfo( )
RNASeqRData • 3.9k views
ADD COMMENT
0
Entering edit mode

Take it step by step :

resdf=results(dds, contrast = c("condition", "Metastatic", "Solid_Tissue_Normal"))
resdf=as.data.frame(resdf)
ADD REPLY
0
Entering edit mode

I am taking the same error. It took from me too much time. Any help? I am a new one on this issue.

Thanks

ADD REPLY
0
Entering edit mode

Can you check dds has been correctly processed ? Please give us the output of dds in your console

ADD REPLY
0
Entering edit mode
> dds <- DESeq(dds)
estimating size factors
  Note: levels of factors in the design contain characters other than
  letters, numbers, '_' and '.'. It is recommended (but not required) to use
  only letters, numbers, and delimiters '_' or '.', as these are safe characters
  for column names in R. [This is a message, not a warning or an error]
estimating dispersions
gene-wise dispersion estimates
mean-dispersion relationship
  Note: levels of factors in the design contain characters other than
  letters, numbers, '_' and '.'. It is recommended (but not required) to use
  only letters, numbers, and delimiters '_' or '.', as these are safe characters
  for column names in R. [This is a message, not a warning or an error]
final dispersion estimates
  Note: levels of factors in the design contain characters other than
  letters, numbers, '_' and '.'. It is recommended (but not required) to use
  only letters, numbers, and delimiters '_' or '.', as these are safe characters
  for column names in R. [This is a message, not a warning or an error]
fitting model and testing
Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'x' in selecting a method for function 'rowSums': cannot allocate vector of size 179.0 Mb
> resdf <- results(dds, contrast = c("condition", "Metastatic", "Solid_Tissue_Normal"))
Error in results(dds, contrast = c("condition", "Metastatic", "Solid_Tissue_Normal")) : 
  couldn't find results. you should first run DESeq()
> resdf <- as.data.frame(resdf)
Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': object 'resdf' not found
ADD REPLY
0
Entering edit mode

The main error is here : "Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'rowSums': cannot allocate vector of size 179.0 Mb " You ran out of memory so the dds object has not been created. You can try memory.limit(size=56000)

ADD REPLY
0
Entering edit mode

HOW can I try memory.limit(size=56000) ? Would you clarify it, please?

ADD REPLY
0
Entering edit mode

Copy-paste my code, run it in your console and rerun your script

ADD REPLY
0
Entering edit mode

It really worked. Thank you so much

ADD REPLY
0
Entering edit mode

I am taking the same error. It took from me too much time. Any help? I am a new one on this issue.

Thanks

ADD REPLY
0
Entering edit mode

I am taking the same error. It took from me too much time. Any help? I am a new one on this issue.

Thanks

ADD REPLY
0
Entering edit mode
@mikelove
Last seen 1 day ago
United States

What is the dim(dds)? And how much memory do you have to work with this data?

ADD COMMENT
0
Entering edit mode

total system memory is 4,061 MiB Windows system

ADD REPLY
0
Entering edit mode

4 Gb should be fine for most RNA-seq datasets, but what about my first question? Are you working with an especially large number of features or samples?

ADD REPLY
0
Entering edit mode

MY raw data is nearly 100 MB and the data is HTSeq - Counts to calculate the DEG analysis. There are three groups Solid Tissue Normal, Metastatic, Primary Tumor. but only I compare two groups of samples.

ADD REPLY
0
Entering edit mode

Ok sorry, I don't know what else to say, I've asked twice now about the dimensions of the object, but you're not saying. I guess if the raw htseq files are 100 MB then it shouldn't be an issue either.

I recommend to work with a bioinformatics group to help solve the error then. Try to run the same analysis on a different machine, this helps to identify the problem. You can save the dds object with save(dds, file="dds.rda") and then load() on a different machine to run DESeq().

ADD REPLY
0
Entering edit mode

dim(dds) [1] 60483 411

ADD REPLY
0
Entering edit mode

Recommend to start with:

tab <- table(dds$condition)
lower_n <- 0.25 * min(tab)
keep <- rowSums(counts(dds) >= 10) >= lower_n
table(keep)
dds <- dds[keep,]

This will remove the genes that have single digits counts for most samples. As you have 60,000 x 400 samples it's just using up extra space on your machine to keep those near 0 counts around in the dataset.

ADD REPLY

Login before adding your answer.

Traffic: 948 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