Hi Michael,

I followed the vignette for the section on htseq-count and your suggestion as best as I could and got some results.
But I am not sure if I did everything right, so I would really appreciate if you could verify if the following steps is the correct way to analyze this data set:

There are 4 samples for two patients:
Patient A: abc.htseq.count (Tumor), pqr.htseq.count (Normal)
Patient B: def.htseq.count (Tumor), xyz.htseq.count (Normal)

> sampleFiles=list.files(directory)
> sampleFiles
[1] "abc.htseq.count"         "def.htseq.count"
[3] "pqr.htseq.count"          "xyz.htseq.count"
>
> sampleCondition=c("Tumor","Tumor","Normal","Normal")
> samplePatient=c("A","B","A","B")
> sampleTable=data.frame(sampleName=sampleFiles, fileName=sampleFiles, condition=sampleCondition, patient=samplePatient)
> dds=DESeqDataSetFromHTSeqCount(sampleTable = sampleTable, directory=directory, design= ~ patient + condition)
>
> colData(dds)
DataFrame with 4 rows and 2 columns
                                    condition  patient
                                     <factor> <factor>
abc.htseq.count             Tumor        A
def.htseq.count              Tumor        B
pqr.htseq.count              Normal      A
xyz.htseq.countt            Normal       B
>
> dds$condition
[1] Tumor  Tumor  Normal Normal
Levels: Normal Tumor
>
> dds$patient
[1] A B A B
Levels: A B
>
> dds = DESeq(dds)
estimating size factors
estimating dispersions
gene-wise dispersion estimates
mean-dispersion relationship
final dispersion estimates
fitting model and testing
>
> result=results(dds)
>
> resOrdered2=result[order(result$padj),]
>
> head(resOrdered2,20)
DataFrame with 20 rows and 6 columns
         baseMean log2FoldChange     lfcSE      stat       pvalue         padj
        <numeric>      <numeric> <numeric> <numeric>    <numeric>    <numeric>
GAL1     873531.57     -11.645190 0.7175710 -16.22863 3.164692e-59 5.627771e-55
...
...

I did not get the normalization factors in the output, whereas it does show up in the results in the vignette, so I am not sure if I missed some step.

Also, would you expect to get meaningful results with just two matched pairs of samples with this analysis?  I am wondering if it is better to just report the FC rather than the p-values.

Thank you,

- Pankaj


________________________________
From: Michael Love [michaelisaiahlove@gmail.com]
Sent: Thursday, April 10, 2014 4:08 PM
To: Pankaj Agarwal
Cc: bioconductor@r-project.org
Subject: Re: [BioC] DESeq2: Paired Test

hi Pankaj,

You should follow the multifactor analysis section of the vignette. You would include the patient effect in the design like so:

design(dds) <- ~ patient + condition

Where 'patient' and 'condition' are factors which are columns in colData(dds), and condition has levels: normal, tumor (where normal is the base level).

Then results(dds) will build a result table for tumor vs normal, controlling for the patient effect.

Mike


On Thu, Apr 10, 2014 at 3:52 PM, Pankaj Agarwal <p.agarwal@duke.edu<mailto:p.agarwal@duke.edu>> wrote:
Hi,

This query is in reference to the following post
https://stat.ethz.ch/pipermail/bioconductor/2010-April/032869.html
where it was mentioned that "DESeq does not support paired tests  (yet)".  I have a need for performing rna-seq data analysis with matched tumor/normal pairs of data and was wondering if this capability is now available in the latest version of DESeq2.  I searched the list site and also the latest vignette, but could not find anything indicating this capability is now available in DEseq.  I would be grateful if, in case this feature is not yet available, someone could advice me how to do the analysis.  I have samples from two patients, and from each patient there is a "normal" and a "tumor" rna-seq sample data.

Thanks,

- Pankaj

        [[alternative HTML version deleted]]

_______________________________________________
Bioconductor mailing list
Bioconductor@r-project.org<mailto: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]]

