hi Noa,

Could you email me a small reproducible example? e.g.:

...
dds <- nbinomWaldTest(dds, betaPrior = FALSE)
idx <- 1234 # the row you are referencing
ddsSub <- dds[idx, ]
save(ddsSub, "small_example.RData")

best,

Mike



On Sun, Jan 12, 2014 at 9:03 AM, Noa Henig <ntzunz@gmail.com> wrote:

> Hi Simon,
> I forgot to mention that the counts are the *normalized* counts, I guess
> this is the reason you asked for the size factors.
> I ran DESeq2 again using the code below (this time with beta prior = FALSE
> to handle the issue of zeros and low counts I originally had). The fold
> change in this run was a little higher than before:
> log2FC (T1/T0) = 3.97;  log2FC (T3/T0) = 3.64
> How can this be explained considering the values of the normalized counts
> for that gene? should I do some modification to adjust also for the high
> counts?
> Thanks !
> Noa
>
>
> This is the code:
> countData = read.table("merged_counts.txt", header=TRUE, row.names=1)
> colData = data.frame(row.names=colnames(countData), condition =
> c(param[,2])) ## it's a long list of samples names
> colData$condition = factor( colData$condition, levels =
> c(param[1:numOfConditions,7]))
>
> dds <- DESeqDataSetFromMatrix(countData = countData, colData = colData,
> design = ~condition)
> dds <- estimateSizeFactors(dds)
> dds <- estimateDispersions(dds, maxit = max_iterations) ## a user-defined
> parameter
> dds <- nbinomWaldTest(dds, betaPrior = FALSE)
> tmp_counts = counts(dds, normalized=TRUE)
> normalized_counts = data.frame(tmp_counts)
>
> final_stats = NULL
> filtering_thresholds = matrix(ncol = 2, nrow = as.numeric(param[1,3]),
> byrow = TRUE)
> for(i in 1:numOfComparisons)
> {
> curr_res = results(dds, alpha = 0.05, contrast = c("condition", param[i,4],
> param[i,5]))
>          ..writing the data...
> }
>
>
>
>
> On Wed, Jan 8, 2014 at 3:21 PM, Simon Anders <anders@embl.de> wrote:
>
> > Hi Noa
> >
> > On 08/01/14 14:11, Noa Henig wrote:
> > > I would expect, for example:
> > > genes having these counts T0: 29852 and 39519; T1: 37352 and 44385;
> > > T3:52539 and 58,556.
> > > The log2 fold change of T0/T1 was 3.28 (p-adjusted was 0.04), while the
> > > log2 fold change of T2/T0 was 2.96 (p-adjusted was 0.105)
> >
> > Please tell us the values of the size factors (run "sizeFactors(dds)")
> > to see how far off this is.
> >
> > And please always post your code, not just the output.
> >
> >   Simon
> >
> > _______________________________________________
> > Bioconductor mailing list
> > Bioconductor@r-project.org
> > https://stat.ethz.ch/mailman/listinfo/bioconductor
> > Search the archives:
> > http://news.gmane.org/gmane.science.biology.informatics.conductor
> >
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>

	[[alternative HTML version deleted]]

