hi Sindree,

The section you refer to in the limma guide is treating the patient effect
as a random effect, which is not the approach of DESeq2. If you want to use
a particular limma approach on RNA-Seq data, you should check out the ?voom
function in the limma package.

Mike


On Fri, Oct 18, 2013 at 1:20 PM, Sindre Lee <sindre.lee@studmed.uio.no>wrote:

> Hi!
> I have two groups at two time points. And the samples are the same in both
> time points. I have run this in DESeq2:
>
> sampleFiles <- list.files(path="/Volumes/**timemachine/HTseq_DEseq2",**
> pattern="*.txt");
> status <- factor(c(rep("Healthy",26), rep("Diabetic",22)))
> timepoints = as.factor(c(1,1,1,1,1,1,1,1,1,**
> 1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,**2,2,1,1,1,1,1,1,1,1,1,1,1,2,2,**
> 2,2,2,2,2,2,2,2,2));
> sampleTable <- data.frame(sampleName = sampleFiles, fileName =
> sampleFiles, status=status, timepoints=timepoints);
> directory <- c("/Volumes/timemachine/HTseq_**DEseq2/");
> des <- formula(~timepoints+status);
> ddsHTSeq <- DESeqDataSetFromHTSeqCount(**sampleTable = sampleTable,
> directory = directory, design= des);
> ddsHTSeq
>
> This is however not correct.
>
> When looking at the Limma manual page 49: http://www.bioconductor.org/**
> packages/2.12/bioc/vignettes/**limma/inst/doc/usersguide.pdf<http://www.bioconductor.org/packages/2.12/bioc/vignettes/limma/inst/doc/usersguide.pdf>
>
> This example is perfect for my experiment, but "Tissue = A or B" should be
> "Timepoint = 1 or 2".
>
> So timepoint = 1 or 2 = Paired data, and Disease vs Normal = unpaired data.
>
> I want to compare both within and between samples, so how can I do this in
> DESeq2?
>
>  sampleTable
>>
>    sampleName fileName   status timepoints
> 1    D104.txt D104.txt  Healthy          1
> 2    D121.txt D121.txt  Healthy          1
> 3    D153.txt D153.txt  Healthy          1
> 4    D155.txt D155.txt  Healthy          1
> 5    D161.txt D161.txt  Healthy          1
> 6    D162.txt D162.txt  Healthy          1
> 7    D167.txt D167.txt  Healthy          1
> 8    D173.txt D173.txt  Healthy          1
> 9    D176.txt D176.txt  Healthy          1
> 10   D177.txt D177.txt  Healthy          1
> 11   D179.txt D179.txt  Healthy          1
> 12   D204.txt D204.txt  Healthy          1
> 13   D221.txt D221.txt  Healthy          1
> 14   D253.txt D253.txt  Healthy          2
> 15   D255.txt D255.txt  Healthy          2
> 16   D261.txt D261.txt  Healthy          2
> 17   D262.txt D262.txt  Healthy          2
> 18   D267.txt D267.txt  Healthy          2
> 19   D273.txt D273.txt  Healthy          2
> 20   D276.txt D276.txt  Healthy          2
> 21   D277.txt D277.txt  Healthy          2
> 22   D279.txt D279.txt  Healthy          2
> 23   N101.txt N101.txt  Healthy          2
> 24   N108.txt N108.txt  Healthy          2
> 25   N113.txt N113.txt  Healthy          2
> 26   N170.txt N170.txt  Healthy          2
> 27   N171.txt N171.txt Diabetic          1
> 28   N172.txt N172.txt Diabetic          1
> 29   N175.txt N175.txt Diabetic          1
> 30   N181.txt N181.txt Diabetic          1
> 31   N182.txt N182.txt Diabetic          1
> 32   N183.txt N183.txt Diabetic          1
> 33   N186.txt N186.txt Diabetic          1
> 34   N187.txt N187.txt Diabetic          1
> 35   N188.txt N188.txt Diabetic          1
> 36   N201.txt N201.txt Diabetic          1
> 37   N208.txt N208.txt Diabetic          1
> 38   N213.txt N213.txt Diabetic          2
> 39   N270.txt N270.txt Diabetic          2
> 40   N271.txt N271.txt Diabetic          2
> 41   N272.txt N272.txt Diabetic          2
> 42   N275.txt N275.txt Diabetic          2
> 43   N281.txt N281.txt Diabetic          2
> 44   N282.txt N282.txt Diabetic          2
> 45   N283.txt N283.txt Diabetic          2
> 46   N286.txt N286.txt Diabetic          2
> 47   N287.txt N287.txt Diabetic          2
> 48   N288.txt N288.txt Diabetic          2
>
> The commands used in Limma (still at page 49):
>
> targets <- readTargets("/Volumes/**timemachine/HTseq_DEseq2/**
> Targets.rtf");
> Treat <- factor(paste(targets$status,**targets$timepoints,sep="."));
> design <- model.matrix(~0+Treat);
> colnames(design) <- levels(Treat)
>
> So how can I create the "Targets.rtf" file? And is these commands the same
> when using DESeq2?
>
> Thank you so much!
>
> ______________________________**_________________
> Bioconductor mailing list
> Bioconductor@r-project.org
> https://stat.ethz.ch/mailman/**listinfo/bioconductor<https://stat.ethz.ch/mailman/listinfo/bioconductor>
> Search the archives: http://news.gmane.org/gmane.**
> science.biology.informatics.**conductor<http://news.gmane.org/gmane.science.biology.informatics.conductor>
>

	[[alternative HTML version deleted]]

