XstringViews and Fasta
1
0
Entering edit mode
Droit Arnaud ▴ 130
@droit-arnaud-3106
Last seen 10.3 years ago
Hello, I am using XstringViews object to transform bed file to fasta file : as(chr, "XStringViews") TopSeq<<-Views(chr, start=start, end=end,names=as.character(i)) write.XStringViews(TopSeq, file=paste("BED","_TEST_QUEST",".",method,a s.character(nTop),"_",i,".fa",sep=""), format="fasta", width=10000) Example : >TopSeq Views on a 242951149-letter DNAString subject subject: CGTATCCCACACACCACACCCACACACCACACCC...NNNNNNNNNNNNNNNNNNNNNNNN NNNNNNNNNN views: start end width [1] 162681889 162682089 201 [TATGTGAAATTTACATTCCATGA...TCCTTGAAGTTAGGAGCAACTT] I cannot get only fasta sequence into variable. I am wondering if it possible to get sequence into variable. Thanks Arnaud Droit.
• 2.1k views
ADD COMMENT
0
Entering edit mode
Patrick Aboyoun ★ 1.6k
@patrick-aboyoun-6734
Last seen 10.3 years ago
United States
Arnaud, Could you provide more description, or code, for your situation? In particular what does "I cannot get only fasta sequence into variable. I am wondering if it possible to get sequence into variable." mean? In your code below, TopSeq is an XStringViews object. If you use the DNAStringSet constructor, you can create a DNAStringSet by DNAStringSet(TopSeq). Is that what you are looking to create in R? Patrick Droit Arnaud wrote: > Hello, > > I am using XstringViews object to transform bed file to fasta file : > > as(chr, "XStringViews") > TopSeq<<-Views(chr, start=start, end=end,names=as.character(i)) > write.XStringViews(TopSeq, file=paste("BED","_TEST_QUEST",".",method ,as.character(nTop),"_",i,".fa",sep=""), format="fasta", width=10000) > > Example : > > >> TopSeq >> > Views on a 242951149-letter DNAString subject > subject: CGTATCCCACACACCACACCCACACACCACACCC...NNNNNNNNNNNNNNNNNNNNNN NNNNNNNNNNNN > views: > start end width > [1] 162681889 162682089 201 [TATGTGAAATTTACATTCCATGA...TCCTTGAAGTTAGGAGCAACTT] > > I cannot get only fasta sequence into variable. I am wondering if it possible to get sequence into variable. > > Thanks > > Arnaud Droit. > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD COMMENT
0
Entering edit mode
Hi Patrick, Exactly. Thank you very much for your help. Arnaud. On 09/07/09 3:00 PM, "Patrick Aboyoun" <paboyoun at="" fhcrc.org=""> wrote: Arnaud, Could you provide more description, or code, for your situation? In particular what does "I cannot get only fasta sequence into variable. I am wondering if it possible to get sequence into variable." mean? In your code below, TopSeq is an XStringViews object. If you use the DNAStringSet constructor, you can create a DNAStringSet by DNAStringSet(TopSeq). Is that what you are looking to create in R? Patrick Droit Arnaud wrote: > Hello, > > I am using XstringViews object to transform bed file to fasta file : > > as(chr, "XStringViews") > TopSeq<<-Views(chr, start=start, end=end,names=as.character(i)) > write.XStringViews(TopSeq, file=paste("BED","_TEST_QUEST",".",method ,as.character(nTop),"_",i,".fa",sep=""), format="fasta", width=10000) > > Example : > > >> TopSeq >> > Views on a 242951149-letter DNAString subject > subject: CGTATCCCACACACCACACCCACACACCACACCC...NNNNNNNNNNNNNNNNNNNNNN NNNNNNNNNNNN > views: > start end width > [1] 162681889 162682089 201 [TATGTGAAATTTACATTCCATGA...TCCTTGAAGTTAGGAGCAACTT] > > I cannot get only fasta sequence into variable. I am wondering if it possible to get sequence into variable. > > Thanks > > Arnaud Droit. > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD REPLY
0
Entering edit mode
Hi everybody, I have Agilent two colors expression arrays in which have been analyzed two KO mice samples (myc-/- and Rag -/-) treated with CD3 and with PBS. I have a total of 4 arrays composed as follows: Sample Cy3 Cy5 1. Myc24CD3 Myc_CD3 Myc_PBS (Swap) 2. Myc24PBS Myc_PBS Myc_CD3 3. Rag24CD3 Rag_CD3 Rag_PBS (Swap) 4. Rag24PBS Rag_PBS Rag_CD3 After the normalization I don't know how to proceed for the construction of the model matrix. By using the suggestions of the "Direct Two Color Designs" example (chapter 7.4 LIMMA guide) I did: > targets FileName Cy3 Cy5 Collection_time 1 3_Myc24CD3gr_Myc24PBSre Myc_CD3 Myc_PBS 24h 2 9_Myc24PBSgr_Myc24CD3re Myc_PBS Myc_CD3 24h 3 5_Rag24CD3gr_Rag24PBSre Rag_CD3 Rag_PBS 24h 4 4_Rag24PBSgr_Rag24CD3re Rag_PBS Rag_CD3 24h > designmyc= modelMatrix(targets, ref="Myc_PBS") Found unique target names: Myc_CD3 Myc_PBS Rag_CD3 Rag_PBS > designmyc Myc_CD3 Rag_CD3 Rag_PBS [1,] -1 0 0 [2,] 1 0 0 [3,] 0 -1 1 [4,] 0 1 -1 > fit = lmFit(MA.Rq, designmyc) Coefficients not estimable: Rag_PBS Warning message: Partial NA coefficients for 45018 probe(s) But at this point I calculated just the ratios of Myc_CD3/Myc_PBS and Rag_Myc/Myc_PBS (I am not really interested in this last one!). How can I specify in the model matrix design that I need two different references to calculate the following logratios: Myc_CD3/Myc_PBS, Rag_Myc/Rag_PBS? Thank you in advance! Giusy
ADD REPLY
0
Entering edit mode
Hi Guisy, You really have two different experiments here, so I don't know if limma is going to want to do things automatically for you without warnings or incorrect model matrices. However, I think you want to use the parameters argument to modelMatrix() rather than the ref argument (since you have two different reference samples). > targets <- matrix(paste(rep(c("Myc","Rag"), each=4), rep(c("CD3","PBS"), each=2, times=3)[2:9], sep = "_"), byrow=T, ncol=2) > targets [,1] [,2] [1,] "Myc_CD3" "Myc_PBS" [2,] "Myc_PBS" "Myc_CD3" [3,] "Rag_CD3" "Rag_PBS" [4,] "Rag_PBS" "Rag_CD3" > colnames(targets) <- c("Cy3","Cy5") > rownames(targets) <- paste("Array", 1:4) > targets Cy3 Cy5 Array 1 "Myc_CD3" "Myc_PBS" Array 2 "Myc_PBS" "Myc_CD3" Array 3 "Rag_CD3" "Rag_PBS" Array 4 "Rag_PBS" "Rag_CD3" > parameters <- cbind(First=c(-1,1,0,0), Second=c(0,0,-1,1)) > rownames(parameters) <- c("Myc_PBS","Myc_CD3","Rag_PBS","Rag_CD3") > parameters First Second Myc_PBS -1 0 Myc_CD3 1 0 Rag_PBS 0 -1 Rag_CD3 0 1 > modelMatrix(targets, parameters) Found unique target names: Myc_CD3 Myc_PBS Rag_CD3 Rag_PBS First Second Array 1 -1 0 Array 2 1 0 Array 3 0 -1 Array 4 0 1 Warning message: In modelMatrix(targets, parameters) : number of parameters should be one less than number of targets But that seems like a lot of work, as the parameters matrix is exactly the model matrix you want. Best Giusy Della Gatta wrote: > Hi everybody, > > I have Agilent two colors expression arrays in which have been analyzed > two KO mice samples (myc-/- and Rag -/-) treated with CD3 and with PBS. > I have a total of 4 arrays composed as follows: > Sample Cy3 Cy5 > 1. Myc24CD3 Myc_CD3 Myc_PBS (Swap) > 2. Myc24PBS Myc_PBS Myc_CD3 > 3. Rag24CD3 Rag_CD3 Rag_PBS (Swap) > 4. Rag24PBS Rag_PBS Rag_CD3 > > After the normalization I don't know > how to proceed for the construction of the model matrix. > > By using the suggestions of the "Direct Two Color Designs" example (chapter 7.4 LIMMA guide) > I did: > > >> targets > FileName Cy3 Cy5 Collection_time > 1 3_Myc24CD3gr_Myc24PBSre Myc_CD3 Myc_PBS 24h > 2 9_Myc24PBSgr_Myc24CD3re Myc_PBS Myc_CD3 24h > 3 5_Rag24CD3gr_Rag24PBSre Rag_CD3 Rag_PBS 24h > 4 4_Rag24PBSgr_Rag24CD3re Rag_PBS Rag_CD3 24h > >> designmyc= modelMatrix(targets, ref="Myc_PBS") > Found unique target names: > Myc_CD3 Myc_PBS Rag_CD3 Rag_PBS > >> designmyc > Myc_CD3 Rag_CD3 Rag_PBS > [1,] -1 0 0 > [2,] 1 0 0 > [3,] 0 -1 1 > [4,] 0 1 -1 > >> fit = lmFit(MA.Rq, designmyc) > Coefficients not estimable: Rag_PBS > Warning message: > Partial NA coefficients for 45018 probe(s) > > > But at this point I calculated just the ratios of Myc_CD3/Myc_PBS > and Rag_Myc/Myc_PBS (I am not really interested in this last one!). > How can I specify in the model matrix design that I need two different references > to calculate the following logratios: Myc_CD3/Myc_PBS, Rag_Myc/Rag_PBS? > > > Thank you in advance! > Giusy > > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- James W. MacDonald, M.S. Biostatistician Douglas Lab University of Michigan Department of Human Genetics 5912 Buhl 1241 E. Catherine St. Ann Arbor MI 48109-5618 734-615-7826
ADD REPLY
0
Entering edit mode
Thank you James, You are right it is a lot of work and maybe I can find better solutions. Given that they are two mose Knock outs and then two independent experiments, what if I split them in two independent ones and I proceed with their normalization and only at the end I will compare the datasets of differentially expressed genes: Myc_CD3/Myc-PBS VERSUS Rag-CD3/Rag-PBS? Thank you! G -----Original Message----- From: James W. MacDonald [mailto:jmacdon@med.umich.edu] Sent: Friday, July 10, 2009 10:15 AM To: Giusy Della Gatta Cc: bioconductor at stat.math.ethz.ch Subject: Re: [BioC] design a modelMatrix with no common references Hi Guisy, You really have two different experiments here, so I don't know if limma is going to want to do things automatically for you without warnings or incorrect model matrices. However, I think you want to use the parameters argument to modelMatrix() rather than the ref argument (since you have two different reference samples). > targets <- matrix(paste(rep(c("Myc","Rag"), each=4), rep(c("CD3","PBS"), each=2, times=3)[2:9], sep = "_"), byrow=T, ncol=2) > targets [,1] [,2] [1,] "Myc_CD3" "Myc_PBS" [2,] "Myc_PBS" "Myc_CD3" [3,] "Rag_CD3" "Rag_PBS" [4,] "Rag_PBS" "Rag_CD3" > colnames(targets) <- c("Cy3","Cy5") > rownames(targets) <- paste("Array", 1:4) > targets Cy3 Cy5 Array 1 "Myc_CD3" "Myc_PBS" Array 2 "Myc_PBS" "Myc_CD3" Array 3 "Rag_CD3" "Rag_PBS" Array 4 "Rag_PBS" "Rag_CD3" > parameters <- cbind(First=c(-1,1,0,0), Second=c(0,0,-1,1)) > rownames(parameters) <- c("Myc_PBS","Myc_CD3","Rag_PBS","Rag_CD3") > parameters First Second Myc_PBS -1 0 Myc_CD3 1 0 Rag_PBS 0 -1 Rag_CD3 0 1 > modelMatrix(targets, parameters) Found unique target names: Myc_CD3 Myc_PBS Rag_CD3 Rag_PBS First Second Array 1 -1 0 Array 2 1 0 Array 3 0 -1 Array 4 0 1 Warning message: In modelMatrix(targets, parameters) : number of parameters should be one less than number of targets But that seems like a lot of work, as the parameters matrix is exactly the model matrix you want. Best Giusy Della Gatta wrote: > Hi everybody, > > I have Agilent two colors expression arrays in which have been analyzed > two KO mice samples (myc-/- and Rag -/-) treated with CD3 and with PBS. > I have a total of 4 arrays composed as follows: > Sample Cy3 Cy5 > 1. Myc24CD3 Myc_CD3 Myc_PBS (Swap) > 2. Myc24PBS Myc_PBS Myc_CD3 > 3. Rag24CD3 Rag_CD3 Rag_PBS (Swap) > 4. Rag24PBS Rag_PBS Rag_CD3 > > After the normalization I don't know > how to proceed for the construction of the model matrix. > > By using the suggestions of the "Direct Two Color Designs" example (chapter 7.4 LIMMA guide) > I did: > > >> targets > FileName Cy3 Cy5 Collection_time > 1 3_Myc24CD3gr_Myc24PBSre Myc_CD3 Myc_PBS 24h > 2 9_Myc24PBSgr_Myc24CD3re Myc_PBS Myc_CD3 24h > 3 5_Rag24CD3gr_Rag24PBSre Rag_CD3 Rag_PBS 24h > 4 4_Rag24PBSgr_Rag24CD3re Rag_PBS Rag_CD3 24h > >> designmyc= modelMatrix(targets, ref="Myc_PBS") > Found unique target names: > Myc_CD3 Myc_PBS Rag_CD3 Rag_PBS > >> designmyc > Myc_CD3 Rag_CD3 Rag_PBS > [1,] -1 0 0 > [2,] 1 0 0 > [3,] 0 -1 1 > [4,] 0 1 -1 > >> fit = lmFit(MA.Rq, designmyc) > Coefficients not estimable: Rag_PBS > Warning message: > Partial NA coefficients for 45018 probe(s) > > > But at this point I calculated just the ratios of Myc_CD3/Myc_PBS > and Rag_Myc/Myc_PBS (I am not really interested in this last one!). > How can I specify in the model matrix design that I need two different references > to calculate the following logratios: Myc_CD3/Myc_PBS, Rag_Myc/Rag_PBS? > > > Thank you in advance! > Giusy > > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- James W. MacDonald, M.S. Biostatistician Douglas Lab University of Michigan Department of Human Genetics 5912 Buhl 1241 E. Catherine St. Ann Arbor MI 48109-5618 734-615-7826
ADD REPLY
0
Entering edit mode
James, Guisy, if you let me make a question about what you're discussing. why do you say that the two-color 2x2 factorial design without a common reference RNA source is "a lot of work" ?? (i was actually wondering how would be the 11.5 example of the Limma user's guide without a common RNA source) thanks! robert. On Fri, 2009-07-10 at 10:14 -0400, James W. MacDonald wrote: > Hi Guisy, > > You really have two different experiments here, so I don't know if limma > is going to want to do things automatically for you without warnings or > incorrect model matrices. However, I think you want to use the > parameters argument to modelMatrix() rather than the ref argument (since > you have two different reference samples). > > > targets <- matrix(paste(rep(c("Myc","Rag"), each=4), > rep(c("CD3","PBS"), each=2, times=3)[2:9], sep = "_"), byrow=T, ncol=2) > > targets > [,1] [,2] > [1,] "Myc_CD3" "Myc_PBS" > [2,] "Myc_PBS" "Myc_CD3" > [3,] "Rag_CD3" "Rag_PBS" > [4,] "Rag_PBS" "Rag_CD3" > > colnames(targets) <- c("Cy3","Cy5") > > rownames(targets) <- paste("Array", 1:4) > > targets > Cy3 Cy5 > Array 1 "Myc_CD3" "Myc_PBS" > Array 2 "Myc_PBS" "Myc_CD3" > Array 3 "Rag_CD3" "Rag_PBS" > Array 4 "Rag_PBS" "Rag_CD3" > > parameters <- cbind(First=c(-1,1,0,0), Second=c(0,0,-1,1)) > > rownames(parameters) <- c("Myc_PBS","Myc_CD3","Rag_PBS","Rag_CD3") > > parameters > First Second > Myc_PBS -1 0 > Myc_CD3 1 0 > Rag_PBS 0 -1 > Rag_CD3 0 1 > > modelMatrix(targets, parameters) > Found unique target names: > Myc_CD3 Myc_PBS Rag_CD3 Rag_PBS > First Second > Array 1 -1 0 > Array 2 1 0 > Array 3 0 -1 > Array 4 0 1 > Warning message: > In modelMatrix(targets, parameters) : > number of parameters should be one less than number of targets > > But that seems like a lot of work, as the parameters matrix is exactly > the model matrix you want. > > Best > > Giusy Della Gatta wrote: > > Hi everybody, > > > > I have Agilent two colors expression arrays in which have been analyzed > > two KO mice samples (myc-/- and Rag -/-) treated with CD3 and with PBS. > > I have a total of 4 arrays composed as follows: > > Sample Cy3 Cy5 > > 1. Myc24CD3 Myc_CD3 Myc_PBS (Swap) > > 2. Myc24PBS Myc_PBS Myc_CD3 > > 3. Rag24CD3 Rag_CD3 Rag_PBS (Swap) > > 4. Rag24PBS Rag_PBS Rag_CD3 > > > > After the normalization I don't know > > how to proceed for the construction of the model matrix. > > > > By using the suggestions of the "Direct Two Color Designs" example (chapter 7.4 LIMMA guide) > > I did: > > > > > >> targets > > FileName Cy3 Cy5 Collection_time > > 1 3_Myc24CD3gr_Myc24PBSre Myc_CD3 Myc_PBS 24h > > 2 9_Myc24PBSgr_Myc24CD3re Myc_PBS Myc_CD3 24h > > 3 5_Rag24CD3gr_Rag24PBSre Rag_CD3 Rag_PBS 24h > > 4 4_Rag24PBSgr_Rag24CD3re Rag_PBS Rag_CD3 24h > > > >> designmyc= modelMatrix(targets, ref="Myc_PBS") > > Found unique target names: > > Myc_CD3 Myc_PBS Rag_CD3 Rag_PBS > > > >> designmyc > > Myc_CD3 Rag_CD3 Rag_PBS > > [1,] -1 0 0 > > [2,] 1 0 0 > > [3,] 0 -1 1 > > [4,] 0 1 -1 > > > >> fit = lmFit(MA.Rq, designmyc) > > Coefficients not estimable: Rag_PBS > > Warning message: > > Partial NA coefficients for 45018 probe(s) > > > > > > But at this point I calculated just the ratios of Myc_CD3/Myc_PBS > > and Rag_Myc/Myc_PBS (I am not really interested in this last one!). > > How can I specify in the model matrix design that I need two different references > > to calculate the following logratios: Myc_CD3/Myc_PBS, Rag_Myc/Rag_PBS? > > > > > > Thank you in advance! > > Giusy > > > > > > _______________________________________________ > > Bioconductor mailing list > > Bioconductor at stat.math.ethz.ch > > https://stat.ethz.ch/mailman/listinfo/bioconductor > > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD REPLY
0
Entering edit mode
Hi Robert, I saw the example used in chapter 11.5. The problem is that I don't have any common reference that I can use to normalize the data, while in the chapter they are a comparing everything against the "Pool". G -----Original Message----- From: Robert Castelo [mailto:robert.castelo@upf.edu] Sent: Monday, July 13, 2009 6:00 AM To: James W. MacDonald Cc: Giusy Della Gatta; bioconductor at stat.math.ethz.ch Subject: Re: [BioC] design a modelMatrix with no common references James, Guisy, if you let me make a question about what you're discussing. why do you say that the two-color 2x2 factorial design without a common reference RNA source is "a lot of work" ?? (i was actually wondering how would be the 11.5 example of the Limma user's guide without a common RNA source) thanks! robert. On Fri, 2009-07-10 at 10:14 -0400, James W. MacDonald wrote: > Hi Guisy, > > You really have two different experiments here, so I don't know if limma > is going to want to do things automatically for you without warnings or > incorrect model matrices. However, I think you want to use the > parameters argument to modelMatrix() rather than the ref argument (since > you have two different reference samples). > > > targets <- matrix(paste(rep(c("Myc","Rag"), each=4), > rep(c("CD3","PBS"), each=2, times=3)[2:9], sep = "_"), byrow=T, ncol=2) > > targets > [,1] [,2] > [1,] "Myc_CD3" "Myc_PBS" > [2,] "Myc_PBS" "Myc_CD3" > [3,] "Rag_CD3" "Rag_PBS" > [4,] "Rag_PBS" "Rag_CD3" > > colnames(targets) <- c("Cy3","Cy5") > > rownames(targets) <- paste("Array", 1:4) > > targets > Cy3 Cy5 > Array 1 "Myc_CD3" "Myc_PBS" > Array 2 "Myc_PBS" "Myc_CD3" > Array 3 "Rag_CD3" "Rag_PBS" > Array 4 "Rag_PBS" "Rag_CD3" > > parameters <- cbind(First=c(-1,1,0,0), Second=c(0,0,-1,1)) > > rownames(parameters) <- c("Myc_PBS","Myc_CD3","Rag_PBS","Rag_CD3") > > parameters > First Second > Myc_PBS -1 0 > Myc_CD3 1 0 > Rag_PBS 0 -1 > Rag_CD3 0 1 > > modelMatrix(targets, parameters) > Found unique target names: > Myc_CD3 Myc_PBS Rag_CD3 Rag_PBS > First Second > Array 1 -1 0 > Array 2 1 0 > Array 3 0 -1 > Array 4 0 1 > Warning message: > In modelMatrix(targets, parameters) : > number of parameters should be one less than number of targets > > But that seems like a lot of work, as the parameters matrix is exactly > the model matrix you want. > > Best > > Giusy Della Gatta wrote: > > Hi everybody, > > > > I have Agilent two colors expression arrays in which have been analyzed > > two KO mice samples (myc-/- and Rag -/-) treated with CD3 and with PBS. > > I have a total of 4 arrays composed as follows: > > Sample Cy3 Cy5 > > 1. Myc24CD3 Myc_CD3 Myc_PBS (Swap) > > 2. Myc24PBS Myc_PBS Myc_CD3 > > 3. Rag24CD3 Rag_CD3 Rag_PBS (Swap) > > 4. Rag24PBS Rag_PBS Rag_CD3 > > > > After the normalization I don't know > > how to proceed for the construction of the model matrix. > > > > By using the suggestions of the "Direct Two Color Designs" example (chapter 7.4 LIMMA guide) > > I did: > > > > > >> targets > > FileName Cy3 Cy5 Collection_time > > 1 3_Myc24CD3gr_Myc24PBSre Myc_CD3 Myc_PBS 24h > > 2 9_Myc24PBSgr_Myc24CD3re Myc_PBS Myc_CD3 24h > > 3 5_Rag24CD3gr_Rag24PBSre Rag_CD3 Rag_PBS 24h > > 4 4_Rag24PBSgr_Rag24CD3re Rag_PBS Rag_CD3 24h > > > >> designmyc= modelMatrix(targets, ref="Myc_PBS") > > Found unique target names: > > Myc_CD3 Myc_PBS Rag_CD3 Rag_PBS > > > >> designmyc > > Myc_CD3 Rag_CD3 Rag_PBS > > [1,] -1 0 0 > > [2,] 1 0 0 > > [3,] 0 -1 1 > > [4,] 0 1 -1 > > > >> fit = lmFit(MA.Rq, designmyc) > > Coefficients not estimable: Rag_PBS > > Warning message: > > Partial NA coefficients for 45018 probe(s) > > > > > > But at this point I calculated just the ratios of Myc_CD3/Myc_PBS > > and Rag_Myc/Myc_PBS (I am not really interested in this last one!). > > How can I specify in the model matrix design that I need two different references > > to calculate the following logratios: Myc_CD3/Myc_PBS, Rag_Myc/Rag_PBS? > > > > > > Thank you in advance! > > Giusy > > > > > > _______________________________________________ > > Bioconductor mailing list > > Bioconductor at stat.math.ethz.ch > > https://stat.ethz.ch/mailman/listinfo/bioconductor > > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD REPLY
0
Entering edit mode
hi Giusy, so then I understand that the only way to go with two-color 2x2 factorial design without a common reference RNA source is to treat each combination of factors as an independent experiment, right? (i initially understood from the last emails that there was an alternative by using the parameters argument to the modelMatrix() function, but i understand now this alternative cannot be employed) robert. On Mon, 2009-07-13 at 11:23 -0400, Giusy Della Gatta wrote: > Hi Robert, > I saw the example used in chapter 11.5. The problem is that > I don't have any common reference that I can use to normalize > the data, while in the chapter they are a comparing everything against > the "Pool". > > > G > > > > > -----Original Message----- > From: Robert Castelo [mailto:robert.castelo at upf.edu] > Sent: Monday, July 13, 2009 6:00 AM > To: James W. MacDonald > Cc: Giusy Della Gatta; bioconductor at stat.math.ethz.ch > Subject: Re: [BioC] design a modelMatrix with no common references > > James, Guisy, > > if you let me make a question about what you're discussing. > > why do you say that the two-color 2x2 factorial design without a common > reference RNA source is "a lot of work" ?? > > (i was actually wondering how would be the 11.5 example of the Limma > user's guide without a common RNA source) > > thanks! > robert. > > On Fri, 2009-07-10 at 10:14 -0400, James W. MacDonald wrote: > > Hi Guisy, > > > > You really have two different experiments here, so I don't know if limma > > is going to want to do things automatically for you without warnings or > > incorrect model matrices. However, I think you want to use the > > parameters argument to modelMatrix() rather than the ref argument (since > > you have two different reference samples). > > > > > targets <- matrix(paste(rep(c("Myc","Rag"), each=4), > > rep(c("CD3","PBS"), each=2, times=3)[2:9], sep = "_"), byrow=T, ncol=2) > > > targets > > [,1] [,2] > > [1,] "Myc_CD3" "Myc_PBS" > > [2,] "Myc_PBS" "Myc_CD3" > > [3,] "Rag_CD3" "Rag_PBS" > > [4,] "Rag_PBS" "Rag_CD3" > > > colnames(targets) <- c("Cy3","Cy5") > > > rownames(targets) <- paste("Array", 1:4) > > > targets > > Cy3 Cy5 > > Array 1 "Myc_CD3" "Myc_PBS" > > Array 2 "Myc_PBS" "Myc_CD3" > > Array 3 "Rag_CD3" "Rag_PBS" > > Array 4 "Rag_PBS" "Rag_CD3" > > > parameters <- cbind(First=c(-1,1,0,0), Second=c(0,0,-1,1)) > > > rownames(parameters) <- c("Myc_PBS","Myc_CD3","Rag_PBS","Rag_CD3") > > > parameters > > First Second > > Myc_PBS -1 0 > > Myc_CD3 1 0 > > Rag_PBS 0 -1 > > Rag_CD3 0 1 > > > modelMatrix(targets, parameters) > > Found unique target names: > > Myc_CD3 Myc_PBS Rag_CD3 Rag_PBS > > First Second > > Array 1 -1 0 > > Array 2 1 0 > > Array 3 0 -1 > > Array 4 0 1 > > Warning message: > > In modelMatrix(targets, parameters) : > > number of parameters should be one less than number of targets > > > > But that seems like a lot of work, as the parameters matrix is exactly > > the model matrix you want. > > > > Best > > > > Giusy Della Gatta wrote: > > > Hi everybody, > > > > > > I have Agilent two colors expression arrays in which have been analyzed > > > two KO mice samples (myc-/- and Rag -/-) treated with CD3 and with PBS. > > > I have a total of 4 arrays composed as follows: > > > Sample Cy3 Cy5 > > > 1. Myc24CD3 Myc_CD3 Myc_PBS (Swap) > > > 2. Myc24PBS Myc_PBS Myc_CD3 > > > 3. Rag24CD3 Rag_CD3 Rag_PBS (Swap) > > > 4. Rag24PBS Rag_PBS Rag_CD3 > > > > > > After the normalization I don't know > > > how to proceed for the construction of the model matrix. > > > > > > By using the suggestions of the "Direct Two Color Designs" example (chapter 7.4 LIMMA guide) > > > I did: > > > > > > > > >> targets > > > FileName Cy3 Cy5 Collection_time > > > 1 3_Myc24CD3gr_Myc24PBSre Myc_CD3 Myc_PBS 24h > > > 2 9_Myc24PBSgr_Myc24CD3re Myc_PBS Myc_CD3 24h > > > 3 5_Rag24CD3gr_Rag24PBSre Rag_CD3 Rag_PBS 24h > > > 4 4_Rag24PBSgr_Rag24CD3re Rag_PBS Rag_CD3 24h > > > > > >> designmyc= modelMatrix(targets, ref="Myc_PBS") > > > Found unique target names: > > > Myc_CD3 Myc_PBS Rag_CD3 Rag_PBS > > > > > >> designmyc > > > Myc_CD3 Rag_CD3 Rag_PBS > > > [1,] -1 0 0 > > > [2,] 1 0 0 > > > [3,] 0 -1 1 > > > [4,] 0 1 -1 > > > > > >> fit = lmFit(MA.Rq, designmyc) > > > Coefficients not estimable: Rag_PBS > > > Warning message: > > > Partial NA coefficients for 45018 probe(s) > > > > > > > > > But at this point I calculated just the ratios of Myc_CD3/Myc_PBS > > > and Rag_Myc/Myc_PBS (I am not really interested in this last one!). > > > How can I specify in the model matrix design that I need two different references > > > to calculate the following logratios: Myc_CD3/Myc_PBS, Rag_Myc/Rag_PBS? > > > > > > > > > Thank you in advance! > > > Giusy > > > > > > > > > _______________________________________________ > > > Bioconductor mailing list > > > Bioconductor at stat.math.ethz.ch > > > https://stat.ethz.ch/mailman/listinfo/bioconductor > > > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > > > >
ADD REPLY
0
Entering edit mode
As I have noted elsewhere in the list, it is often easier to do the analysis using Single Channel analysis, particularly if the only blocking factor is the array. The 2-way ANOVA is certainly more easily set up this way, although depending on the design, a 2x2 can be done using 2-channel analysis as long as one is very careful about setting up the contrasts. (Sorry, I am not up for setting this up for anyone at present.) --Naomi At 01:31 PM 7/13/2009, Robert Castelo wrote: >hi Giusy, > >so then I understand that the only way to go with two-color 2x2 >factorial design without a common reference RNA source is to treat each >combination of factors as an independent experiment, right? > >(i initially understood from the last emails that there was an >alternative by using the parameters argument to the modelMatrix() >function, but i understand now this alternative cannot be employed) > >robert. > >On Mon, 2009-07-13 at 11:23 -0400, Giusy Della Gatta wrote: > > Hi Robert, > > I saw the example used in chapter 11.5. The problem is that > > I don't have any common reference that I can use to normalize > > the data, while in the chapter they are a comparing everything against > > the "Pool". > > > > > > G > > > > > > > > > > -----Original Message----- > > From: Robert Castelo [mailto:robert.castelo at upf.edu] > > Sent: Monday, July 13, 2009 6:00 AM > > To: James W. MacDonald > > Cc: Giusy Della Gatta; bioconductor at stat.math.ethz.ch > > Subject: Re: [BioC] design a modelMatrix with no common references > > > > James, Guisy, > > > > if you let me make a question about what you're discussing. > > > > why do you say that the two-color 2x2 factorial design without a common > > reference RNA source is "a lot of work" ?? > > > > (i was actually wondering how would be the 11.5 example of the Limma > > user's guide without a common RNA source) > > > > thanks! > > robert. > > > > On Fri, 2009-07-10 at 10:14 -0400, James W. MacDonald wrote: > > > Hi Guisy, > > > > > > You really have two different experiments here, so I don't know if limma > > > is going to want to do things automatically for you without warnings or > > > incorrect model matrices. However, I think you want to use the > > > parameters argument to modelMatrix() rather than the ref argument (since > > > you have two different reference samples). > > > > > > > targets <- matrix(paste(rep(c("Myc","Rag"), each=4), > > > rep(c("CD3","PBS"), each=2, times=3)[2:9], sep = "_"), byrow=T, ncol=2) > > > > targets > > > [,1] [,2] > > > [1,] "Myc_CD3" "Myc_PBS" > > > [2,] "Myc_PBS" "Myc_CD3" > > > [3,] "Rag_CD3" "Rag_PBS" > > > [4,] "Rag_PBS" "Rag_CD3" > > > > colnames(targets) <- c("Cy3","Cy5") > > > > rownames(targets) <- paste("Array", 1:4) > > > > targets > > > Cy3 Cy5 > > > Array 1 "Myc_CD3" "Myc_PBS" > > > Array 2 "Myc_PBS" "Myc_CD3" > > > Array 3 "Rag_CD3" "Rag_PBS" > > > Array 4 "Rag_PBS" "Rag_CD3" > > > > parameters <- cbind(First=c(-1,1,0,0), Second=c(0,0,-1,1)) > > > > rownames(parameters) <- c("Myc_PBS","Myc_CD3","Rag_PBS","Rag_CD3") > > > > parameters > > > First Second > > > Myc_PBS -1 0 > > > Myc_CD3 1 0 > > > Rag_PBS 0 -1 > > > Rag_CD3 0 1 > > > > modelMatrix(targets, parameters) > > > Found unique target names: > > > Myc_CD3 Myc_PBS Rag_CD3 Rag_PBS > > > First Second > > > Array 1 -1 0 > > > Array 2 1 0 > > > Array 3 0 -1 > > > Array 4 0 1 > > > Warning message: > > > In modelMatrix(targets, parameters) : > > > number of parameters should be one less than number of targets > > > > > > But that seems like a lot of work, as the parameters matrix is exactly > > > the model matrix you want. > > > > > > Best > > > > > > Giusy Della Gatta wrote: > > > > Hi everybody, > > > > > > > > I have Agilent two colors expression arrays in which have > been analyzed > > > > two KO mice samples (myc-/- and Rag -/-) treated with CD3 and with PBS. > > > > I have a total of 4 arrays composed as follows: > > > > Sample Cy3 Cy5 > > > > 1. Myc24CD3 Myc_CD3 Myc_PBS (Swap) > > > > 2. Myc24PBS Myc_PBS Myc_CD3 > > > > 3. Rag24CD3 Rag_CD3 Rag_PBS (Swap) > > > > 4. Rag24PBS Rag_PBS Rag_CD3 > > > > > > > > After the normalization I don't know > > > > how to proceed for the construction of the model matrix. > > > > > > > > By using the suggestions of the "Direct Two Color Designs" > example (chapter 7.4 LIMMA guide) > > > > I did: > > > > > > > > > > > >> targets > > > > FileName Cy3 Cy5 Collection_time > > > > 1 3_Myc24CD3gr_Myc24PBSre Myc_CD3 Myc_PBS 24h > > > > 2 9_Myc24PBSgr_Myc24CD3re Myc_PBS Myc_CD3 24h > > > > 3 5_Rag24CD3gr_Rag24PBSre Rag_CD3 Rag_PBS 24h > > > > 4 4_Rag24PBSgr_Rag24CD3re Rag_PBS Rag_CD3 24h > > > > > > > >> designmyc= modelMatrix(targets, ref="Myc_PBS") > > > > Found unique target names: > > > > Myc_CD3 Myc_PBS Rag_CD3 Rag_PBS > > > > > > > >> designmyc > > > > Myc_CD3 Rag_CD3 Rag_PBS > > > > [1,] -1 0 0 > > > > [2,] 1 0 0 > > > > [3,] 0 -1 1 > > > > [4,] 0 1 -1 > > > > > > > >> fit = lmFit(MA.Rq, designmyc) > > > > Coefficients not estimable: Rag_PBS > > > > Warning message: > > > > Partial NA coefficients for 45018 probe(s) > > > > > > > > > > > > But at this point I calculated just the ratios of Myc_CD3/Myc_PBS > > > > and Rag_Myc/Myc_PBS (I am not really interested in this last one!). > > > > How can I specify in the model matrix design that I need two > different references > > > > to calculate the following logratios: Myc_CD3/Myc_PBS, > Rag_Myc/Rag_PBS? > > > > > > > > > > > > Thank you in advance! > > > > Giusy > > > > > > > > > > > > _______________________________________________ > > > > Bioconductor mailing list > > > > Bioconductor at stat.math.ethz.ch > > > > https://stat.ethz.ch/mailman/listinfo/bioconductor > > > > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > > > > > > > > >_______________________________________________ >Bioconductor mailing list >Bioconductor at stat.math.ethz.ch >https://stat.ethz.ch/mailman/listinfo/bioconductor >Search the archives: >http://news.gmane.org/gmane.science.biology.informatics.conductor Naomi S. Altman 814-865-3791 (voice) Associate Professor Dept. of Statistics 814-863-7114 (fax) Penn State University 814-865-1348 (Statistics) University Park, PA 16802-2111
ADD REPLY

Login before adding your answer.

Traffic: 433 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