Hello,
I am sure that more experienced members on this list will have better things
to say about your design matrix, but here is my $0.25.

As a block receives all the treatments in the design (in your case, Normal
and Cancer) so each biorep is a block.

Further if I understand your problem correctly then-

TS<-factor(TS,levels=c("F.
normal", "F.cancer", "M.normal", "M.cancer"))
design<-model.matrix(~0+TS)


makes sense only when you can consider Males and Females to a treatment. Is
this justifiable?

A more traditional way is to block on sex, but since you already have
blocked on a patient, introducing another block is a good idea if you
designed your experiment taking this into account (something like latin
squares - but the data that you have shown doesn't point to this design)

As you are interested in differential expression in males and females
separately (which I think is a good way to analyze this data). If I were to
construct a design matrix, I would have constructed it separately for males
and females.

## for females
TS.f <-factor(TS,levels=c("F.
normal", "F.cancer"))
design.f <-model.matrix(~0+TS.f)


## for males
TS.m<-factor(TS,levels=c("M.normal", "M.cancer"))
design.m<-model.matrix(~0+TS.m)

I know doing this would reduce the sample size and hence related power
issues, you can avoid this if the assumption of treating M and F as
treatments is justified.

Hope this helps!

I may be very wrong, but I would be very happy if someone corrected me.

Thanks,
Sanvesh.

On Thu, Dec 17, 2009 at 4:48 PM, <lujian0311@gmail.com> wrote:

> I am new to Limma and have some basic questions to ask about the matrix
> design:
>
> (1) I have used RNA-Seq methods to get gene expression profiles from 6
> patients, three of them are male, and the other three are females.
> (2) For each patient, we got expresson data of the normal tissues and
> cancer tissues.
>
> I want to use Limma to analyze these RNA-Seq data and want to address the
> following questions:
>
> (1) Differentially expressed genes in Normal and Cancer tissues in Male.
> (2) Differentially expressed genes in Normal and Cancer tissues in Female.
> (3) Whether male and females have the same set of genes that are
> differentially expressed genes between normal and cancer tissues.
>
> Thus I have the target object which is as the following:
> > target
> gender treatment biolrep
> 1 F normal 1
> 2 F cancer 1
> 3 F normal 2
> 4 F cancer 2
> 5 F normal 3
> 6 F cancer 3
> 7 M normal 4
> 8 M cancer 4
> 9 M normal 5
> 10 M cancer 5
> 11 M normal 6
> 12 M cancer 6
>
> Below is the code for the limma process. I am not sure whether I should
> treat the paired samples into a block or not. Any suggestions will be
> greatly appreciated.
>
>
> TS<-factor(TS,levels=c("F.normal", "F.cancer", "M.normal", "M.cancer"))
> design<-model.matrix(~0+TS)
> colnames(design)<-levels(TS)
>
> corfit <- duplicateCorrelation(eset, design, ndups=1, block=target$biolrep)
> fit <- lmFit(eset, design, ndups=1, block=target$biolrep,
> cor=corfit$consensus)
>
> contrasts <-
>
> makeContrasts(Fdif=F.normal-F.cancer,Mdif=M.normal-M.cancer,Diff=(F.normal-F.cancerF)-(M.normal-M.cancer),levels=design)
>
>
> fit2 <- contrasts.fit(fit, contrasts)
> fit2 <- eBayes(fit2)
>
> results<-decideTests(fit2,lfc=log2(1.1))
> vennDiagram(results)
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>

	[[alternative HTML version deleted]]

