limma analysis of 2-color experiment with tech reps [was: Help with]
1
0
Entering edit mode
@gordon-smyth
Last seen 2 hours ago
WEHI, Melbourne, Australia
Dear Guillaume, I am going to assume that the main purpose of your experiment is to find genes for which the d7 vs d1 response is different between the two groups of patients. > Date: Fri, 20 May 2011 15:44:45 +0200 > From: Guillaume Meurice <guillaume.meurice at="" igr.fr=""> > To: Guillaume Meurice <guillaume.meurice at="" igr.fr=""> > Cc: bioconductor at stat.math.ethz.ch > Subject: Re: [BioC] Help with > > Sorry, I made some mistake in my previous mail, into the contrast matrix > (bad copy paste from another project), so here I have corrected them. > >> I have a question regarding the way to properly design biological >> replicate and technical replicates. >> >> In the projet, we have two groups of sample : R (respond to the >> treatment), NR (no response). For each groups, there is several >> replicates (3) that come from different patients (so not strictely >> biological). Each patient have two sample : one at day one(d1), the >> second after one week (d7) The hybridization are planned to be >> performed in dual color, with dye-sap. >> >> Here is the target file : >> >> Cy3 Cy5 Patient Issu TechnicalReplicat >> d1 d7 A R 1 >> d7 d1 A R 1 >> d1 d7 B R 2 >> d7 d1 B R 2 >> d1 d7 C R 3 >> d7 d1 C R 3 >> d1 d7 D NR 4 >> d7 d1 D NR 4 >> d1 d7 E NR 5 >> d7 d1 E NR 5 >> d1 d7 F NR 6 >> d7 d1 F NR 6 >> >> >> my question is how to properly design the matrix design and the >> contrast matrix to answer the difference between the two groups ? Which >> column should I use as biological replicat (so as I can use the >> duplicateCorrelation function) ? >> >> here is how I've started, but I can't figure out how to use >> duplicateCorrelation with this design >> >> design <- cbind( >> R_D7vsD1 = c(-1,1,-1,1,-1,1, 0,0, 0,0, 0,0), >> NR_D7vsD1 = c( 0,0,0,0,0,0,-1,1,-1,1,-1,1) >> ) Since you have gone to the trouble of dye-swapping, you should also include an intercept term in the design matrix, so as to soak up any probe-specific dye effects: design <- cbind(Dye=1,design) Then cor <- duplicateCorrelation(MAn, design, weights=NULL, block=targets$TechnicalReplicat) fit <- lmFit(MAn, design, weights=NULL, block=targets$TechnicalReplicat, correlation=cor$consensus) Best wishes Gordon >> fit <- lmFit(MAn, design, weights = NULL) >> cont.mat = makeContrasts(NRvsR = NR_D7sD1 - R_D7vsD1, levels = design) >> fit2 <- contrasts.fit(fit, cont.mat) >> fit2 <- eBayes(fit2) >> >> >> Many thanks by advance for any help. >> >> -- >> Guillaume ______________________________________________________________________ The information in this email is confidential and intend...{{dropped:4}}
• 984 views
ADD COMMENT
0
Entering edit mode
@guillaume-meurice-4494
Last seen 10.2 years ago
Dear Gordon, many thanks for your answer. > I am going to assume that the main purpose of your experiment is to find genes for which the d7 vs d1 response is different between the two groups of patients. you're right, this exactly what I'm looking for. > > Since you have gone to the trouble of dye-swapping, you should also include an intercept term in the design matrix, so as to soak up any probe-specific dye effects: > > design <- cbind(Dye=1,design) I'll try this but is cost one degree of freedom (I guess ?). Is it a could procedure to run the statistical test with the intercept term, then eventually discard the dye-specific probes, and then re- perform the test without the intercept ? > Then > > cor <- duplicateCorrelation(MAn, design, weights=NULL, > block=targets$TechnicalReplicat) Great !! Could I also use this approach to model my biological replicates ? I mean, here, patients A, B and C (one side) and D,E,F (other side) are biological replicates. Could I use something like : cor <- duplicateCorrelation(MAn, design, weights=NULL, block=targets$Issu) ? > fit <- lmFit(MAn, design, weights=NULL, > block=targets$TechnicalReplicat, correlation=cor$consensus) then are the following line correct ? # computing the contrast matrix cont.mat = makeContrasts(RvsNR = R_D7vsD1 - NR_D7vsD1, levels = design) # Fitting the model to the contrast matrix: fit2 <- contrasts.fit(fit, cont.mat) fit2 <- eBayes(fit2) # the probe list I want: res.RvsNR = topTable(fit2,number=nrow(MAm), coef="RvsNR") # the dye-specific probes : res.RvsNR = topTable(fit2,number=nrow(MAm), coef="Dye") many thank again. Best regards, -- Guillaume > Dear Guillaume, > > I am going to assume that the main purpose of your experiment is to find genes for which the d7 vs d1 response is different between the two groups of patients. > >> Date: Fri, 20 May 2011 15:44:45 +0200 >> From: Guillaume Meurice <guillaume.meurice@igr.fr> >> To: Guillaume Meurice <guillaume.meurice@igr.fr> >> Cc: bioconductor@stat.math.ethz.ch >> Subject: Re: [BioC] Help with >> >> Sorry, I made some mistake in my previous mail, into the contrast matrix (bad copy paste from another project), so here I have corrected them. >> >>> I have a question regarding the way to properly design biological replicate and technical replicates. >>> >>> In the projet, we have two groups of sample : R (respond to the treatment), NR (no response). For each groups, there is several replicates (3) that come from different patients (so not strictely biological). Each patient have two sample : one at day one(d1), the second after one week (d7) The hybridization are planned to be performed in dual color, with dye-sap. >>> >>> Here is the target file : >>> >>> Cy3 Cy5 Patient Issu TechnicalReplicat >>> d1 d7 A R 1 >>> d7 d1 A R 1 >>> d1 d7 B R 2 >>> d7 d1 B R 2 >>> d1 d7 C R 3 >>> d7 d1 C R 3 >>> d1 d7 D NR 4 >>> d7 d1 D NR 4 >>> d1 d7 E NR 5 >>> d7 d1 E NR 5 >>> d1 d7 F NR 6 >>> d7 d1 F NR 6 >>> >>> >>> my question is how to properly design the matrix design and the contrast matrix to answer the difference between the two groups ? Which column should I use as biological replicat (so as I can use the duplicateCorrelation function) ? >>> >>> here is how I've started, but I can't figure out how to use duplicateCorrelation with this design >>> >>> design <- cbind( >>> R_D7vsD1 = c(-1,1,-1,1,-1,1, 0,0, 0,0, 0,0), >>> NR_D7vsD1 = c( 0,0,0,0,0,0,-1,1,-1,1,-1,1) >>> ) > > Since you have gone to the trouble of dye-swapping, you should also include an intercept term in the design matrix, so as to soak up any probe-specific dye effects: > > design <- cbind(Dye=1,design) > > Then > > cor <- duplicateCorrelation(MAn, design, weights=NULL, > block=targets$TechnicalReplicat) > > fit <- lmFit(MAn, design, weights=NULL, > block=targets$TechnicalReplicat, correlation=cor$consensus) > > Best wishes > Gordon > >>> fit <- lmFit(MAn, design, weights = NULL) >>> cont.mat = makeContrasts(NRvsR = NR_D7sD1 - R_D7vsD1, levels = design) >>> fit2 <- contrasts.fit(fit, cont.mat) >>> fit2 <- eBayes(fit2) >>> >>> >>> Many thanks by advance for any help. >>> >>> -- >>> Guillaume > > ______________________________________________________________________ > The information in this email is confidential and inte...{{dropped:10}}
ADD COMMENT
0
Entering edit mode
Dear Guillaume, On Mon, 23 May 2011, Guillaume Meurice wrote: > Dear Gordon, > > many thanks for your answer. > >> I am going to assume that the main purpose of your experiment is to >> find genes for which the d7 vs d1 response is different between the two >> groups of patients. > > you're right, this exactly what I'm looking for. > >> Since you have gone to the trouble of dye-swapping, you should also >> include an intercept term in the design matrix, so as to soak up any >> probe-specific dye effects: >> >> design <- cbind(Dye=1,design) > > I'll try this but is cost one degree of freedom (I guess ?). > Is it a could procedure to run the statistical test with the intercept > term, then eventually discard the dye-specific probes, and then > re-perform the test without the intercept ? I suppose that you could do this, but seems a lot of effort and risk for little gain. I think you can well afford the one df. >> Then >> >> cor <- duplicateCorrelation(MAn, design, weights=NULL, >> block=targets$TechnicalReplicat) > > Great !! Could I also use this approach to model my biological > replicates ? I mean, here, patients A, B and C (one side) and D,E,F > (other side) are biological replicates. Could I use something like : > > cor <- duplicateCorrelation(MAn, design, weights=NULL, block=targets$Issu) ? No, you can't. >> fit <- lmFit(MAn, design, weights=NULL, >> block=targets$TechnicalReplicat, correlation=cor$consensus) > > > then are the following line correct ? Yes, all the lines after this are fine. Best wishes Gordon > # computing the contrast matrix > cont.mat = makeContrasts(RvsNR = R_D7vsD1 - NR_D7vsD1, levels = design) > > # Fitting the model to the contrast matrix: > fit2 <- contrasts.fit(fit, cont.mat) > fit2 <- eBayes(fit2) > > # the probe list I want: > res.RvsNR = topTable(fit2,number=nrow(MAm), coef="RvsNR") > > # the dye-specific probes : > res.RvsNR = topTable(fit2,number=nrow(MAm), coef="Dye") > > > many thank again. > > > Best regards, > -- > Guillaume > >> Dear Guillaume, >> >> I am going to assume that the main purpose of your experiment is to find genes for which the d7 vs d1 response is different between the two groups of patients. >> >>> Date: Fri, 20 May 2011 15:44:45 +0200 >>> From: Guillaume Meurice <guillaume.meurice at="" igr.fr=""> >>> To: Guillaume Meurice <guillaume.meurice at="" igr.fr=""> >>> Cc: bioconductor at stat.math.ethz.ch >>> Subject: Re: [BioC] Help with >>> >>> Sorry, I made some mistake in my previous mail, into the contrast matrix (bad copy paste from another project), so here I have corrected them. >>> >>>> I have a question regarding the way to properly design biological replicate and technical replicates. >>>> >>>> In the projet, we have two groups of sample : R (respond to the treatment), NR (no response). For each groups, there is several replicates (3) that come from different patients (so not strictely biological). Each patient have two sample : one at day one(d1), the second after one week (d7) The hybridization are planned to be performed in dual color, with dye-sap. >>>> >>>> Here is the target file : >>>> >>>> Cy3 Cy5 Patient Issu TechnicalReplicat >>>> d1 d7 A R 1 >>>> d7 d1 A R 1 >>>> d1 d7 B R 2 >>>> d7 d1 B R 2 >>>> d1 d7 C R 3 >>>> d7 d1 C R 3 >>>> d1 d7 D NR 4 >>>> d7 d1 D NR 4 >>>> d1 d7 E NR 5 >>>> d7 d1 E NR 5 >>>> d1 d7 F NR 6 >>>> d7 d1 F NR 6 >>>> >>>> >>>> my question is how to properly design the matrix design and the contrast matrix to answer the difference between the two groups ? Which column should I use as biological replicat (so as I can use the duplicateCorrelation function) ? >>>> >>>> here is how I've started, but I can't figure out how to use duplicateCorrelation with this design >>>> >>>> design <- cbind( >>>> R_D7vsD1 = c(-1,1,-1,1,-1,1, 0,0, 0,0, 0,0), >>>> NR_D7vsD1 = c( 0,0,0,0,0,0,-1,1,-1,1,-1,1) >>>> ) >> >> Since you have gone to the trouble of dye-swapping, you should also include an intercept term in the design matrix, so as to soak up any probe-specific dye effects: >> >> design <- cbind(Dye=1,design) >> >> Then >> >> cor <- duplicateCorrelation(MAn, design, weights=NULL, >> block=targets$TechnicalReplicat) >> >> fit <- lmFit(MAn, design, weights=NULL, >> block=targets$TechnicalReplicat, correlation=cor$consensus) >> >> Best wishes >> Gordon >> >>>> fit <- lmFit(MAn, design, weights = NULL) >>>> cont.mat = makeContrasts(NRvsR = NR_D7sD1 - R_D7vsD1, levels = design) >>>> fit2 <- contrasts.fit(fit, cont.mat) >>>> fit2 <- eBayes(fit2) >>>> >>>> >>>> Many thanks by advance for any help. >>>> >>>> -- >>>> Guillaume ______________________________________________________________________ The information in this email is confidential and intend...{{dropped:4}}
ADD REPLY

Login before adding your answer.

Traffic: 1052 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6