DESeq2 Dose not work
1
1
Entering edit mode
21464321 • 0
@21464321-19733
Last seen 5.8 years ago

Hey Michael

DESeq2 dose not work and I receive this message when I try to run library(DESeq2)

library(DESeq2)
Loading required package: S4Vectors
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: ‘BiocGenerics’

The following objects are masked from ‘package:parallel’:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ, clusterExport,
    clusterMap, parApply, parCapply, parLapply, parLapplyLB, parRapply, parSapply,
    parSapplyLB

The following objects are masked from ‘package:stats’:

    IQR, mad, sd, var, xtabs

The following objects are masked from ‘package:base’:

    anyDuplicated, append, as.data.frame, basename, cbind, colMeans, colnames,
    colSums, dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
    grepl, intersect, is.unsorted, lapply, lengths, Map, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank, rbind, Reduce,
    rowMeans, rownames, rowSums, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit, which, which.max, which.min


Attaching package: ‘S4Vectors’

The following object is masked from ‘package:base’:

    expand.grid

Loading required package: IRanges

Attaching package: ‘IRanges’

The following object is masked from ‘package:grDevices’:

    windows

Loading required package: GenomicRanges
Loading required package: GenomeInfoDb
Loading required package: SummarizedExperiment
Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with 'browseVignettes()'. To
    cite Bioconductor, see 'citation("Biobase")', and for packages
    'citation("pkgname")'.

Loading required package: DelayedArray
Loading required package: matrixStats

Attaching package: ‘matrixStats’

The following objects are masked from ‘package:Biobase’:

    anyMissing, rowMedians

Loading required package: BiocParallel

Attaching package: ‘DelayedArray’

The following objects are masked from ‘package:matrixStats’:

    colMaxs, colMins, colRanges, rowMaxs, rowMins, rowRanges

The following objects are masked from ‘package:base’:

    aperm, apply

Error: package or namespace load failed for ‘DESeq2’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 there is no package called ‘colorspace’
In addition: Warning messages:
1: package ‘DESeq2’ was built under R version 3.5.2 
2: package ‘matrixStats’ was built under R version 3.5.2

and when I try to run the following script

  data <- read.table("Single.cntTable",header=T,row.names=1)
groups <- factor(c(rep("TGroup",6),rep("CGroup",6)))
min_read <- 1
data <- data[apply(data,1,function(x){max(x)}) > min_read,]
sampleInfo <- data.frame(groups,row.names=colnames(data))
library(DESeq2, quietly=T)
dds <- DESeqDataSetFromMatrix(countData = data, colData = sampleInfo, design = ~ groups)
dds$condition = relevel(dds$groups,"CGroup")
dds <- DESeq(dds)
res <- results(dds,independentFiltering=F)
write.table(res, file="Single_gene_TE_analysis.txt", sep="\t",quote=F)

I receive this output

> data <- read.table("Single.cntTable",header=T,row.names=1)
> groups <- factor(c(rep("TGroup",6),rep("CGroup",6)))
> min_read <- 1
> data <- data[apply(data,1,function(x){max(x)}) > min_read,]
> sampleInfo <- data.frame(groups,row.names=colnames(data))
> library(DESeq2, quietly=T)
Error: package or namespace load failed for ‘DESeq2’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 there is no package called ‘colorspace’
In addition: Warning message:
package ‘DESeq2’ was built under R version 3.5.2 
> dds <- DESeqDataSetFromMatrix(countData = data, colData = sampleInfo, design = ~ groups)
Error in DESeqDataSetFromMatrix(countData = data, colData = sampleInfo,  : 
  could not find function "DESeqDataSetFromMatrix"
> dds$condition = relevel(dds$groups,"CGroup")
Error in relevel(dds$groups, "CGroup") : object 'dds' not found
> dds <- DESeq(dds)
Error in DESeq(dds) : could not find function "DESeq"
> res <- results(dds,independentFiltering=F)
Error in results(dds, independentFiltering = F) : 
  could not find function "results"
> write.table(res, file="Single_gene_TE_analysis.txt", sep="\t",quote=F)
Error in is.data.frame(x) : object 'res' not found

I wonder if you could help me please

thanks

Sam

deseq2 • 3.4k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 6 days ago
United States

Try reinstalling Bioconductor

ADD COMMENT
0
Entering edit mode

Thanks Michael, I've already done that but nothing changed. DESeq2 does not work. I've reinstalled R and R studio, I've tried to run this code which I run it successfully many times before

>     data <- read.table("Single.cntTable",header=T,row.names=1)
groups <- factor(c(rep("TGroup",6),rep("CGroup",6)))
min_read <- 1
data <- data[apply(data,1,function(x){max(x)}) > min_read,]
sampleInfo <- data.frame(groups,row.names=colnames(data))
library(DESeq2, quietly=T)
dds <- DESeqDataSetFromMatrix(countData = data, colData = sampleInfo, design = ~ groups)
dds$condition = relevel(dds$groups,"CGroup")
dds <- DESeq(dds)
res <- results(dds,independentFiltering=F)
write.table(res, file="Single_gene_TE_analysis.txt", sep="\t",quote=F)
resSig <- res[(!is.na(res$padj) & (res$padj < 0.050000) & (abs(res$log2FoldChange)> 0.000000)), ]
resSig
write.table(resSig, file="Single_sigdiff_gene_TE.txt",sep="\t", quote=F)enter code here

I got this output whenever try to run it again

 > data <- read.table("Single.cntTable",header=T,row.names=1)
> groups <- factor(c(rep("TGroup",6),rep("CGroup",6)))
> min_read <- 1
> data <- data[apply(data,1,function(x){max(x)}) > min_read,]
> sampleInfo <- data.frame(groups,row.names=colnames(data))
> library(DESeq2, quietly=T)
Error: package or namespace load failed for ‘DESeq2’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 there is no package called ‘rlang’
> dds <- DESeqDataSetFromMatrix(countData = data, colData = sampleInfo, design = ~ groups)
Error in DESeqDataSetFromMatrix(countData = data, colData = sampleInfo,  : 
  could not find function "DESeqDataSetFromMatrix"
> dds$condition = relevel(dds$groups,"CGroup")
Error in relevel(dds$groups, "CGroup") : object 'dds' not found
> dds <- DESeq(dds)
Error in DESeq(dds) : could not find function "DESeq"
> res <- results(dds,independentFiltering=F)
Error in results(dds, independentFiltering = F) : 
  could not find function "results"
> write.table(res, file="Single_gene_TE_analysis.txt", sep="\t",quote=F)
Error in is.data.frame(x) : object 'res' not found
> resSig <- res[(!is.na(res$padj) & (res$padj < 0.050000) & (abs(res$log2FoldChange)> 0.000000)), ]
Error: object 'res' not found
> resSig
Error: object 'resSig' not found
> write.table(resSig, file="Single_sigdiff_gene_TE.txt",sep="\t", quote=F)
Error in is.data.frame(x) : object 'resSig' not found
>
ADD REPLY
0
Entering edit mode

All I can see from this code is that DESeq2 isn’t installled. All the errors are that the software isn’t loaded. Not sure how to help any more.

ADD REPLY
0
Entering edit mode

I feel like I've had a similar problem with another package before. It had something to do with only source version of the package being available. Try installing the packages that give you an error manually. For example, where it says: there is no package called ‘rlang’ dds Manually install rlang and then re-try DESeq2.

ADD REPLY
0
Entering edit mode

Start at the first error

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

and fix it (by installing rlang).

ADD REPLY

Login before adding your answer.

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