How do I find up and down regulated genes for each contrast in LIMMA?
1
0
Entering edit mode
@paul-cristina-5211
Last seen 9.6 years ago
R.2.14 in RStudio all packages up to date. Using the contrast.matrix I have been using lmfit etc from Limma, and have obtained a very informative Venn Diagram of our results (all trts minus healthy)... I would like to find the top 25 (in one trt only 5 genes were unique to the pathogen) up and down regulated genes... for each pathogen vs Healthy contrast. The code below gives me total across all the contrasts, or appears to. Have googled and read most of day but have found no code etc for doing this, or do I need to make a matrix for each comparison separately? I tried topTableF in the tops code (given topTableF provided the contrast data) but result was NA's... > design #each trt 4 CEL file replicates no subtreatments Virus Bacteria Healthy phytoplasma 1 0 1 0 0 2 0 1 0 0 3 0 1 0 0 4 0 1 0 0 5 1 0 0 0 6 1 0 0 0 7 1 0 0 0 8 1 0 0 0 9 0 0 1 0 10 0 0 1 0 11 0 0 1 0 12 0 0 1 0 13 0 0 0 1 14 0 0 0 1 15 0 0 0 1 16 0 0 0 1 fit <- lmFit(eset, design) contrast.matrix<-makeContrasts(Bacteria-Healthy, Phytoplasma-Healthy, Virus-Healthy, levels=design) fit2 <- contrasts.fit(fit, contrast.matrix) fit2 <- eBayes(fit2) topTable(fit2, adjust="BH", n=20) results<-decideTests(fit2) vennDiagram(results) topTableF(fit2, n=20) tops <- topTable(fit2, n=Inf) # all on chip tops[which(tops$logFC > 0), ] [1:25,] # up reg top 25 tops[which(tops$logFC < 0), ] [1:25,] # down reg top 25 thank you in advance for all help.... Whether you think you can or think you can't - Your're right... Henry Ford Cristina Paul This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately. [[alternative HTML version deleted]]
limma limma • 1.0k views
ADD COMMENT
0
Entering edit mode
@sean-davis-490
Last seen 3 months ago
United States
On Tue, May 1, 2012 at 1:22 PM, Paul, Cristina <cristina.paul@ars.usda.gov>wrote: > R.2.14 in RStudio all packages up to date. > > Using the contrast.matrix I have been using lmfit etc from Limma, and have > obtained a very informative Venn Diagram of our results (all trts minus > healthy)... I would like to find the top 25 (in one trt only 5 genes were > unique to the pathogen) up and down regulated genes... for each pathogen > vs Healthy contrast. The code below gives me total across all the > contrasts, or appears to. Have googled and read most of day but have > found no code etc for doing this, or do I need to make a matrix for each > comparison separately? I tried topTableF in the tops code (given > topTableF provided the contrast data) but result was NA's... > > > design #each trt 4 CEL file replicates no subtreatments > Virus Bacteria Healthy phytoplasma > 1 0 1 0 0 > 2 0 1 0 0 > 3 0 1 0 0 > 4 0 1 0 0 > 5 1 0 0 0 > 6 1 0 0 0 > 7 1 0 0 0 > 8 1 0 0 0 > 9 0 0 1 0 > 10 0 0 1 0 > 11 0 0 1 0 > 12 0 0 1 0 > 13 0 0 0 1 > 14 0 0 0 1 > 15 0 0 0 1 > 16 0 0 0 1 > > > fit <- lmFit(eset, design) > contrast.matrix<-makeContrasts(Bacteria-Healthy, Phytoplasma- Healthy, > Virus-Healthy, levels=design) > fit2 <- contrasts.fit(fit, contrast.matrix) > fit2 <- eBayes(fit2) > topTable(fit2, adjust="BH", n=20) > results<-decideTests(fit2) > vennDiagram(results) > topTableF(fit2, n=20) > tops <- topTable(fit2, n=Inf) # all on chip > You'll want to include the coef argument in the topTable call to specify which contrast you are examining. Sean > tops[which(tops$logFC > 0), ] [1:25,] # up reg top 25 > tops[which(tops$logFC < 0), ] [1:25,] # down reg top 25 > > thank you in advance for all help.... > > Whether you think you can or think you can't - Your're right... > Henry Ford > > Cristina Paul > > > > > > > This electronic message contains information generated by the USDA solely > for the intended recipients. Any unauthorized interception of this message > or the use or disclosure of the information it contains may violate the law > and subject the violator to civil or criminal penalties. If you believe you > have received this message in error, please notify the sender and delete > the email immediately. > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > 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]]
ADD COMMENT

Login before adding your answer.

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