0

I have two matrices that I have gotten from lmFit and eBayes and topTable, one being robust and one not. I have selected the rows from each of the two matrices for which the P.Value is less than my threshold. I want to compare the two resulting matrices using venn Diagrams to see which rows are common between the two.

 pval.thr = 0.1
 fit2 <- lmFit(expMat, design, method = "robust", na.omit = T)

 fit2 <- eBayes(fit2)
 res = topTable(fit2, coef = 2, adjust.method = "bonferroni", number = "All", sort.by = "p")

and

 fit3 <- lmFit(expMat, design, method = "ls", na.omit = T)

 fit3 <- eBayes(fit3)
 res = topTable(fit3, coef = 2, adjust.method = "bonferroni", number = "All", sort.by = "p")

The data will look like:

 ID logFC        AveExpr          t         P.Value    adj.P.Val         B

 T  0.059335247 0.154239328 3.749658724 0.000686454 0.105713938 -0.618554935

 H  0.123237308 0.554763583 2.889360548 0.006797704 1   -2.795346287

 C  -0.083833815    0.303813845 -2.880403408    0.006953066 1   -2.814922167

 V  -0.321277798    1.242826381 -2.754181612    0.009528321 1   -3.103478276

 I  0.049515688 0.210959268 2.673704857 0.011608836 1   -3.288163042

 A  -0.591708802    2.968364189 -2.653517946    0.012193179 1   -3.328550805

 S  -0.202304813    0.698173244 -2.479078257    0.018499401 1   -3.698704926

 B  -0.0363145  0.139366103 -2.439974357    0.020272635 1   -3.794860792

Is there a way for doing that?

I have so far looked up vennCount but I couldnt figure out how to use that on two different matrices. If there is another package or method that could be useful, I'd be happy to explore that as well.

BBB
  • 305
  • 1
  • 6
  • 19
  • can you post some sample data? – Nishanth Apr 08 '13 at 04:30
  • I meant `print(res)` in both the cases. So that we can run the code. – Nishanth Apr 08 '13 at 04:38
  • This is res, I wrote it to a file – BBB Apr 08 '13 at 04:49
  • The 2 matrices you are trying to compare would have helped. Until then, may be you can use [this](http://stackoverflow.com/questions/3171426/compare-two-data-frames-to-find-the-rows-in-data-frame-1-that-are-not-present-in) to get common rows and try [this](http://stackoverflow.com/questions/8713994/venn-diagram-in-r-proportional-and-color-shading-possible-semi-transparency-sup) to plot venn diagram. – Nishanth Apr 08 '13 at 04:58

0 Answers0