Entering edit mode
Paul, Cristina
▴
50
@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]]