Hi,
I am a Student currently trying to learn and to understand how to analyse microarray data with R and Bioconductor.
I am following this course : https://www.bits.vib.be/training/111-bits/training/previous-trainings/177-microarray-bioconductor
I am currently in the second part, but I already noticed some problems when doing the following :
tab = topTable(data.fit.eb,coef=2,number=2000,adjust.method="BH") topups = tab[tab[, "logFC"] > 1, ] colnames(topups) IDsup = topups$ID
The last line does not work since ID column has been remplaced by the ID in the rownames, so I worked this out alone.
But now I have trouble with this part :
data.fit.con = contrasts.fit(data.fit,contrast.matrix) data.fit.con.eb = eBayes(data.fit.con) results = decideTests(data.fit.con.eb,method='global',adjust.method="BH",p.value=0.05,lfc=1) res.IDsExvsCup = data.fit.con.eb$genes[results[,1]==1,1] res.IDsExvsCdown = data.fit.con.eb$genes[results[,1]==-1,1]
Because I get this :
> res.IDsExvsCup NULL > res.IDsExvsCdown NULL
mostly because "genes" doesn't exist in the MArrayLM data.fit.con.eb :
> names(data.fit.con.eb) [1] "coefficients" "rank" "assign" "qr" [5] "df.residual" "sigma" "cov.coefficients" "stdev.unscaled" [9] "Amean" "method" "design" "contrasts" [13] "df.prior" "s2.prior" "var.prior" "proportion" [17] "s2.post" "t" "df.total" "p.value" [21] "lods" "F" "F.p.value"
I don't see what they want to refer to here ? Is it again to be replaced by rownames() ? but how ?
Please help :)
Thanks
The
treat
method was presented in the "Compare two groups of sample" tutorial (as alternative to eBayes if I understood well). However, in the "Comparing Multiple groups" part, he just use eBayes. Here, my first example was just to show that thetopups$ID
did'nt worked. Afterward, he filter first on theadj.P.val
and then on theLogFC
.Do you have any link or explanation for the gene data frame and how to assign it ?
All I want is indeed identify the DE genes, and I tried that solution, however, I get a
dim
error :Any idea ? Thank for your help
Read my code carefully. There is no second index in the subsetting, as the
rownames
produces a vector, not a matrix. Also, if you want to assign something togenes
, just do:... where you supply a vector of gene IDs and (optionally) symbols in
my.ids
andmy.symbols
, respectively.