If you're trying to do a comparison, the edgeR equivalent would be the "RLE" method in calcNormFactors(). estimateSizeFactors() doesn't take an option in this regard (see help(estimateSizeFactors) for what options it does have).
Unconfigured Ad
Collapse
X
-
Here is my sessionInfo()Originally posted by Michael Love View PostThe local fit helps you out by dipping down at the high counts, giving you lower estimates of dispersion there than by taking the mean overall. The large circles are genes whose dispersion estimates are not shrunk because they deviate too far from the fitted line. The local fit is useable as well I would say.
I presume -- because you haven't posted the output of sessionInfo() -- that you could be using a version of DESeq2 which performs automatic independent filtering to optimize the number of rejections. Check the Details section of ?results and the argument 'independentFiltering'.
I'm still having some questions about the independent filtering. I am understanding that I have to perform it right after the:Code:> sessionInfo() R version 3.0.2 (2013-09-25) Platform: x86_64-apple-darwin10.8.0 (64-bit) locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] grid parallel stats graphics grDevices utils datasets methods base other attached packages: [1] gplots_2.11.3 MASS_7.3-29 KernSmooth_2.23-10 caTools_1.14 [5] gdata_2.13.2 gtools_3.1.0 RColorBrewer_1.0-5 DESeq2_1.2.0 [9] RcppArmadillo_0.3.920.1 Rcpp_0.10.5 GenomicRanges_1.14.1 XVector_0.2.0 [13] IRanges_1.20.0 BiocGenerics_0.8.0 loaded via a namespace (and not attached): [1] annotate_1.40.0 AnnotationDbi_1.24.0 Biobase_2.22.0 bitops_1.0-6 [5] DBI_0.2-7 genefilter_1.44.0 lattice_0.20-24 locfit_1.5-9.1 [9] RSQLite_0.11.4 splines_3.0.2 stats4_3.0.2 survival_2.37-4 [13] tools_3.0.2 XML_3.95-0.2 xtable_1.7-1
With the code:Code:dds<- estimateSizeFactors(dds) ddsLocal <- estimateDispersions(dds, fitType="local") ddsLocal <- nbinomWaldTest(ddsLocal) res <- results(ddsLocal, name= "condition_MR_vs_BR") res <- res[order(res$padj),]
And then continue with (for example):Code:use <- res$baseMean >= 10 & !is.na(res$pvalue) resFilt <- res [use, ] resFilt$padj <- p.adjust(resFilt$pvalue, method="BH")
But i also found this code:Code:#filter for upregulated and downregulated genes resSig <- resFilt[ resFilt$padj < .1, ] write.table(resSig[ order( resSig$log2FoldChange, -resSig$baseMean ), ] ,"~\\DESeq2\\BRvsMR_old_DownRegulated.txt") write.table(resSig[ order( -resSig$log2FoldChange, -resSig$baseMean ), ],"~\\DESeq2\\BRvsMR_old_UpRegulated.txt")
And now i'm really confused. What is this for? (the last code) When i have to use it? Am I doing something wrong?Code:filterThreshold <- 2.0 keep <- rowMeans ( counts(ddsLocal, normalized=TRUE)) > filterThreshold
Thank you again for the help.
Comment
-
-
You are using DESeq2 v1.2 and reading the documentation off the Bioc website for version v1.0.
This is why I recommended you to look up the man page for ?results.
And it's always safer to use:
browseVignettes("DESeq2")
to ensure you are reading the documentation for the version you are using.
Comment
-
-
Ups! Thanks!Originally posted by Michael Love View PostYou are using DESeq2 v1.2 and reading the documentation off the Bioc website for version v1.0.
This is why I recommended you to look up the man page for ?results.
And it's always safer to use:
browseVignettes("DESeq2")
to ensure you are reading the documentation for the version you are using.
By using:
i am obtainingCode:browseVignettes("DESeq2")
Any idea about why this is happening?Code:/library/DESeq2/doc/DESeq2.pdf not found
Comment
-
-
Hi
I just started using DEseq2, so please correct if i am wrong.
My sample description has five time points (with 2 replicates).
(t0,t0,t1,t1,t2,t2,t3,t3,t4,t4,t5,t5)
if i set the timepoint design, i always get the differential expression through initial time point (control).
In addition to this, i also want to have differential expression with respect to the immediate time points (like t1 to t0, t2 to t1, t3 to t2, t4 to t3 and t5 to t4). Can you please tell me how to set the factor levels to get this type of comparison.
thank youLast edited by i4u412; 10-23-2013, 04:57 AM.
Comment
-
-
Hi,
I'm using DESeq2_1.2.0 and I am having this error:
It's really weird because this error started today and I have been using the same datasets and the same Rscript for the last 3 weeks without this error coming up.Code:> resSig <- res[ res$padj < .1, ] Error in normalizeSingleBracketSubscript(i, x, byrow = TRUE, exact = FALSE) : subscript contains NAs
Just in case, here is my code:
And my sessionInfo()Code:#Count matrix input Cele_SPvsLR_old = read.csv (file.choose(), header=TRUE, row.names=1) CeleDesign <- data.frame( row.names = colnames(Cele_SPvsLR_old), condition = factor(c("SP", "SP", "LR", "LR"))) dds <- DESeqDataSetFromMatrix(countData = Cele_SPvsLR_old, colData = CeleDesign, design = ~ condition) dds #Est size factor = normalize for library size dds<- estimateSizeFactors(dds) ddsLocal <- estimateDispersions(dds, fitType="local") ddsLocal <- nbinomWaldTest(ddsLocal) plotDispEsts(ddsLocal) #Differential expression analysis resultsNames(ddsLocal) res <- results(ddsLocal, name= "condition_SP_vs_LR") res <- res[order(res$padj),] head(res) plotMA(ddsLocal, ylim=c(-2,2), main="DESeq2") sum(res$padj < .1, na.rm=TRUE) #filter for significant genes resSig <- res[ res$padj < 0.1, ]
Can anyone give me an explanation about why am I having this error now but not in the past using exactly the same Rscript and datasets? Does anyone know how to fix it?Code:> sessionInfo() R version 3.0.2 (2013-09-25) Platform: x86_64-apple-darwin10.8.0 (64-bit) locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] parallel stats graphics grDevices utils datasets methods base other attached packages: [1] DESeq2_1.2.0 RcppArmadillo_0.3.920.1 Rcpp_0.10.5 GenomicRanges_1.14.1 [5] XVector_0.2.0 IRanges_1.20.0 BiocGenerics_0.8.0 loaded via a namespace (and not attached): [1] annotate_1.40.0 AnnotationDbi_1.24.0 Biobase_2.22.0 DBI_0.2-7 [5] genefilter_1.44.0 grid_3.0.2 lattice_0.20-24 locfit_1.5-9.1 [9] RColorBrewer_1.0-5 RSQLite_0.11.4 splines_3.0.2 stats4_3.0.2 [13] survival_2.37-4 tools_3.0.2 XML_3.95-0.2 xtable_1.7-1
Thanks!Last edited by alisrpp; 10-24-2013, 11:50 AM.
Comment
-
-
contrast argument
Hi,
I have started using DESeq2 on a multi-factor design. Everything goes fine until I try to use the "contrast" argument on the "results" function in order to get somparisons other than the ones concerning the control condition.
This is what I get:
> res.R24.OE1=results(dds.gtype,contrast=c("gtype","R24","OE1"))
Error in results(dds.gtype, contrast = c("gtype", "R24", "OE1")) :
unused argument (contrast = c("gtype", "R24", "OE1"))
"gtype" being my factor and "R24" and "OE1" my two conditions.
I would be very grateful if you could help me out on this one.
Thanks!
Comment
-
-
Hi,
I am using DESeq2 version 1.2.5 and when I use this design:
> design(dds) <- formula(~ AGE + SEX + CONDITION)
Defining the variables:
> colData(dds)$CONDITION <- relevel(colData(dds)$CONDITION, "R")
> colData(dds)$SEX <- relevel(colData(dds)$SEX, "M")
Whereas AGE is a continuous variable
I get this error:
> dds <- DESeq(dds)
using pre-existing size factors
estimating dispersions
you had estimated dispersions, replacing these
gene-wise dispersion estimates
error: inv(): matrix appears to be singular
On the other hand, there are no problems with these combinations:
> design(dds) <- formula(~ AGE)
> design(dds) <- formula(~ CONDITION)
> design(dds) <- formula(~ SEX + CONDITION)
While I get the same error with:
> design(dds) <- formula(~ AGE + CONDITION)
Any clue what's going on here?
Thank you so much in advance for your help
Comment
-
-
Here it is:Originally posted by Michael Love View PostCan you please post colData(dds) (or some scrubbed version of it)? This helps me figure out what the design matrix looks like, and therefore why some designs are causing errors.
> colData(dds)
DataFrame with 122 rows and 4 columns
CONDITION KEEP AGE SEX
<factor> <integer> <numeric> <factor>
ID1 A 1 47.06913 F
ID2 A 1 45.33333 M
ID3 A 1 59.63039 F
ID4 A 1 49.00753 M
ID5 A 1 34.94319 M
... ... ... ... ...
ID118 B 1 30.00684 M
ID119 B 1 41.90828 F
ID120 B 1 39.04449 F
ID121 B 1 39.64682 M
ID122 B 1 16.70363 M
Comment
-
Latest Articles
Collapse
-
by SEQadmin2
Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.
The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
...-
Channel: Articles
06-02-2026, 10:05 AM -
-
by SEQadmin2
With the launch of new single-cell sequencing platforms in 2026, the field stands at an exciting inflection point. This article surveys the most impactful advances in the field and discusses how they’re reshaping research in cancer, immunology, and beyond.
Introduction
Single-cell sequencing technologies have undergone remarkable advances over the past decade, transitioning from low-throughput experimental approaches to highly scalable platforms capable of...-
Channel: Articles
05-22-2026, 06:42 AM -
ad_right_rmr
Collapse
News
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by SEQadmin2, Yesterday, 10:09 AM
|
0 responses
10 views
0 reactions
|
Last Post
by SEQadmin2
Yesterday, 10:09 AM
|
||
|
Started by SEQadmin2, 06-04-2026, 08:59 AM
|
0 responses
21 views
0 reactions
|
Last Post
by SEQadmin2
06-04-2026, 08:59 AM
|
||
|
Started by SEQadmin2, 06-02-2026, 12:03 PM
|
0 responses
27 views
0 reactions
|
Last Post
by SEQadmin2
06-02-2026, 12:03 PM
|
||
|
Started by SEQadmin2, 06-02-2026, 11:40 AM
|
0 responses
22 views
0 reactions
|
Last Post
by SEQadmin2
06-02-2026, 11:40 AM
|
Comment